Net arrays that are addressed are not dangling
The nodangle functor tries to delete NetNet objects that are not used. But NetNet objects that are addressed by a NetArrayDq should never be dangling. So make sure the NetArrayDq marks the target NetNet correctly.
This commit is contained in:
parent
e46f8220f3
commit
59ee700634
|
|
@ -1217,6 +1217,7 @@ void Design::dump(ostream&o) const
|
|||
if (nodes_) {
|
||||
NetNode*cur = nodes_->node_next_;
|
||||
do {
|
||||
assert(cur);
|
||||
cur->dump_node(o, 0);
|
||||
cur = cur->node_next_;
|
||||
} while (cur != nodes_->node_next_);
|
||||
|
|
|
|||
|
|
@ -1132,6 +1132,9 @@ NetArrayDq::NetArrayDq(NetScope*s, perm_string n, NetNet*mem, unsigned awid)
|
|||
pin(0).set_name(perm_string::literal("Result"), 0);
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("Address"), 0);
|
||||
// Increment the expression reference count for the target
|
||||
// memory so that it is not deleted underneath me.
|
||||
mem->incr_eref();
|
||||
}
|
||||
|
||||
NetArrayDq::~NetArrayDq()
|
||||
|
|
|
|||
Loading…
Reference in New Issue