• 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. assertion in e

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 65
  • Views 14775
  • 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

assertion in e

redrabbit
redrabbit over 13 years ago

hi,all

    i've no idea about how to write expect/assume  with e language......

code is like this:

   event a_ev;

   expect  a_ev is

   @b_ev => TE @default_sample_event

   else dut_error("XXXXX");

 

  on a_ev

  {

       ev_cnt+=1;

      message(LOW,"XXXXXXX");

  }

 

i run the simulation,the log does not contain the ev_cnt info.......and the assertion of a_ev has passed, not menthion  that compile phase has passed.so,what happened????does the assertion of e really work?or the event is not emitted?????

  

  • Cancel
Parents
  • hannes
    hannes over 13 years ago

     Hello redrabbit,

    I think a basic spmn training class would be really helpful. Questions like this one and others
    you've submitted recently would be answered there...

    Specifically to the above, a_ev doesn't seem to be emitted anywhere, so as you rightly notice
    it doesn't ever happen. Looking at the code, maybe you wanted to cover (i.e. count) when this
    expect has triggered. You can do this in 2 ways:

    1) set_config(cover,collect_checks_expects,TRUE) => this will give you coverage on expects, i.e. tell you
       whether this check was ever triggered

    2) you can have an exect statement after the trigger even (just like an on block) like this:
       expect  a_ev is

       @b_ev exec {ev_cnt+=1;message(LOW,"XXXXXXX");}   => TE @default_sample_event

       else dut_error("XXXXX");

    Best regards,
    -hannes

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • hannes
    hannes over 13 years ago

     Hello redrabbit,

    I think a basic spmn training class would be really helpful. Questions like this one and others
    you've submitted recently would be answered there...

    Specifically to the above, a_ev doesn't seem to be emitted anywhere, so as you rightly notice
    it doesn't ever happen. Looking at the code, maybe you wanted to cover (i.e. count) when this
    expect has triggered. You can do this in 2 ways:

    1) set_config(cover,collect_checks_expects,TRUE) => this will give you coverage on expects, i.e. tell you
       whether this check was ever triggered

    2) you can have an exect statement after the trigger even (just like an on block) like this:
       expect  a_ev is

       @b_ev exec {ev_cnt+=1;message(LOW,"XXXXXXX");}   => TE @default_sample_event

       else dut_error("XXXXX");

    Best regards,
    -hannes

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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