Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1069

Array Usage Initialization

$
0
0

Hi All,

In the following code, 2nd element is 'h10A0, it must PASS, but it is failing, may I know the reason ?
module typedef_ex;
  bit [2:0] addr [15:0];
  bit [2:0] data [7:0];
  initial begin
    addr[2:0] =  {'h10A0,0,0};
    data[2:0] =  {'h30,0,0};
   
    if (addr[2] == 'h10A0)
      $display("PASS");
     else
       $display("FAIL");
       
  end
endmodule
Thank You,

Viewing all articles
Browse latest Browse all 1069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>