Quantcast
Channel: UVM Forums RSS Feed
Viewing all articles
Browse latest Browse all 756

assertion to check for an array of channels

$
0
0

Consider the following code and the assertion to check for unknown data.

 

If the code will change so that there will now be an array of valids and datas, what is the best way to change the assertion, so that for each valid, the corresponding data is checked.?

Can I do it one line?   (I had been considering using a generate statement around it.)

module top;

   bit   clk;
   logic write_valid;
   logic write_data;

   always clk = #5 !clk;

   initial begin
      clk=0;
      write_valid=0;
      #7;
      write_valid=1;
      
      #100;
      $finish;
   end

   as_showme : assert property (@(posedge clk) disable iff (!write_valid) (!$isunknown(write_data)) ) else begin
      $display("*** ERROR. write_data was unknown. ***");
   end

endmodule

Viewing all articles
Browse latest Browse all 756

Trending Articles