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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...