From 31b75987ca6908ed88c02567f1fcd28e84a45c70 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 8 Aug 2017 20:57:31 -0700 Subject: [PATCH] Avoid width warning --- scripts/vlsi_mem_gen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vlsi_mem_gen b/scripts/vlsi_mem_gen index b1374820..3e3600e0 100755 --- a/scripts/vlsi_mem_gen +++ b/scripts/vlsi_mem_gen @@ -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))))