In reply to bdecelles@ostendo.com:
In reply to ben@SystemVerilog.us:
Hi Ben,
I have not seen any example with the always block inside the checker. This would help some as the checker would only be active after the qualifiers. Is there is an example you can send.
disable iff(t_rst|| !t_pwm_row_en)
$rose(t_pwm_start) |->
I build the simpler checker with an always block for a faction of the design and am waiting for it to complete simulation in order to see the memory usage, but it is really slowing down the simulation.
Many conditions are checked for the test cases with a known relationship of the low and high times for the PWM signal (property below). This might need to be good enough.
// BIT0, D*, DB* are localparam
property p_pwm_value(t_pwm_clk_misp, t_pwm_clk, t_pwm_start, t_pwm_pin, t_pwm_value) ;
@(posedge t_pwm_clk_misp)
disable iff(t_rst || !t_pwm_row_en)
$rose(t_pwm_start) |->
(t_pwm_pin==BIT0) [*D0] ##1 (t_pwm_pin==t_pwm_value[0]) [*DB0] ##1
…
endproperty
The SystemVerilog checker has definite rules. From my SVA Handbook below is one page that summarizes the rules.
- The always is illegal in a checker, you need thealways_ff instead.
- Static assertion. A static assertion is an assertion statement that appears outside procedural code, i.e., not in an always (illegal in a checker), always_ff, initial, or final block; they stand on their own.
- Procedural assertion. A procedural assertion is one that is inside a procedural block, such as one inside an always (illegal in a checker), always_ff, initial, or final block. A final block may only contain immediate assertions, and not concurrent assertions
- There are two types of checker instances.
- - Static checker instance: This represents a checker instantiated outside procedural code.
- Procedural checker instance: This represents a checker instantiated in an always_ff, initial, or final procedural statement.
- checker behavior: see http://SystemVerilog.us/fv/checker_behavior.pdf
- If your always_ff code is more efficient than concurrent assertions, then use a checker.
- If you put a concurrent assertion in a checker, you can then istantiate that checker procedurally in your testbench.
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr
- SVA Handbook 4th Edition, 2016 ISBN 978-1518681448
- Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 978-1539769712
- A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
- Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
- Component Design by Example ", 2001 ISBN 0-9705394-0-1
- VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
- VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115
See Paper: VF Horizons:PAPER: SVA Alternative for Complex Assertions - SystemVerilog - Verification Academy