In reply to Have_A_Doubt:
I would say YES to both.
From 1800’2017:4.5 SystemVerilog simulation
execute_time_slot {
execute_region (Preponed);
execute_region (Pre-Active);
while (any region in [Active ... Pre-Postponed] is nonempty) {
while (any region in [Active ... Post-Observed] is nonempty) {
execute_region (Active);
R = first nonempty region in [Active ... Post-Observed];
if (R is nonempty)
move events in R to the Active region; // **1**
}
while (any region in [Reactive ... Post-Re-NBA] is nonempty) {
execute_region (Reactive);
R = first nonempty region in [Reactive ... Post-Re-NBA];
if (R is nonempty)
move events in R to the Reactive region;
}
if (all regions in [Active ... Post-Re-NBA] are empty)
execute_region (Pre-Postponed);
}
execute_region (Postponed);
}
With your code:
sequence sr1;
@( posedge clk ) req ##2 gnt ;
endsequence
always @( sr1 ) // Doubt regarding the triggering
$display(" TIME : %3t Sequence sr1 completes " , $time)
The @(posedge clk) start the time step. Within that time step you have all these regions.
In the Observed region sr1 is evaluated to be a match or no-match.
The algortithm says:
R = first nonempty region in [Active … Post-Observed];
if (R is nonempty)
move events in R to the Active region; // 1
In that Active region, in the loop-back, the event @(sr1) is true and the always @( sr1 ) is executed.
That’s how I see it.
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
** SVA Handbook 4th Edition, 2016 ISBN 978-1518681448
…
- SVA Package: Dynamic and range delays and repeats SVA: Package for dynamic and range delays and repeats | Verification Academy
- Free books:
- Component Design by Example FREE BOOK: Component Design by Example … A Step-by-Step Process Using VHDL with UART as Vehicle | Verification Academy
- Real Chip Design and Verification Using Verilog and VHDL($3) https://rb.gy/cwy7nb
- A Pragmatic Approach to VMM Adoption
http://SystemVerilog.us/vf/VMM/VMM_pdf_release070506.zip
http://SystemVerilog.us/vf/VMM/VMM_code_release_071806.tar
- Papers:
Understanding the SVA Engine,
Verification Horizons - July 2020 | Verification Academy
Reflections on Users’ Experiences with SVA, part 1
Reflections on Users’ Experiences with SVA | Verification Horizons - March 2022 | Verification Academy
Reflections on Users’ Experiences with SVA, part 2
Reflections on Users’ Experiences with SVA, Part II | Verification Horizons - July 2022 | Verification Academy
Understanding and Using Immediate Assertions
Understanding and Using Immediate Assertions | Verification Horizons - December 2022 | Verification Academy
SUPPORT LOGIC AND THE ALWAYS PROPERTY
http://systemverilog.us/vf/support_logic_always.pdf
SVA Alternative for Complex Assertions
Verification Horizons - March 2018 Issue | Verification Academy
SVA in a UVM Class-based Environment
SVA in a UVM Class-based Environment | Verification Horizons | Verification Academy
SVA for statistical analysis of a weighted work-conserving prioritized round-robin arbiter.
https://verificationacademy.com/forums/coverage/sva-statistical-analysis-weighted-work-conserving-prioritized-round-robin-arbiter.
Udemy courses by Srinivasan Venkataramanan (http://cvcblr.com/home.html)
https://www.udemy.com/course/sva-basic/
https://www.udemy.com/course/sv-pre-uvm/