Hi
Can anyone tell me please if the following is legal?
clocking cb1 @(posedge clk);
property p1;
(counter != 0);
endproperty
assert property(p1)
else begin
repeat(5)@(posedge clk)
$error(“testing mce_wait feature…”);
end
endclocking // cb1
Can I have an assert statement inside a clocking block?
rshrig
2
Not sure, if its legal.
Nevertheless, I am curious as to why you want have assertions within a clocking block…
In “my opinion” clocking block helps in :
- Avoiding race condition b/w RTL & Testbench codes.
- Introducing skew which helps in convenient waveform inspection + point #1 benefit.
In reply to laureen.giac:
ben2
3
In reply to rshrig:
The syntax found in 1800 defines what is legal. Specificaly,
clocking_item ::=
default default_skew ;
| clocking_direction list_of_clocking_decl_assign ;
| { attribute_instance } assertion_item_declaration
assertion_item_declaration ::=
property_declaration
| sequence_declaration
| let_declaration
// Note that declarations are NOT assertion statements that include:
concurrent_assertion_statement ::=
assert_property_statement
| assume_property_statement
| cover_property_statement
| cover_sequence_statement
| restrict_property_statement
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr
- VF Horizons:PAPER: SVA Alternative for Complex Assertions | Verification Academy
- http://systemverilog.us/vf/SolvingComplexUsersAssertions.pdf
- “Using SVA for scoreboarding and TB designs”
http://systemverilog.us/papers/sva4scoreboarding.pdf
- “Assertions Instead of FSMs/logic for Scoreboarding and Verification”
October 2013 | Volume 9, Issue 3 | Verification Academy
- SVA in a UVM Class-based Environment
SVA in a UVM Class-based Environment | Verification Horizons | Verification Academy