initialize all SRAMs to avoid X propagation problem
This commit is contained in:
@ -55,6 +55,14 @@ def gen_mem(name, width, depth, ports):
|
||||
tup = (depth, width, nr, nw, nrw, masked)
|
||||
|
||||
decl.append('reg [%d:0] ram [%d:0];' % (width-1, depth-1))
|
||||
decl.append('`ifndef SYNTHESIS')
|
||||
decl.append(' integer initvar;')
|
||||
decl.append(' initial begin')
|
||||
decl.append(' #0.002;')
|
||||
decl.append(' for (initvar = 0; initvar < %d; initvar = initvar+1)' % depth)
|
||||
decl.append(' ram[initvar] = {%d {$random}};' % ((width-1)/32+1))
|
||||
decl.append(' end')
|
||||
decl.append('`endif')
|
||||
|
||||
for pid in readports:
|
||||
decl.append('reg [%d:0] reg_R%dA;' % (addr_width-1, pid))
|
||||
|
Reference in New Issue
Block a user