fabian
Junior Member
Offline
Posts: 19
Europe
|
Dear All,
I am hoping my problem is an interest for the forum. I have just been registered to our community and I wonder if I could have a tip on the following issue.
My code is as follow: electrical in;
parameter real V_th=0.0; parameter real ttol=10p; parameter integer dir=1; parameter integer flag_start=0;
real t1, v_meas;
analog begin
@(cross(V(in)-V_th,dir,ttol)) begin t1=$abstime; flag_start <= 1; // $strobe("time: %g", t1); end @(timer(t1, 1u)) begin if (flag_start==1) begin v_meas = V(in); $strobe("value: %e", v_meas); end end
This veriloga breaks the simulation with the message I have put in the subject. What I would like to implement is an event based on the outcome of an other. If I remove the condition "if", the two events are running without any issue but the second event is not waiting t1 value to be affected before to start.
Thanks for your feedback and remarks, Fabian
|