Skip to content

Commit

Permalink
Remove EVENTEXPR and EVENTMT warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Boronski <[email protected]>
  • Loading branch information
kboronski-ant committed Oct 23, 2023
1 parent fd3e1bb commit e7abbeb
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 141 deletions.
4 changes: 1 addition & 3 deletions src/V3Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ class V3ErrorCode final {
ENDLABEL, // End lable name mismatch
ENUMVALUE, // Error: enum type needs explicit cast
EOFNEWLINE, // End-of-file missing newline
EVENTEXPR, // Non-identifier expression used to send an event
EVENTMT, // Dangerous event operation in multithreaded simulation
GENCLK, // Generated Clock. Historical, never issued.
GENUNNAMED, // Generate unnamed, without label
HIERBLOCK, // Ignored hierarchical block setting
Expand Down Expand Up @@ -197,7 +195,7 @@ class V3ErrorCode final {
"CASEINCOMPLETE", "CASEOVERLAP", "CASEWITHX", "CASEX", "CASTCONST", "CDCRSTLOGIC", "CLKDATA",
"CMPCONST", "COLONPLUS", "COMBDLY", "CONSTRAINTIGN", "CONTASSREG",
"DECLFILENAME", "DEFPARAM", "DEPRECATED",
"ENCAPSULATED", "ENDLABEL", "ENUMVALUE", "EOFNEWLINE", "EVENTEXPR", "EVENTMT", "GENCLK",
"ENCAPSULATED", "ENDLABEL", "ENUMVALUE", "EOFNEWLINE", "GENCLK",
"GENUNNAMED", "HIERBLOCK",
"IFDEPTH", "IGNOREDRETURN",
"IMPERFECTSCH", "IMPLICIT", "IMPLICITSTATIC", "IMPORTSTAR", "IMPURE",
Expand Down
27 changes: 0 additions & 27 deletions src/V3LinkDot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2269,25 +2269,6 @@ class LinkDotResolveVisitor final : public VNVisitor {
if (nodep && nodep->isParam()) nodep->usedParam(true);
}

static bool isTreeHierarchicalIdentExpr(AstNode* nodep) {
while (true) {
if (const AstMemberSel* mselp = VN_CAST(nodep, MemberSel)) {
nodep = mselp->fromp();
continue;
}
if (const AstSelBit* selbp = VN_CAST(nodep, SelBit)) {
if (VN_IS(selbp->bitp(), Const)) {
nodep = selbp->fromp();
continue;
} else {
return false;
}
}
break;
}
return VN_IS(nodep, VarRef);
}

// VISITs
void visit(AstNetlist* nodep) override {
// Recurse..., backward as must do packages before using packages
Expand Down Expand Up @@ -3407,14 +3388,6 @@ class LinkDotResolveVisitor final : public VNVisitor {
}
m_ds.m_dotSymp = VL_RESTORER_PREV(m_curSymp);
}
void visit(AstFireEvent* nodep) override {
visit(static_cast<AstNodeStmt*>(nodep));
if (!isTreeHierarchicalIdentExpr(nodep->operandp())) {
nodep->operandp()->v3warn(EVENTEXPR,
"Non-identifier expression used to reference an event to "
"be sent. This is not a part of IEEE 1800-2017.");
}
}
void visit(AstWith* nodep) override {
UINFO(5, " " << nodep << endl);
checkNoDot(nodep);
Expand Down
5 changes: 0 additions & 5 deletions src/V3Width.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4808,11 +4808,6 @@ class WidthVisitor final : public VNVisitor {
if (nodep->hasDType() && nodep->dtypep()->isEvent()) {
checkEventAssignement(nodep);
v3Global.setAssignsEvents();
if (v3Global.opt.threads() > 1) {
nodep->v3warn(EVENTMT,
"Event assignements might cause issues in multithreaded simulation. "
"Use at your own risk.");
}
}
}

Expand Down
6 changes: 0 additions & 6 deletions test_regress/t/t_event_control_assign_mt.out

This file was deleted.

22 changes: 0 additions & 22 deletions test_regress/t/t_event_control_assign_mt.pl

This file was deleted.

14 changes: 0 additions & 14 deletions test_regress/t/t_event_control_assign_mt.v

This file was deleted.

10 changes: 0 additions & 10 deletions test_regress/t/t_event_control_eventexpr_bad.out

This file was deleted.

20 changes: 0 additions & 20 deletions test_regress/t/t_event_control_eventexpr_bad.pl

This file was deleted.

32 changes: 0 additions & 32 deletions test_regress/t/t_event_control_eventexpr_bad.v

This file was deleted.

2 changes: 1 addition & 1 deletion test_regress/t/t_event_control_pass.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
scenarios(simulator => 1);

compile(
verilator_flags2 => ["--exe --main --timing -Wno-EVENTEXPR"],
verilator_flags2 => ["--exe --main --timing"],
make_main => 0,
threads => 1,
);
Expand Down
1 change: 0 additions & 1 deletion test_regress/t/t_uvm_todo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
v_flags2 => ["--timing",
"-Wno-PKGNODECL -Wno-IMPLICITSTATIC -Wno-CONSTRAINTIGN -Wno-MISINDENT",
"-Wno-CASEINCOMPLETE -Wno-CASTCONST -Wno-SYMRSVDWORD -Wno-WIDTHEXPAND -Wno-WIDTHTRUNC",
"-Wno-EVENTEXPR",
"-Wno-REALCVT", # TODO note mostly related to $realtime - could suppress or fix upstream
"-Wno-ZERODLY", # TODO issue #4494, add support
],
Expand Down

0 comments on commit e7abbeb

Please sign in to comment.