I try to evaluate the value of a transient signal at a derived value. In my simulation, I need to get the value of the output signal when the read signal falls down. So What I do is to create the following expression in ade-assembler:
cross(VT("/read") 1.65 0 "falling" t "time" nil)
read is a digital signal coming from a systemverilog testbench. I call this expression time_read_t and when I launch the simulation the expression is correctly evaluated, the returned value is correct.
Now I try to get the value of my output signal using this time_read_t variable with the following expression value(VT("/vout") time_read_t ), I get
ERROR (VIVA-3002):expression evaluation failed: Expression evaluates to nil
ERROR (VIVA-3002):expression evaluation failed: value(VT("/vout") time_read_t )
If I try with value(VT("/vout") VAR("time_read_t") ) it does not work either and I get
ERROR (VIVA-3002):expression evaluation failed: val is not legal.
ERROR (VIVA-3002):expression evaluation failed: value(VT("/vout") VAR("time_read_t") )
("putprop" 0 t nil ("*Error* putprop: first arg must be either symbol, list, defstruct or user type" nil))
Can you please help me, I really don't understand.
thank your for your time
It would be useful to see a plot of /read and /vout, and your Assembler output. Which IC sub-version are you using? Help->About will tell you.
Note that it won't be VAR("time_read_t") because time_read_t is a output name (I think) rather than a variable.
my setup is the following one
* IC618 : IC6.1.8-64b.500.10
* spectre 191
I want to measure the value of the vout signal when read falls down.
If I may comment on your question, please allow me to!
it appears from your helpful waveforms that your "read"'signal does not cross 1.65 V and, in fact? is limited to about 1V. If so, I believe the cross() function you provided in your initial question will evaluate to nil:
read < 1.65 V for 0 < time < 50 us
Hence, it follows that using the value of this cross() function will not provide a valid argument to the value() function you used with waveform vout.
Did I understand your plot and cross() function correctly?
It's not that. There's an automatic conversion of the digital signal to "analog" that goes on in the cross (and I think it will convert a logic 1 to 5V, so it will definitely cross 1.65).
Olivier, the issue is that you are trying to find multiple crossing points, and that's not going to work. If you want just the first crossing, then use:
time_read_t = cross(VT("/read") 1.65 1 "falling" nil nil nil)
yourOut = value(VT("/vout") time_read_t)
If you really want to find the value at all crossing points, I don't think there's really a way to do that right now (at least without not writing a custom function - I'll check further if that's what you''re really after). However, your example only had one transition, so I'm assuming not for now...
thank you very much for your answer. I actually found out myself :) !!! I came back here to write the solution but already you already did !!
Once again thank you.