Support "reg x [3][2]".
This commit is contained in:
parent
0d65f08b1d
commit
81915540de
2
Changes
2
Changes
|
|
@ -12,6 +12,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||
|
||||
*** Support "reg [1:0][1:0][1:0]", bug176. [Byron Bradley]
|
||||
|
||||
*** Support "reg x [3][2]".
|
||||
|
||||
*** Support "program".
|
||||
|
||||
* Verilator 3.720 2009/10/26
|
||||
|
|
|
|||
|
|
@ -995,7 +995,7 @@ variable_dimension<rangep>: // ==IEEE: variable_dimension
|
|||
//UNSUP '[' ']' { UNSUP }
|
||||
// // IEEE: unpacked_dimension
|
||||
anyrange { $$ = $1; }
|
||||
| '[' constExpr ']' { $$ = new AstRange($1,$2,$2->cloneTree(true)); }
|
||||
| '[' constExpr ']' { $$ = new AstRange($1,new AstSub($1,$2, new AstConst($1,1)), new AstConst($1,0)); }
|
||||
// // IEEE: associative_dimension
|
||||
//UNSUP '[' data_type ']' { UNSUP }
|
||||
//UNSUP yP_BRASTAR ']' { UNSUP }
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ module t (/*AUTOARG*/
|
|||
input clk;
|
||||
integer cyc; initial cyc=1;
|
||||
|
||||
reg [7:0] memory8_16 [15:0];
|
||||
// [16] is SV syntax for [15:0]
|
||||
reg [7:0] memory8_16 [16];
|
||||
|
||||
reg m_we;
|
||||
reg [3:1] m_addr;
|
||||
|
|
|
|||
Loading…
Reference in New Issue