mirror of
https://github.com/verilator/verilator.git
synced 2026-09-04 16:40:12 +02:00
Initial idea was to remodel AssignW as Assign under Alway. Trying that uncovered some issues, the most difficult of them was that a delay attached to a continuous assignment behaves differently from a delay attached to a blocking assignment statement, so we need to keep the knowledge of which flavour an assignment was until V3Timing. So instead of removing AstAssignW, we always wrap it in an AstAlways, with a special `keyword()` type. This makes it into a proper procedural statement, which is almost equivalent to AstAssign, except for the case when they contain a delay. We still gain the benefits of #6280 and can simplify some code. Every AstNodeStmt should now be under an AstNodeProcedure - which we should rename to AstProcess, or an AstNodeFTask). As a result, V3Table can now handle AssignW for free. Also uncovered and fixed a bug in handling intra-assignment delays if a function is present on the RHS of an AssignW. There is more work to be done towards #6280, and potentially simplifying AssignW handing, but this is the minimal change required to tick it off the TODO list for #6280.
This commit is contained in:
+8
-1
@@ -282,7 +282,14 @@ class CoverageVisitor final : public VNVisitor {
|
||||
}
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
|
||||
void visit(AstAlways* nodep) override {
|
||||
if (nodep->keyword() == VAlwaysKwd::CONT_ASSIGN) {
|
||||
// Don't want line coverage for it, iterate for expression/toggle coverage only
|
||||
iterateChildren(nodep);
|
||||
return;
|
||||
}
|
||||
iterateProcedure(nodep);
|
||||
}
|
||||
void visit(AstNodeProcedure* nodep) override { iterateProcedure(nodep); }
|
||||
void visit(AstLoop* nodep) override {
|
||||
UASSERT_OBJ(!nodep->contsp(), nodep, "'contsp' only used before LinkJump");
|
||||
|
||||
Reference in New Issue
Block a user