Jump to content

Recommended Posts

Can we use $display in property assertions,  

  • I am trying to use display statement in the assertion property, as shown below, but I am getting an error as follows

Errors 
Error-[SE] Syntax error
Following verilog source has syntax error :
"/vobs/asic_adc_dac_testchip/hydra_t/SE/assertions/hydra_t_strobe_assertions.sv",
89: token is '$display', column 84
(1, current_time = $time) |=> @(ev_data_delay) ($time - current_time) 
$display("\t **setup_hold_checker**= %d ",($time - current_time) ) > 
(SETUP_TIME+HOLD_TIME);

 

 

property setup_hold_checker;
    time current_time;
    @(posedge (clk ^ CK_EDGE_SEL))
      disable iff (~resetn || disable_assertion)	
      (1, current_time = $time) |=> @(ev_data_delay) ($time - current_time) $display("\t **setup_hold_checker**= %d ",($time - current_time) ) > (SETUP_TIME+HOLD_TIME); 
      
         
  endproperty: setup_hold_checker

 

Share this post


Link to post
Share on other sites

Following code will help you.

  property setup_hold_checker;
    time current_time;
    @(posedge (clk ^ CK_EDGE_SEL))
      disable iff (~resetn || disable_assertion)    
    (1, current_time = $time) |=> @(ev_data_delay) ($time - current_time) ##0 (1,$display("\t **setup_hold_checker**= %t ",(($time - current_time)  > (SETUP_TIME+HOLD_TIME))));

endproperty

Regards,

Mitesh Patel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×