diff --git a/t-vvm.cc b/t-vvm.cc index 35b34513e..3458441cb 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) && !defined(macintosh) -#ident "$Id: t-vvm.cc,v 1.116 2000/03/18 01:26:59 steve Exp $" +#ident "$Id: t-vvm.cc,v 1.117 2000/03/18 02:26:02 steve Exp $" #endif # include @@ -1366,12 +1366,24 @@ void target_vvm::logic(ostream&os, const NetLogic*gate) void target_vvm::bufz(ostream&os, const NetBUFZ*gate) { - string outfun = defn_gate_outputfun_(os, gate, 0); + string mname = mangle(gate->name()); + string nexus; + unsigned ncode; - os << "static vvm_bufz " << mangle(gate->name()) << "(&" << - outfun << ");" << endl; + os << "static vvm_bufz " << mname << ";" << endl; + + nexus = nexus_from_link(&gate->pin(0)); + ncode = nexus_wire_map[nexus]; + + init_code << " nexus_wire_table["<pin(1)); + ncode = nexus_wire_map[nexus]; + + init_code << " nexus_wire_table["< class vvm_udp_ssequ { vpip_bit_t state_[WIDTH+1]; }; -class vvm_bufz { +/* + * The bufz is a trivial device that simply passes its input to its + * output. Unlike a buf devince, this does not change Vz values to Vx, + * it instead passes the Vz unaltered. + * + * This device is useful for isolating nets. + */ +class vvm_bufz : public vvm_nexus::recvr_t, public vvm_nexus::drive_t { public: - explicit vvm_bufz(vvm_out_event::action_t o) - : output_(o) - { } + explicit vvm_bufz(); + ~vvm_bufz(); - void init(unsigned idx, vpip_bit_t val) { } - - void set(unsigned idx, vpip_bit_t val) - { output_(val); } + void init(unsigned idx, vpip_bit_t val); private: - vvm_out_event::action_t output_; + void take_value(unsigned, vpip_bit_t val); }; /* @@ -814,6 +817,9 @@ template class vvm_pevent : public vvm_nexus::recvr_t { /* * $Log: vvm_gates.h,v $ + * Revision 1.47 2000/03/18 02:26:02 steve + * Update bufz to nexus style. + * * Revision 1.46 2000/03/18 01:27:00 steve * Generate references into a table of nexus objects instead of * generating lots of isolated nexus objects. Easier on linkers