In reply to hisingh:
The disable iff ( ! reset ) is asynchronous.
From my SVA book:
To provide a synchronous abort, three not identical options with specific implications can be used: 1) With the sync_accept_on (see 3.9.14); for example:
ap_sync: assert property(@ (posedge clk)
sync_accept_on (!rst_n) // If rst_n==0 then assertion is vacuously true
a |-> ##3 b);
With a sampled valued function (see 4.2.1.2); for example :
ap_dis_sync: assert property(@ (posedge clk) // If synchronous fell(rst_n)
disable iff ($fell(!rst_n, @(posedge clk))) // then assertion is cancelled
a |-> ##3 b);
/* Note that this approach is not always ideal, particularly for designs where the reset signal is active low and is generated from a power supply circuit and is maintained in the zero state until the supply voltage is stable (e.g., at 5V). In this case, there is no $fell(!rst_n); $rose(!rst_n) would work, but any future resets would be problematic since they would not emulate RTL logic.*/
Ben is there a way to check the aysnchronous part via reports ( $display() ) .
For example ::
// Within procedural blocks
always @( negedge rst_n , posedge clk )
begin
if ( ! rst_n ) begin
$display($time,,,"...") ; // Can report N check that reset was asynchronous
// Drive initial values to signals
end
else
begin
// Non - Reset Logic here
.............................
end
end
Similarly can we have a report specifically when the reset is asserted in the concurrent assertion ?
always @( negedge rst_n , posedge clk )
begin
if ( ! rst_n ) begin
assert ( ! rsn ) $display($time,,,"...") ; // Immediate assertion .
// Drive initial values to signals
end
else
begin
// Non - Reset Logic here
.............................
end
end
I was looking for a way in concurrent assertion written outside procedural block. Like in the example at the top .
always @( negedge rst_n , posedge clk )
begin
if ( ! rst_n ) begin
c_reset: cover(1) $display($time,,,"...") ; // Immediate assertion .
// Since you know that rst_n==0, you can use "1"
// but cover or assert of rst_n is OK too
// Drive initial values to signals
end
else
begin
// Non - Reset Logic here
.............................
end
end
// concurrent assertion statement; it needs a clocking event
cp: cover property(@(negedge rst_n) 1); // negedge rst_n occurred