Fix hashed error with typedef inside block, bug948.

This commit is contained in:
Wilson Snyder 2015-07-22 19:52:11 -04:00
parent 445c83a60d
commit 2062f7e97b
3 changed files with 10 additions and 0 deletions

View File

@ -17,6 +17,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix $fopen with SV string, bug947. [Sven Stucki]
**** Fix hashed error with typedef inside block, bug948. [Sven Stucki]
* Verilator 3.874 2015-06-06

View File

@ -89,6 +89,7 @@ private:
//--------------------
// Default: Just iterate
virtual void visit(AstVar*, AstNUser*) {}
virtual void visit(AstTypedef*, AstNUser*) {}
virtual void visit(AstNode* nodep, AstNUser*) {
nodeHashIterate(nodep);
}

View File

@ -25,6 +25,13 @@ program t;
//reg [SIZE-1:0] a; initial a =0;
//reg [SIZE-1:0] b; initial b =0;
initial begin
typedef logic [3:0][7:0] instr_mem_t;
instr_mem_t a;
a[0] = 8'h12;
if (a[0] != 8'h12) $stop;
end
integer j;
initial begin
for (j=0;j<=(1<<SIZE);j=j+1) begin