• 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 14770
  • 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
  • tpylant
    tpylant over 13 years ago
    You can use the Specman wave command to look at the events in the waveform viewer.

                    specman> wave –event <path to instance containing events>

    The wave command will probe the waves and add them to the waveform viewer (assuming you’re in GUI mode).

     

    Tim
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 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
  • hannes
    hannes over 13 years ago

     Another thing I forgot to mention. The event a_ev is a different thing from the expect a_ev.
    You've used a named expect (expect a_ev is ....). You're allowed to do that in e, since
    the event and the expect are 2 syntatically different things. Again, fo an on block on the
    expect, just use the exec{} clause

    -hannes

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • redrabbit
    redrabbit over 13 years ago

    that is to say  the event-name in expect is not the event.i define the event without explicit temporal expression,then expect it with a certain TE, the event should never occur????

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

    Yes, the event has nothing whatsoever to do with the expect. every event occurs when it is emitted or if the temporal expression of the EVENT succeeds.you seem to think that the name associates the event with the expect. This is not the case. If you want an event on a temporal expression just do "event xyz is TE"
    -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