How to check the module was reset by reading/writing registers?

Hi,

Can someone please help me how to check the module was reset by reading/writing registers?
Thank you.

-Sruthi.

In reply to sruthikrapa:

Can someone please help me how to check the module was reset by reading/writing registers?

Have you considered assertions?


  int a, b; 
  bit clk, c, d, reset_n; 
  initial begin // use initial if upon boot. 
    @(posedge reset_n) 
    a_abcd: assert (a==0 && b==0 && c==0 && d==0); // check when reset_n is deactivated 
  end

  // if reset_n can occur during a simulation run 
  // use a concurrent assertion 
  ap_resetn: assert property(@(posedge reset_n) // when reset_n is deactivated 
           a==0 && b==0 && c==0 && d==0 );  

  ap_at_resetn: assert property(@(posedge clk) // assuming synchronous reset
              reset_n==0)  |=>   a==0 && b==0 && c==0 && d==0); // change is at next cycle 
 

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