diff --git a/elaborate.cc b/elaborate.cc index b3b9af23b..255145897 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: elaborate.cc,v 1.125 1999/11/21 00:13:08 steve Exp $" +#ident "$Id: elaborate.cc,v 1.126 1999/11/21 01:16:51 steve Exp $" #endif /* @@ -290,7 +290,7 @@ void PGBuiltin::elaborate(Design*des, const string&path) const else index = low - idx; - tmp << name << "<" << index << ">"; + tmp << name << "<" << index << ">" << ends; const string inm = tmp.str(); switch (type()) { @@ -2133,6 +2133,10 @@ Design* elaborate(const map&modules, /* * $Log: elaborate.cc,v $ + * Revision 1.126 1999/11/21 01:16:51 steve + * Fix coding errors handling names of logic devices, + * and add support for buf device in vvm. + * * Revision 1.125 1999/11/21 00:13:08 steve * Support memories in continuous assignments. * diff --git a/t-vvm.cc b/t-vvm.cc index a325ca3e8..f9f1e63d1 100644 --- a/t-vvm.cc +++ b/t-vvm.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: t-vvm.cc,v 1.77 1999/11/21 00:13:09 steve Exp $" +#ident "$Id: t-vvm.cc,v 1.78 1999/11/21 01:16:51 steve Exp $" #endif # include @@ -963,6 +963,9 @@ void target_vvm::logic(ostream&os, const NetLogic*gate) os << "static vvm_and" << "<" << gate->pin_count()-1 << "," << gate->rise_time() << "> "; break; + case NetLogic::BUF: + os << "static vvm_buf<" << gate->rise_time() << "> "; + break; case NetLogic::BUFIF0: os << "static vvm_bufif0<" << gate->rise_time() << "> "; break; @@ -992,6 +995,9 @@ void target_vvm::logic(ostream&os, const NetLogic*gate) os << "static vvm_xor" << "<" << gate->pin_count()-1 << "," << gate->rise_time() << "> "; break; + default: + os << "#error \"internal ivl error:bad gate type for " << + gate->name() << "\"" << endl; } os << mangle(gate->name()) << "(&" << outfun << ");" << endl; @@ -1920,6 +1926,10 @@ extern const struct target tgt_vvm = { }; /* * $Log: t-vvm.cc,v $ + * Revision 1.78 1999/11/21 01:16:51 steve + * Fix coding errors handling names of logic devices, + * and add support for buf device in vvm. + * * Revision 1.77 1999/11/21 00:13:09 steve * Support memories in continuous assignments. * diff --git a/vvm/vvm_gates.h b/vvm/vvm_gates.h index e9341d00a..0d74eb638 100644 --- a/vvm/vvm_gates.h +++ b/vvm/vvm_gates.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: vvm_gates.h,v 1.24 1999/11/21 00:13:09 steve Exp $" +#ident "$Id: vvm_gates.h,v 1.25 1999/11/21 01:16:51 steve Exp $" #endif # include "vvm.h" @@ -609,6 +609,30 @@ class vvm_ram_dq : protected vvm_ram_callback { } }; +template class vvm_buf { + + public: + explicit vvm_buf(vvm_out_event::action_t o) + : output_(o) + { } + + void init_I(unsigned, vpip_bit_t) { } + void start(vvm_simulation*) { } + + void set_I(vvm_simulation*sim, unsigned, vpip_bit_t val) + { vpip_bit_t outval = val; + if (val == Vz) val = Vx; + vvm_event*ev = new vvm_out_event(sim, outval, output_); + if (DELAY > 0) + sim->insert_event(DELAY, ev); + else + sim->active_event(ev); + } + + private: + vvm_out_event::action_t output_; +}; + template class vvm_bufif1 { public: @@ -987,6 +1011,10 @@ template class vvm_pevent { /* * $Log: vvm_gates.h,v $ + * Revision 1.25 1999/11/21 01:16:51 steve + * Fix coding errors handling names of logic devices, + * and add support for buf device in vvm. + * * Revision 1.24 1999/11/21 00:13:09 steve * Support memories in continuous assignments. *