From ea78520220149768f807b1049d816b9470c5ff94 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 9 Jun 2009 15:37:52 -0400 Subject: [PATCH] Fix tristates causing "Assigned pin is neither..." --- Changes | 2 ++ src/V3EmitC.cpp | 2 +- src/V3Tristate.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 8a2a8be30..57c247a78 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix segfault on unrolling for's with bad inits, bug90. [Andreas Olofsson] +**** Fix tristates causing "Assigned pin is neither...". [by Lane Brooks] + * Verilator 3.710 2009/05/19 ** Verilator is now licensed under LGPL v3 and/or Artistic v2.0. diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index 13b5219f0..209fd3693 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -1410,7 +1410,7 @@ void EmitCStmts::emitVarList(AstNode* firstp, EisWhich which, const string& pref case EVL_ALL: doit = true; break; case EVL_IO: doit = varp->isIO(); break; case EVL_SIG: doit = (varp->isSignal() && !varp->isIO()); break; - case EVL_TEMP: doit = varp->isTemp(); break; + case EVL_TEMP: doit = (varp->isTemp() && !varp->isIO()); break; default: v3fatalSrc("Bad Case"); } if (varp->isStatic() ? !isstatic : isstatic) doit=false; diff --git a/src/V3Tristate.cpp b/src/V3Tristate.cpp index 2b102f405..eab63c238 100644 --- a/src/V3Tristate.cpp +++ b/src/V3Tristate.cpp @@ -207,6 +207,7 @@ private: AstVarType::MODULETEMP, outrefp->name() + "__en" + suffix + cvtToStr(m_unique++), (width>1) ? new AstRange(outp->fileline(), width-1, 0) : (AstRange *) NULL); + enp->varType2Out(); if (enp->width() != enrhsp->width()) { if (enrhsp->width()==1) { // it seems from my futzing that the linter guarantees this condition