• 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. Why does this assertion behave like this?

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 65
  • Views 10864
  • 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

Why does this assertion behave like this?

wrugg25
wrugg25 over 3 years ago

Hi everyone!

I'm currently watching the lessons for the "SystemVerilog Assertions" course, and while doing the lab exercises I incurred in a behaviour which I can not understand. In lab 4, which requires to work on a SPI-like communication module, I need to cover a specific case in which the transaction's header (i.e. the first 8 bits of the transactions, which arrive LSB first starting from the clock cycle after the one in which the "frame" signal is asserted) does not correspond to any known sequence. Let's assume I write my code like this (not exactly what the lab asks for, but this way it's simpler to explain my issue):

localparam cfg = 8'b11001101;

...

sequence check_header(header);
     int i = 0;

    (serial == header[i], i++) [*8];
endsequence

...

cvg_ukn: assert property ( @(posedge clk iff !suspend) (
             $rose(frame) |=> not(check_header(cfg))
      )
);

 

What happens when I simulate is that the assertion becomes active when frame's rising is detected (the design is edge-negative, so the assertion detects it on the next rising clock edge), but then in the next cycle it becomes inactive! I do not understand: why does it become inactive? Is there something in the meaning of my consequent that I do not understand? Is there some tool configuration conflicting with what I wrote?

I now that the same property can be written in other ways (I know how to do that too), but I would really like to understand what's going on here.


(As side information, I'm working on Xcelium 21.03 and I run it with the command "xrun -64bit -SV -gui -access +rwc -svseed 1 -linedebug -abvrecordcoverall -input nc_input.tcl
spi.sv spi_test.sv top.sv" provided as a default script together with the labs files)



EDIT: I tried a run with QuestaSim and the assertion works, so I'm starting to think it must be something related to Xcelium...

  • Cancel
  • StephenH
    StephenH over 3 years ago

    Without seeing your stimulus, I'm not sure what's happening here. Could it be related to the semantics on the not() on a sequence (IEEE1800-2017 clause 16.12.3)?

    Can you make a single-file example including some stimulus to reproduce the issue and share it here?

    • 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