Fix large array initialization (#6669)
This commit is contained in:
parent
6e05361318
commit
19bbeb24a6
|
|
@ -254,6 +254,7 @@ class SliceVisitor final : public VNVisitor {
|
||||||
const int elementLimit = v3Global.opt.fSliceElementLimit();
|
const int elementLimit = v3Global.opt.fSliceElementLimit();
|
||||||
if (elements > elementLimit && elementLimit > 0) {
|
if (elements > elementLimit && elementLimit > 0) {
|
||||||
++m_statSliceElementSkips;
|
++m_statSliceElementSkips;
|
||||||
|
m_okInitArray = true; // VL_RESTORER in visit(AstNodeAssign)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@ module t (/*AUTOARG*/
|
||||||
input clk;
|
input clk;
|
||||||
integer cyc; initial cyc=1;
|
integer cyc; initial cyc=1;
|
||||||
|
|
||||||
|
logic hugemem [257];
|
||||||
|
initial hugemem = '{default:1'b0};
|
||||||
|
|
||||||
// [16] is SV syntax for [0:15]
|
// [16] is SV syntax for [0:15]
|
||||||
reg [7:0] memory8_16 [16];
|
reg [7:0] memory8_16 [16];
|
||||||
|
|
||||||
|
|
@ -41,6 +44,7 @@ module t (/*AUTOARG*/
|
||||||
if (cyc!=0) begin
|
if (cyc!=0) begin
|
||||||
cyc <= cyc + 1;
|
cyc <= cyc + 1;
|
||||||
if (cyc==1) begin
|
if (cyc==1) begin
|
||||||
|
$display(hugemem);
|
||||||
m_we <= 1'b1;
|
m_we <= 1'b1;
|
||||||
m_addr <= 3'd2;
|
m_addr <= 3'd2;
|
||||||
m_data <= 16'h55_44;
|
m_data <= 16'h55_44;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue