• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. the usage of e language "now"

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 781
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

the usage of e language "now"

redrabbit
redrabbit over 12 years ago

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

Bs 

  • Cancel
  • Avi Farjoun
    Avi Farjoun over 12 years ago

    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 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • hannes
    hannes over 12 years ago

    Hi,

    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.

    Regards,
    -hannes

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information