Fix UNOPTFLAT warning from initial static var (#3406)

Signed-off-by: Kamil Rakoczy <[email protected]>
This commit is contained in:
Kamil Rakoczy
2022-05-06 10:24:03 +02:00
committed by GitHub
parent 3d762282b9
commit 9378259779
3 changed files with 57 additions and 2 deletions
+5 -2
View File
@@ -1133,6 +1133,10 @@ class OrderProcess final : VNDeleter {
return name;
}
bool nodeIsInitial(const OrderLogicVertex* LVtxp) {
return LVtxp && (VN_IS(LVtxp->nodep(), Initial) || VN_IS(LVtxp->nodep(), InitialStatic));
}
void nodeMarkCircular(OrderVarVertex* vertexp, OrderEdge* edgep) {
// To be marked circular requires being a clock assigned in a delayed assignment, or
// having a cutable in or out edge, none of which is true for the DPI export trigger.
@@ -1146,8 +1150,7 @@ class OrderProcess final : VNDeleter {
toLVtxp = dynamic_cast<OrderLogicVertex*>(edgep->top());
}
//
if ((fromLVtxp && VN_IS(fromLVtxp->nodep(), Initial))
|| (toLVtxp && VN_IS(toLVtxp->nodep(), Initial))) {
if (nodeIsInitial(fromLVtxp) || nodeIsInitial(toLVtxp)) {
// IEEE does not specify ordering between initial blocks, so we
// can do whatever we want. We especially do not want to
// evaluate multiple times, so do not mark the edge circular