# Assertion to check req holds until ack

**URL:** <https://verificationacademy.com/forums/t/assertion-to-check-req-holds-until-ack/38707>\
**Category:** SystemVerilog\
**Tags:** throughout, SystemVerilog, Assertion-system-verilog, assertion\
**Created:** [February 11, 2021, 2:06am UTC](https://verificationacademy.com/forums/t/assertion-to-check-req-holds-until-ack/38707 "2021-02-11T02:06:44Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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 13, 2021, 7:16am UTC](https://verificationacademy.com/forums/t/assertion-to-check-req-holds-until-ack/38707/7 "2021-02-13T07:16:26Z")

</div>

_In reply to [lisa.lalice](https://verificationacademy.com/forums/t/assertion-to-check-req-holds-until-ack/38707/6):_  
Works for me!

```verilog
ap_reqack: assert property(@(posedge clk) 
          $rose (req) |-> 
               req[*1:$] ##1 !req intersect
               $rose(ack)[->1] ##0 $fell(req));  

```

 ![](https://verificationacademy.com/forums/uploads/default/original/1X/007db144e8ff2b710da3418cae283f27db2033d3.png)

 ![](https://verificationacademy.com/forums/uploads/default/original/1X/007db144e8ff2b710da3418cae283f27db2033d3.png)

```verilog

  module top; 
    timeunit 1ns/10ps;
    `include "uvm_macros.svh"
     import uvm_pkg::*;
     bit clk, req, ack;   
     initial forever #10 clk=!clk;  
     ap_reqack: assert property(@(posedge clk) 
          $rose (req) |-> 
               req[*1:$] ##1 !req intersect
               $rose(ack)[->1] ##0 $fell(req));  
 
      
       initial begin 
         repeat(200) begin 
             @(posedge clk);   
             if (!randomize(req, ack) with 
             { req dist {1'b1:=5, 1'b0:=1};
               ack dist {1'b1:=1, 1'b0:=5};  
         }) `uvm_error("MYERR", "This is a randomize error");
         end 
         $finish; 
        end  
 endmodule     
  

```

---

_[View the full topic](https://verificationacademy.com/forums/t/assertion-to-check-req-holds-until-ack/38707)._
