The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> event trigger of integer and real values https://designers-guide.org/forum/YaBB.pl?num=1184970624 Message started by sylak on Jul 20th, 2007, 3:30pm |
Title: event trigger of integer and real values Post by sylak on Jul 20th, 2007, 3:30pm Suppose I have a real vout_val; integer logic1, logic2; logic1 = V(vin1) > vtrans; logic2 = V(vin2) > vtrans; @ (cross(V(vin1) - vtrans, 1)) logic1 = 1; @ (cross(V(vin1) - vtrans, -1)) logic1 = 0; @ (cross(V(vin2) - vtrans, 1)) logic2 = 1; @ (cross(V(vin2) - vtrans, -1)) logic2 = 0; // // define the logic function. // vout_val = (logic1 && logic2) ? vlogic_high : vlogic_low; if an event happens in vin1 ==> change in logic1?.. will 'vout_val' change along with event based change of logic1 ? or should I include some statement for that to happen? |
Title: Re: event trigger of integer and real values Post by Marq Kole on Jul 23rd, 2007, 5:32am Assuming the above code is inside an analog block there is no need to have any additional code with the calculation of vout_val. Any code inside an analog block is evaluated with every time-step unless it is guarded by an event. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |