Checking clock toggle after ack signal is high

Need to check a clock toggling/period continuously till the end of simulation when ack is high.
ack is asserted first, then the clock.

Using property(@posedge clock) will not work, since i want ack to be asserted first. Any suggestions?

In reply to abhi9891:
Below is an untested solution. Need to adjust the values for the period, I made it 2x the number of edges.


   realtime period=20ns;
    bit ack;
    initial begin
      bit got_edge;
      wait(ack);
      forever begin : fv1
        fork
          begin #period; end
            begin 
              @(posedge clk) got_edge=1'b1; 
            end    
        join_any
        a_gotclk: assert(got_edge); 
        got_edge=0; 
      end : fv1
    end 

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: