1
0
Fork 0

Avoid width warning

This commit is contained in:
Andrew Waterman 2017-08-08 20:57:31 -07:00
parent 8705b0e070
commit 31b75987ca
1 changed files with 1 additions and 1 deletions

View File

@ -104,8 +104,8 @@ def gen_mem(name, width, depth, mask_gran, mask_seg, ports):
combinational.append('`ifdef RANDOMIZE_MEM_INIT')
combinational.append(' initial begin')
combinational.append(' #0.002 begin end')
combinational.append(' reg_%sren = $random;' % prefix)
combinational.append(' %srandom = {%s};' % (prefix, ', '.join(['$random'] * ((width-1)//32+1))))
combinational.append(' reg_%sren = %srandom[0];' % (prefix, prefix))
combinational.append(' end')
combinational.append('`endif')
combinational.append('always @(posedge %sclk) %srandom <= {%s};' % (prefix, prefix, ', '.join(['$random'] * ((width-1)//32+1))))