I want to use AND function of two variables in the notepad, where I write the TIME & MAGNITUDE of the data points in vpwlf source that, I want to generate pulse. Is this possible ??
If the above one line is not understood, I am explaining, what I am doing. I am generating a user-defined pwl pulse using vpwlf from AnalogA library. I observed that we can take the variable that we define in the instance to the ADE-L and define there. I want to write a skill set function for AND logic in the notepad itself, where I write the data points. Is this possible ?? Suppose there are three data points - (t1,g1), (t2,g2) & (t3,a). I want that a should be the AND function of g1 & g2. And all these should be coded in the notepad where I define the data points. Is this possible ???
Thanks in advance
I think the answer is probably no, but I don't really understand what you're asking - it's very unclear.
In reply to Andrew Beckett:
I am defining three data points in vpwlf such that-
Suppose, I define g1 = HIGH (= 3.3 V) & g2 = LOW (= 0 V) in ADE- L, where I have taken the variable. I want to do a AND logic function for the variable 'a', such that a = g1 AND g2. So I am looking for a skillset in the notepad to write something like 'g1ANDg2' instead of 'a' in the notepad, so that I avoid the 3rd variable completely. Is this possible ?? If not is there any other instance or sources in the analog library where I can do this ??
In reply to Charanraj Mohan:
An AND on voltage values is a bit ambiguous, but you can put expressions in the PWL file. So putting this in your PWL file would work:
t1 g1t2 g2t3 (g1>1.65 && g2>1.65)*3.3
The last expression just determines that both g1 and g2 are above mid-rail, and if so that && expression (the part in parentheses) will return 1 or 0, and so I'm then multiplying by the supply to get a "high" value.
Your terminology is a bit strange - I don't know what you mean by "skillset in the notepad"!
Thanks Andrew. I think I have to add 'if' before (g1>1.65 && g2>1.65)*3.3. Is this right ? Because when I write exactly the same, I get error. How can be the logic used here ? I mean, what is the generic syntax ?
No, I don't know why you think that? In spectre if you create the file "forumpwl.pwl" with this content:
//parameters t1=0 g1=3.3 t2=100n g2=2.5 t3=200n
v1 (n1 0) vsource type=pwl file="forumpwl.pwl"
tran tran stop=300n
I changed the values so you could actually see the and in action. This works fine - so not sure what you're doing. You can run from the command line with "spectre forumpwl.scs".
I just realised that you were the person who was asking about PWL sources and it turned out you were using Eldo.
So are you using spectre or Eldo in this case?
As for the error messages you're showing, you haven't given enough information to know which IC version, which simulator, which simulator version, precisely what you've entered on the forms (pictures help too). As I mentioned in the previous post, Please read the Forum Guidelines. Otherwise, I've just ended up wasting a whole bunch of time giving you answers which are of no use because they're not relevant.