From c132d0e1fee24f0714748bfdce2cee83b6d501ba Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 2 Oct 2017 22:58:34 -0400 Subject: [PATCH] Fix extra duplicate multiclk blocks when dtypes differ --- src/V3Const.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/V3Const.cpp b/src/V3Const.cpp index 9a98157e9..3540a8967 100644 --- a/src/V3Const.cpp +++ b/src/V3Const.cpp @@ -1693,9 +1693,12 @@ private: // But might be same name with different scopes if (litemp->varrefp()->varScopep() < ritemp->varrefp()->varScopep()) return true; if (litemp->varrefp()->varScopep() > ritemp->varrefp()->varScopep()) return false; + // Or rarely, different data types + if (litemp->varrefp()->dtypep() < ritemp->varrefp()->dtypep()) return true; + if (litemp->varrefp()->dtypep() > ritemp->varrefp()->dtypep()) return false; } // Sort by edge, AFTER variable, as we want multiple edges for same var adjacent - // note the SenTree optimizer requires this order (more general firsst, less general last) + // note the SenTree optimizer requires this order (more general first, less general last) if (litemp->edgeType() < ritemp->edgeType()) return true; if (litemp->edgeType() > ritemp->edgeType()) return false; }