Issue #499
%Error: Internal Error: ...: ../V3Slice.cpp:418: Couldn't find a VarRef on the LHSP of an Assign
| Status: | Closed | Start date: | 04/28/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Wilson Snyder | % Done: | 0% |
|
| Category: | TranslationError | |||
| Target version: | - |
Description
After bug498 fix, I am getting this internal error.
Source code:
syncram the_syncram
(
.address_a (wraddress),
.address_b (rdaddress),
.clock0 (clock),
...
The error is on the last line.
clock0 is declared as:
module syncram (
wren_a,
wren_b,
rden_a,
rden_b,
data_a,
data_b,
address_a,
address_b,
clock0,
clock1,
...
input clock0;
...
tri1 clock0;
History
Updated by Alex Solomatnikov about 1 year ago
gdb backtrace:
dot -Tps -o ~/a.ps obj_dir/Vddr3_ctlr_m0_q11_1sp2_31_task_call.dot
Breakpoint 1, SliceVisitor::findImplicit (this=0x7fffffffa9c0, nodep=0x432609d0) at ../V3Slice.cpp:419
419 nodep->v3fatalSrc("Couldn't find a VarRef on the LHSP of an Assign");
(gdb) bt
#0 SliceVisitor::findImplicit (this=0x7fffffffa9c0, nodep=0x432609d0) at ../V3Slice.cpp:419
#1 0x00000000005e0f4a in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0x432609d0) at ../V3Slice.cpp:430
#2 0x0000000000474b43 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x432609d0, vup=0x0) at ./V3Ast__gen_visitor.h:16
#3 0x000000000042e221 in AstAssignW::accept (this=0x432609d0, v=..., vup=0x0) at ../V3AstNodes.h:1474
#4 0x00000000004875eb in AstNode::iterateAndNext (this=0x3f4404c0, v=..., vup=0x0) at ../V3Ast.cpp:776
#5 0x0000000000487465 in AstNode::iterateChildren (this=0x3b3a2600, v=..., vup=0x0) at ../V3Ast.cpp:758
#6 0x00000000005e12ee in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0x3b3a2600) at ../V3Slice.cpp:490
#7 0x00000000004777c3 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x3b3a2600, vup=0x0) at ./V3Ast__gen_visitor.h:195
#8 0x0000000000491273 in AstScope::accept (this=0x3b3a2600, v=..., vup=0x0) at ../V3AstNodes.h:878
#9 0x00000000004875eb in AstNode::iterateAndNext (this=0x3b3a2600, v=..., vup=0x0) at ../V3Ast.cpp:776
#10 0x0000000000487465 in AstNode::iterateChildren (this=0x3f43d5b0, v=..., vup=0x0) at ../V3Ast.cpp:758
#11 0x00000000005e12ee in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0x3f43d5b0) at ../V3Slice.cpp:490
#12 0x0000000000477e83 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x3f43d5b0, vup=0x0) at ./V3Ast__gen_visitor.h:222
#13 0x00000000005dc8d5 in AstTopScope::accept (this=0x3f43d5b0, v=..., vup=0x0) at ../V3AstNodes.h:906
#14 0x00000000004875eb in AstNode::iterateAndNext (this=0x153131c0, v=..., vup=0x0) at ../V3Ast.cpp:776
#15 0x0000000000487465 in AstNode::iterateChildren (this=0x15313000, v=..., vup=0x0) at ../V3Ast.cpp:758
#16 0x00000000005e12ee in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0x15313000) at ../V3Slice.cpp:490
#17 0x0000000000476a43 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x15313000, vup=0x0) at ./V3Ast__gen_visitor.h:141
#18 0x0000000000476483 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x15313000, vup=0x0) at ./V3Ast__gen_visitor.h:117
#19 0x000000000042b81f in AstModule::accept (this=0x15313000, v=..., vup=0x0) at ../V3AstNodes.h:1046
#20 0x00000000004875eb in AstNode::iterateAndNext (this=0x15313000, v=..., vup=0x0) at ../V3Ast.cpp:776
#21 0x000000000048743d in AstNode::iterateChildren (this=0xab7bc0, v=..., vup=0x0) at ../V3Ast.cpp:757
#22 0x00000000005e12ee in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0xab7bc0) at ../V3Slice.cpp:490
#23 0x0000000000476703 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0xab7bc0, vup=0x0) at ./V3Ast__gen_visitor.h:127
#24 0x0000000000474381 in AstNetlist::accept (this=0xab7bc0, v=..., vup=0x0) at ../V3AstNodes.h:4183
#25 0x00000000005e1387 in SliceVisitor::SliceVisitor (this=0x7fffffffa9c0, rootp=0xab7bc0) at ../V3Slice.cpp:498
#26 0x00000000005decf6 in V3Slice::sliceAll (rootp=0xab7bc0) at ../V3Slice.cpp:508
#27 0x0000000000470328 in process () at ../Verilator.cpp:331
#28 0x0000000000472f1c in main (argc=212, argv=0x7fffffffb2f8, env=0x7fffffffb9a0) at ../Verilator.cpp:672
(gdb) p *nodep
$1 = {<AstNodeStmt> = {<AstNode> = {_vptr.AstNode = 0x66b950, m_nextp = 0x43260f80, m_backp = 0x43260470, m_op1p = 0x438b7990, m_op2p = 0x43260b90, m_op3p = 0x0, m_op4p = 0x0, m_iterpp = 0x7fffffffa468, m_headtailp = 0x0,
m_fileline = 0xb25ef80, m_editCount = 7088411, static s_editCntGbl = 7899139, static s_editCntLast = 7899139, m_clonep = 0x3b834570, m_cloneCnt = 106458, static s_cloneCntGbl = 140283, m_numeric = 0, m_didWidth = false,
m_doingWidth = false, m_width = 1, m_widthMin = 1, m_user1p = 0x1, m_user1Cnt = 817, m_user2Cnt = 0, m_user2p = 0x0, m_user3p = 0x0, m_user3Cnt = 0, m_user4Cnt = 0, m_user4p = 0x0, m_user5p = 0x0,
m_user5Cnt = 0}, <No data fields>}, <No data fields>}
(gdb) p nodep->backp()->prettyTypeName()
$2 = "ASSIGNW"
(gdb) up
#1 0x00000000005e0f4a in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0x432609d0) at ../V3Slice.cpp:430
430 findImplicit(nodep);
(gdb) up
#2 0x0000000000474b43 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x432609d0, vup=0x0) at ./V3Ast__gen_visitor.h:16
16 virtual void visit(AstAssignW* nodep, AstNUser* vup) { visit((AstNodeAssign*)(nodep),vup); }
(gdb) up
#3 0x000000000042e221 in AstAssignW::accept (this=0x432609d0, v=..., vup=0x0) at ../V3AstNodes.h:1474
1474 ASTNODE_NODE_FUNCS(AssignW, ASSIGNW)
(gdb) up
#4 0x00000000004875eb in AstNode::iterateAndNext (this=0x3f4404c0, v=..., vup=0x0) at ../V3Ast.cpp:776
776 niterp->accept(v, vup);
(gdb) up
#5 0x0000000000487465 in AstNode::iterateChildren (this=0x3b3a2600, v=..., vup=0x0) at ../V3Ast.cpp:758
758 if (m_op2p) m_op2p->iterateAndNext(v, vup);
(gdb) up
#6 0x00000000005e12ee in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0x3b3a2600) at ../V3Slice.cpp:490
490 nodep->iterateChildren(*this);
(gdb) p *nodep
$3 = {_vptr.AstNode = 0x693550, m_nextp = 0x0, m_backp = 0x3f43d5b0, m_op1p = 0x3f43d670, m_op2p = 0x3f4404c0, m_op3p = 0x0, m_op4p = 0x0, m_iterpp = 0x7fffffffa5a8, m_headtailp = 0x3b3a2600, m_fileline = 0x5652380,
m_editCount = 6973631, static s_editCntGbl = 7899139, static s_editCntLast = 7899139, m_clonep = 0x0, m_cloneCnt = 0, static s_cloneCntGbl = 140283, m_numeric = 0, m_didWidth = false, m_doingWidth = false, m_width = 0,
m_widthMin = 0, m_user1p = 0x68, m_user1Cnt = 815, m_user2Cnt = 0, m_user2p = 0x0, m_user3p = 0x0, m_user3Cnt = 0, m_user4Cnt = 0, m_user4p = 0x0, m_user5p = 0x0, m_user5Cnt = 0}
(gdb) p nodep->backp()->prettyTypeName()
$4 = "TOPSCOPE"
(gdb) up
#7 0x00000000004777c3 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x3b3a2600, vup=0x0) at ./V3Ast__gen_visitor.h:195
195 virtual void visit(AstScope* nodep, AstNUser* vup) { visit((AstNode*)(nodep),vup); }
(gdb)
#8 0x0000000000491273 in AstScope::accept (this=0x3b3a2600, v=..., vup=0x0) at ../V3AstNodes.h:878
878 ASTNODE_NODE_FUNCS(Scope, SCOPE)
(gdb)
#9 0x00000000004875eb in AstNode::iterateAndNext (this=0x3b3a2600, v=..., vup=0x0) at ../V3Ast.cpp:776
776 niterp->accept(v, vup);
(gdb)
#10 0x0000000000487465 in AstNode::iterateChildren (this=0x3f43d5b0, v=..., vup=0x0) at ../V3Ast.cpp:758
758 if (m_op2p) m_op2p->iterateAndNext(v, vup);
(gdb)
#11 0x00000000005e12ee in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0x3f43d5b0) at ../V3Slice.cpp:490
490 nodep->iterateChildren(*this);
(gdb) p *nodep
$5 = {_vptr.AstNode = 0x6dabf0, m_nextp = 0x438c05a0, m_backp = 0x3ace55b0, m_op1p = 0x0, m_op2p = 0x3b3a2600, m_op3p = 0x0, m_op4p = 0x0, m_iterpp = 0x7fffffffa6e8, m_headtailp = 0x0, m_fileline = 0x5652380, m_editCount = 7023461,
static s_editCntGbl = 7899139, static s_editCntLast = 7899139, m_clonep = 0x0, m_cloneCnt = 0, static s_cloneCntGbl = 140283, m_numeric = 0, m_didWidth = false, m_doingWidth = false, m_width = 0, m_widthMin = 0, m_user1p = 0x0,
m_user1Cnt = 0, m_user2Cnt = 0, m_user2p = 0x0, m_user3p = 0x0, m_user3Cnt = 0, m_user4Cnt = 0, m_user4p = 0x0, m_user5p = 0x0, m_user5Cnt = 0}
(gdb) p nodep->backp()->prettyTypeName()
$6 = "VAR 'v.ddr3_ctlr_m0_q11_1sp2_inst.crosser_003.clock_xer.out_to_in_synchronizer.dreg'"
(gdb) up
#12 0x0000000000477e83 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x3f43d5b0, vup=0x0) at ./V3Ast__gen_visitor.h:222
222 virtual void visit(AstTopScope* nodep, AstNUser* vup) { visit((AstNode*)(nodep),vup); }
(gdb)
#13 0x00000000005dc8d5 in AstTopScope::accept (this=0x3f43d5b0, v=..., vup=0x0) at ../V3AstNodes.h:906
906 ASTNODE_NODE_FUNCS(TopScope, TOPSCOPE)
(gdb)
#14 0x00000000004875eb in AstNode::iterateAndNext (this=0x153131c0, v=..., vup=0x0) at ../V3Ast.cpp:776
776 niterp->accept(v, vup);
(gdb)
#15 0x0000000000487465 in AstNode::iterateChildren (this=0x15313000, v=..., vup=0x0) at ../V3Ast.cpp:758
758 if (m_op2p) m_op2p->iterateAndNext(v, vup);
(gdb)
#16 0x00000000005e12ee in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0x15313000) at ../V3Slice.cpp:490
490 nodep->iterateChildren(*this);
(gdb) p *nodep
$7 = {_vptr.AstNode = 0x66c6f0, m_nextp = 0xd571590, m_backp = 0xab7bc0, m_op1p = 0x0, m_op2p = 0x153131c0, m_op3p = 0x0, m_op4p = 0x0, m_iterpp = 0x7fffffffa868, m_headtailp = 0x6338540, m_fileline = 0x5652380,
m_editCount = 3714904, static s_editCntGbl = 7899139, static s_editCntLast = 7899139, m_clonep = 0x0, m_cloneCnt = 0, static s_cloneCntGbl = 140283, m_numeric = 0, m_didWidth = false, m_doingWidth = false, m_width = 0,
m_widthMin = 0, m_user1p = 0x435eccd0, m_user1Cnt = 808, m_user2Cnt = 468, m_user2p = 0x0, m_user3p = 0x0, m_user3Cnt = 0, m_user4Cnt = 0, m_user4p = 0x0, m_user5p = 0x0, m_user5Cnt = 0}
(gdb) p nodep->backp()->prettyTypeName()
$8 = "NETLIST"
(gdb) up
#17 0x0000000000476a43 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x15313000, vup=0x0) at ./V3Ast__gen_visitor.h:141
141 virtual void visit(AstNodeModule* nodep, AstNUser* vup) { visit((AstNode*)(nodep),vup); }
(gdb) up
#18 0x0000000000476483 in AstNVisitor::visit (this=0x7fffffffa9c0, nodep=0x15313000, vup=0x0) at ./V3Ast__gen_visitor.h:117
117 virtual void visit(AstModule* nodep, AstNUser* vup) { visit((AstNodeModule*)(nodep),vup); }
(gdb) up
#19 0x000000000042b81f in AstModule::accept (this=0x15313000, v=..., vup=0x0) at ../V3AstNodes.h:1046
1046 ASTNODE_NODE_FUNCS(Module, MODULE)
(gdb) up
#20 0x00000000004875eb in AstNode::iterateAndNext (this=0x15313000, v=..., vup=0x0) at ../V3Ast.cpp:776
776 niterp->accept(v, vup);
(gdb) up
#21 0x000000000048743d in AstNode::iterateChildren (this=0xab7bc0, v=..., vup=0x0) at ../V3Ast.cpp:757
757 if (m_op1p) m_op1p->iterateAndNext(v, vup);
(gdb) up
#22 0x00000000005e12ee in SliceVisitor::visit (this=0x7fffffffa9c0, nodep=0xab7bc0) at ../V3Slice.cpp:490
490 nodep->iterateChildren(*this);
(gdb) p *nodep
$9 = {_vptr.AstNode = 0x688030, m_nextp = 0x0, m_backp = 0x0, m_op1p = 0x15313000, m_op2p = 0x0, m_op3p = 0x0, m_op4p = 0x0, m_iterpp = 0x0, m_headtailp = 0xab7bc0, m_fileline = 0xab7cb0, m_editCount = 1,
static s_editCntGbl = 7899139, static s_editCntLast = 7899139, m_clonep = 0x0, m_cloneCnt = 0, static s_cloneCntGbl = 140283, m_numeric = 0, m_didWidth = false, m_doingWidth = false, m_width = 0, m_widthMin = 0, m_user1p = 0x0,
m_user1Cnt = 0, m_user2Cnt = 1, m_user2p = 0x1, m_user3p = 0x0, m_user3Cnt = 0, m_user4Cnt = 3, m_user4p = 0x984e970, m_user5p = 0x0, m_user5Cnt = 0}
(gdb) p nodep->backp()->prettyTypeName()
Program received signal SIGSEGV, Segmentation fault.
0x000000000048432e in AstNode::prettyTypeName (this=0x0) at ../V3Ast.cpp:203
203 if (name()=="") return typeName();
Updated by Wilson Snyder about 1 year ago
- Status changed from New to Assigned
Haven't forgotten about this, while the assertion itself is simple it uncovered a complicated issue.
Updated by Wilson Snyder about 1 year ago
- Category set to TranslationError
- Status changed from Assigned to Resolved
- Assignee set to Wilson Snyder
I think this is fixed, but it uncovered some complicated issues requiring a large fix that might have broken something else.
Also available in: Atom
![[logo]](/img/veripool_small.png)