• 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. System Verilog Assertions

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 65
  • Views 17742
  • 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

System Verilog Assertions

Manasy M
Manasy M over 6 years ago

Hi all,

I have the following scenario for writing assertion.

Signal  'A' rises two cycles after 'B' falling. The high period of 'A' is, 70 + (var_value) clock cycles.

'var_value' is a variable

I wrote two assertions to check this scenario;

1. property A_RISE;
    @(posedge clk) 
    $fell(B) |-> ##2 $rose(A);                                                //to check the dependency of A w.r.t B
    endproperty

    ASSERT_A_RISE : assert property(A_RISE);

2. property A_HIGH_PERIOD;
    @(posedge clk)
     $rose(A) |-> A[*70] ##1 A[*var_value] ##1 !A;           //to check the high period of A;  ERROR: var_value must be a constant
    endproperty

    ASSERT_A_HIGH_PERIOD : assert property(A_HIGH_PERIOD);

Is there any better way to check both dependency and high period together?

How can we use variable cycle delays or sequence repetitions in assertion properties??

I have started to practice system verilog assertions recently only; Please provide me some guidelines to proceed with this.

Thanks

  • Cancel
Parents
  • TAM1
    TAM1 over 6 years ago

    There is an article showing the best way to do this on the Cadence web site:

    Article (11628272) Title: The cycle count in an SVA or PSL assertion must be a compile-time constant
    URL: https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nTuCEAU

    It uses a local variable to hold the number of cycles that A has been high so far.

    property p1;
      int count;
      @(posedge clk)($rose(A),count=0) |-> (A && (count<(70+var_value))),count=count+1)[*]
                                           ##1 (count==(70+var_value) && !A;

    endproperty : p1
    assert property (p1);

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Manasy M
    Manasy M over 6 years ago in reply to TAM1

    Thank you for your guideline. I will try in this way.

    Will go through the article and will get back to you if again I am having some doubts.

    How does the assertions affect simulation time?? Will multi thread assertions slow down the simulation time? If it does, what is the best way of writing assertions, which will avoid this problem?

    Thank you

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Manasy M
    Manasy M over 6 years ago in reply to TAM1

    Thank you for your guideline. I will try in this way.

    Will go through the article and will get back to you if again I am having some doubts.

    How does the assertions affect simulation time?? Will multi thread assertions slow down the simulation time? If it does, what is the best way of writing assertions, which will avoid this problem?

    Thank you

    • 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