# A grant must at some time have been preceded by a request

**URL:** <https://verificationacademy.com/forums/t/a-grant-must-at-some-time-have-been-preceded-by-a-request/40033>\
**Category:** SystemVerilog\
**Tags:** RTL, SystemVerilog, ASICIC-Verification-Trends, systemverilog-past\
**Created:** [February 7, 2022, 5:24pm UTC](https://verificationacademy.com/forums/t/a-grant-must-at-some-time-have-been-preceded-by-a-request/40033 "2022-02-07T17:24:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![user49](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/user49/32/4533_2.png) [@user49](https://verificationacademy.com/forums/u/user49)\
**Post date:** [February 7, 2022, 6:41pm UTC](https://verificationacademy.com/forums/t/a-grant-must-at-some-time-have-been-preceded-by-a-request/40033/2 "2022-02-07T18:41:16Z")

</div>

_In reply to [a72](https://verificationacademy.com/forums/t/a-grant-must-at-some-time-have-been-preceded-by-a-request/40033):_

You need to latch the occurrence of req. Thus,

```verilog

    bit clk, req, grnt, req_occurred, reset_n;  

    always @(posedge clk) begin
        if($sampled(req)) req_occurred <= 1'b1; // updated with the $sampled( 
        if($sampled(grnt)) req_occurred <= 1'b0;
    end
   
   ap_grant: assert property(@(posedge clk) $rose(grnt) |-> req_occurred);  

```

Ben Cohen  
[http://www.systemverilog.us/](http://www.systemverilog.us/) [ben@systemverilog.us](mailto:ben@systemverilog.us)  
\*\* SVA Handbook 4th Edition, 2016 ISBN 978-1518681448  
…

1. SVA Package: Dynamic and range delays and repeats [SVA: Package for dynamic and range delays and repeats | Verification Academy](https://rb.gy/a89jlh)
2. 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](https://rb.gy/9tcbhl)  
Real Chip Design and Verification Using Verilog and VHDL($3) [https://rb.gy/cwy7nb](https://rb.gy/cwy7nb)
3. Papers:

- Understanding the SVA Engine,  
[Verification Horizons - July 2020 | Verification Academy](https://verificationacademy.com/verification-horizons/july-2020-volume-16-issue-2)
- SVA Alternative for Complex Assertions  
[Verification Horizons - March 2018 Issue | Verification Academy](https://verificationacademy.com/news/verification-horizons-march-2018-issue)
- SVA in a UVM Class-based Environment  
[SVA in a UVM Class-based Environment | Verification Horizons | Verification Academy](https://verificationacademy.com/verification-horizons/february-2013-volume-9-issue-1/SVA-in-a-UVM-Class-based-Environment)

Udemy courses by Srinivasan Venkataramanan ([http://cvcblr.com/home.html](http://cvcblr.com/home.html))  
[https://www.udemy.com/course/sva-basic/](https://www.udemy.com/course/sva-basic/)  
[https://www.udemy.com/course/sv-pre-uvm/](https://www.udemy.com/course/sv-pre-uvm/)

---

_[View the full topic](https://verificationacademy.com/forums/t/a-grant-must-at-some-time-have-been-preceded-by-a-request/40033)._
