diff --git a/netlist.cc b/netlist.cc index 6c6756642..8f932d208 100644 --- a/netlist.cc +++ b/netlist.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: netlist.cc,v 1.96 1999/11/28 23:42:02 steve Exp $" +#ident "$Id: netlist.cc,v 1.97 1999/12/02 16:58:58 steve Exp $" #endif # include @@ -1344,9 +1344,9 @@ void NetCase::set_case(unsigned idx, NetExpr*e, NetProc*p) NetCaseCmp::NetCaseCmp(const string&n) : NetNode(n, 3) { - pin(0).set_dir(Link::OUTPUT); - pin(1).set_dir(Link::INPUT); - pin(2).set_dir(Link::INPUT); + pin(0).set_dir(Link::OUTPUT); pin(0).set_name("O",0); + pin(1).set_dir(Link::INPUT); pin(1).set_name("I",0); + pin(2).set_dir(Link::INPUT); pin(2).set_name("I",1); } NetCaseCmp::~NetCaseCmp() @@ -2641,6 +2641,9 @@ NetNet* Design::find_signal(bool (*func)(const NetNet*)) /* * $Log: netlist.cc,v $ + * Revision 1.97 1999/12/02 16:58:58 steve + * Update case comparison (Eric Aardoom). + * * Revision 1.96 1999/11/28 23:42:02 steve * NetESignal object no longer need to be NetNode * objects. Let them keep a pointer to NetNet objects. diff --git a/t-vvm.cc b/t-vvm.cc index 6f8a9367a..5d3aed0ea 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.86 1999/11/29 00:38:27 steve Exp $" +#ident "$Id: t-vvm.cc,v 1.87 1999/12/02 16:58:58 steve Exp $" #endif # include @@ -1257,13 +1257,16 @@ void target_vvm::net_assign_nb(ostream&os, const NetAssignNB*net) void target_vvm::net_case_cmp(ostream&os, const NetCaseCmp*gate) { + const NetObj::Link&lnk = gate->pin(0); + os << "static void " << mangle(gate->name()) << - "_output_fun(vvm_simulation*, vpip_bit_t);" << endl; + "_output_" << lnk.get_name() << "_" << lnk.get_inst() << + "(vvm_simulation*, vpip_bit_t);" << endl; assert(gate->pin_count() == 3); os << "static vvm_eeq" << "<" << gate->rise_time() << "> " << mangle(gate->name()) << "(&" << mangle(gate->name()) << - "_output_fun);" << endl; + "_output_" << lnk.get_name() << "_" << lnk.get_inst() << ");" << endl; emit_gate_outputfun_(gate, 0); @@ -1955,6 +1958,9 @@ extern const struct target tgt_vvm = { }; /* * $Log: t-vvm.cc,v $ + * Revision 1.87 1999/12/02 16:58:58 steve + * Update case comparison (Eric Aardoom). + * * Revision 1.86 1999/11/29 00:38:27 steve * Properly initialize registers. * diff --git a/vvm/vvm_gates.h b/vvm/vvm_gates.h index 07ff87c40..18599e5f6 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.29 1999/12/02 04:54:11 steve Exp $" +#ident "$Id: vvm_gates.h,v 1.30 1999/12/02 16:58:58 steve Exp $" #endif # include "vvm.h" @@ -716,8 +716,8 @@ template class vvm_eeq { explicit vvm_eeq(vvm_out_event::action_t o) : output_(o) { } - void init(unsigned idx, vpip_bit_t val) - { input_[idx-1] = val; } + void init_I(unsigned idx, vpip_bit_t val) + { input_[idx] = val; } void start(vvm_simulation*sim) { vvm_event*ev = new vvm_out_event(sim, compute_(), output_); @@ -727,10 +727,10 @@ template class vvm_eeq { sim->active_event(ev); } - void set(vvm_simulation*sim, unsigned idx, vpip_bit_t val) - { if (input_[idx-1] == val) + void set_I(vvm_simulation*sim, unsigned idx, vpip_bit_t val) + { if (input_[idx] == val) return; - input_[idx-1] = val; + input_[idx] = val; start(sim); } @@ -897,6 +897,9 @@ template class vvm_pevent { /* * $Log: vvm_gates.h,v $ + * Revision 1.30 1999/12/02 16:58:58 steve + * Update case comparison (Eric Aardoom). + * * Revision 1.29 1999/12/02 04:54:11 steve * Handle mux sel of X, if inputs are equal. *