From 84c7795d166e1ea0fbefecfeeb7d272434d9b3c9 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 17 Feb 2001 05:15:33 +0000 Subject: [PATCH] Allow task ports to be given real types. --- elab_sig.cc | 6 +++++- pform.cc | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/elab_sig.cc b/elab_sig.cc index 0da41d735..a469450a4 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: elab_sig.cc,v 1.11 2001/02/10 20:29:39 steve Exp $" +#ident "$Id: elab_sig.cc,v 1.12 2001/02/17 05:15:33 steve Exp $" #endif # include "Module.h" @@ -311,6 +311,7 @@ void PWire::elaborate_sig(Design*des, NetScope*scope) const unsigned wid = 1; long lsb = 0, msb = 0; + assert(msb_.count() == lsb_.count()); if (msb_.count()) { svectormnum (msb_.count()); svectorlnum (msb_.count()); @@ -413,6 +414,9 @@ void PWire::elaborate_sig(Design*des, NetScope*scope) const /* * $Log: elab_sig.cc,v $ + * Revision 1.12 2001/02/17 05:15:33 steve + * Allow task ports to be given real types. + * * Revision 1.11 2001/02/10 20:29:39 steve * In the context of range declarations, use elab_and_eval instead * of the less robust eval_const methods. diff --git a/pform.cc b/pform.cc index a2d7af53e..ffed30bab 100644 --- a/pform.cc +++ b/pform.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: pform.cc,v 1.73 2001/01/15 00:47:01 steve Exp $" +#ident "$Id: pform.cc,v 1.74 2001/02/17 05:15:33 steve Exp $" #endif # include "compiler.h" @@ -645,14 +645,21 @@ void pform_makewire(const vlltype&li, const string&nm, const string name = scoped_name(nm); PWire*cur = pform_cur_module->get_wire(name); if (cur) { - if (cur->get_wire_type() != NetNet::IMPLICIT) { + if ((cur->get_wire_type() != NetNet::IMPLICIT) + && (cur->get_wire_type() != NetNet::IMPLICIT_REG)) { strstream msg; msg << name << " previously defined at " << cur->get_line() << "." << ends; VLerror(msg.str()); } else { bool rc = cur->set_wire_type(type); - assert(rc); + if (rc == false) { + strstream msg; + msg << name << " definition conflicts with " + << "definition at " << cur->get_line() + << "." << ends; + VLerror(msg.str()); + } } return; } @@ -1003,6 +1010,9 @@ int pform_parse(const char*path, map&modules, /* * $Log: pform.cc,v $ + * Revision 1.74 2001/02/17 05:15:33 steve + * Allow task ports to be given real types. + * * Revision 1.73 2001/01/15 00:47:01 steve * Pass scope type information to the target module. *