Home > Community > Forums > Functional Verification > the usage of e language "now"


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 the usage of e language "now" 

Last post Tue, Nov 6 2012 1:08 AM by hannes. 2 replies.
Started by redrabbit 05 Nov 2012 08:20 PM. Topic has 2 replies and 738 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Nov 5 2012 8:20 PM

    • redrabbit
    • Top 500 Contributor
    • Joined on Tue, Nov 22 2011
    • Posts 26
    • Points 385
    the usage of e language "now" Reply

    hi all,


         i learn the code written by someone else has finished many years ago,and i couldn't contact with him.in the code ,i find the "now" programme,the defination and the example are easily understood,but i don't know which senario could use this keyword,which enviroment should "now" could be used.  ,,the reference said ,in the same cycle ,and tcm is involved,but codes i read is something like this:

       on  a_ev


            if (   (now @b_ev))

               and (now  @c_ev)

              or ... 




                   ... //actions  


              if ()


                 emit c_ev; 


       } ;//on brackets

    i think the c_ev is the consequence,and the a_ev is the reason,,,this segment of code make me so confused!



    thank you for your helping me out


    • Post Points: 35
  • Tue, Nov 6 2012 1:04 AM

    Re: the usage of e language "now" Reply

    The now contruct comes to check whether an event had occured so far in this Specman cycle,

    The code you mention uses the 'on' construct which will fire the procedural code as soon as a_ev will occur.

    The procedural code checks whether b_ev and c_ev had already occured in this cycle. You did not specify the entire code, so I'm just assuming that in case they actually occured, the code will do some actions, and in case the had not, it will emit them (at least c_ev...) 


    You could use this code also to check which of the events under a unified event had happened. For example:

    event a is @b or @c;

    on a{

    if (now @b) {


    if (now @c) {


    gives you an option to differentiate the actual event  that triggered @a.

    Hopes it makes it clearer 

    • Post Points: 5
  • Tue, Nov 6 2012 1:08 AM

    • hannes
    • Top 150 Contributor
    • Joined on Fri, Nov 14 2008
    • Bracknell, Berkshire
    • Posts 50
    • Points 895
    Re: the usage of e language "now" Reply


    the on block is a number of expressions that are executed without any time advance (like a method). However, on blocks are sensitive to an event (in your examples the a_ev event). When this event happens, all the actions in the on block are executed. Hwoever, at the same time as the a_ev we could have other events. The "now" operator tells you whether another event is also active in the same cycle.


    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by redrabbit at 05 Nov 2012 08:20 PM. Topic has 2 replies.