From 3702e17b2e0238d89caf7ae67ae67cd7d1bb626f Mon Sep 17 00:00:00 2001 From: Johan Bjork Date: Sat, 10 Oct 2015 07:54:45 -0400 Subject: [PATCH] Backout bug978 fix as is incomplete. Signed-off-by: Wilson Snyder --- Changes | 2 -- src/V3LinkCells.cpp | 36 +++++++---------------------- test_regress/t/t_array_interface.pl | 2 ++ 3 files changed, 10 insertions(+), 30 deletions(-) diff --git a/Changes b/Changes index b9f225d21..418720645 100644 --- a/Changes +++ b/Changes @@ -21,8 +21,6 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix mis-optimizing public DPI functions, bug963. [Wei Song] -**** Fix internal error on interface array, bug978. [Johan Bjork] - * Verilator 3.876 2015-08-12 diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index 1dbe0656a..9276b874c 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -348,34 +348,14 @@ private: // This is quite similar to how classes work; when unpacked classes are better supported // may remap interfaces to be more like a class. if (!nodep->hasIfaceVar()) { - if (nodep->rangep()) { - int count = nodep->rangep()->lsbConst(); - for (int i = 0; i < count; i++) { - string varName = nodep->name() + "__BRA__" + cvtToStr(i) + "__KET__" + - "__Viftop"; // V3LinkDot looks for this naming - AstIfaceRefDType *idtypep = new AstIfaceRefDType(nodep->fileline(), - nodep->name(), - nodep->modp()->name()); - idtypep->cellp(nodep); // Only set when real parent cell known - idtypep->ifacep(NULL); // cellp overrides - AstVar *varp = new AstVar(nodep->fileline(), AstVarType::IFACEREF, varName, - VFlagChildDType(), idtypep); - varp->isIfaceParent(true); - nodep->addNextHere(varp); - nodep->hasIfaceVar(true); - } - } else { - string varName = nodep->name() + "__Viftop"; // V3LinkDot looks for this naming - AstIfaceRefDType *idtypep = new AstIfaceRefDType(nodep->fileline(), nodep->name(), - nodep->modp()->name()); - idtypep->cellp(nodep); // Only set when real parent cell known - idtypep->ifacep(NULL); // cellp overrides - AstVar *varp = new AstVar(nodep->fileline(), AstVarType::IFACEREF, varName, - VFlagChildDType(), idtypep); - varp->isIfaceParent(true); - nodep->addNextHere(varp); - nodep->hasIfaceVar(true); - } + string varName = nodep->name()+"__Viftop"; // V3LinkDot looks for this naming + AstIfaceRefDType* idtypep = new AstIfaceRefDType(nodep->fileline(), nodep->name(), nodep->modp()->name()); + idtypep->cellp(nodep); // Only set when real parent cell known + idtypep->ifacep(NULL); // cellp overrides + AstVar* varp = new AstVar(nodep->fileline(), AstVarType::IFACEREF, varName, VFlagChildDType(), idtypep); + varp->isIfaceParent(true); + nodep->addNextHere(varp); + nodep->hasIfaceVar(true); } } if (nodep->modp()) { diff --git a/test_regress/t/t_array_interface.pl b/test_regress/t/t_array_interface.pl index f91289753..c14f759cd 100755 --- a/test_regress/t/t_array_interface.pl +++ b/test_regress/t/t_array_interface.pl @@ -7,6 +7,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. +$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug978"); + compile ( );