Sequence to check signal is high for 1 clock cycle and the low throughout the simulation

In reply to probilkumar:


module m;
  let n=2**30; 
  bit a, clk; 
  sequence q;
     !a ##1 a[*n]; 
  endsequence 
  initial ap_init: assert property(@(posedge clk) q);  
endmodule
// See 1800'2017 11.4.3 Arithmetic operators 
//               Table 11-6—Examples of modulus and power operators
//  a ** b is a to the power of b
 

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr

** 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
  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
    Real Chip Design and Verification Using Verilog and VHDL($3) Amazon.com
  3. Papers: