Quantcast
Channel: Cadence Custom IC Design Forum
Viewing all articles
Browse latest Browse all 4929

Shift register random initialization - how to proceed ?

$
0
0

Hello,

For my testbench I need some custom shift register, that randomly initialized. Here below is its code.

Compilation passes, but elaboration doesn't.

Any solution ?

Thanks in advance.

Pavel.

 module Pixel_v0 (input Din, CLK, output Dout );
   parameter SEED = 33;
   reg [15:0] DATA;
   assign Dout = DATA[15];

   initial DATA = random(SEED);

   generate
      genvar  i;
      for (i = 0; i < 15; i=i+1) begin: DFF
     if (i==0)
       always @(posedge CLK)
         DATA[i] <= Din;
     always @(posedge CLK)
       DATA[i+1] <= DATA[i];
      end
   endgenerate

endmodule


Viewing all articles
Browse latest Browse all 4929


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