Update bufz to nexus style.
This commit is contained in:
parent
567de6ba39
commit
80bd855329
25
t-vvm.cc
25
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 <iostream>
|
||||
|
|
@ -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["<<ncode<<"].connect(&" <<
|
||||
mname << ");" << endl;
|
||||
|
||||
nexus = nexus_from_link(&gate->pin(1));
|
||||
ncode = nexus_wire_map[nexus];
|
||||
|
||||
init_code << " nexus_wire_table["<<ncode<<"].connect(&" <<
|
||||
mname << ",0);" << endl;
|
||||
|
||||
emit_gate_outputfun_(gate, 0);
|
||||
}
|
||||
|
||||
static string state_to_string(unsigned state, unsigned npins)
|
||||
|
|
@ -2280,6 +2292,9 @@ extern const struct target tgt_vvm = {
|
|||
};
|
||||
/*
|
||||
* $Log: t-vvm.cc,v $
|
||||
* Revision 1.117 2000/03/18 02:26:02 steve
|
||||
* Update bufz to nexus style.
|
||||
*
|
||||
* Revision 1.116 2000/03/18 01:26:59 steve
|
||||
* Generate references into a table of nexus objects instead of
|
||||
* generating lots of isolated nexus objects. Easier on linkers
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: vvm_gates.cc,v 1.10 2000/03/18 01:27:00 steve Exp $"
|
||||
#ident "$Id: vvm_gates.cc,v 1.11 2000/03/18 02:26:02 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vvm_gates.h"
|
||||
|
|
@ -169,6 +169,23 @@ void vvm_bufif1::take_value(unsigned key, vpip_bit_t val)
|
|||
else output(input_[0]);
|
||||
}
|
||||
|
||||
vvm_bufz::vvm_bufz()
|
||||
{
|
||||
}
|
||||
|
||||
vvm_bufz::~vvm_bufz()
|
||||
{
|
||||
}
|
||||
|
||||
void vvm_bufz::init(unsigned, vpip_bit_t)
|
||||
{
|
||||
}
|
||||
|
||||
void vvm_bufz::take_value(unsigned, vpip_bit_t val)
|
||||
{
|
||||
set_value(val);
|
||||
}
|
||||
|
||||
vvm_eeq::vvm_eeq(unsigned long d)
|
||||
: vvm_1bit_out(d)
|
||||
{
|
||||
|
|
@ -258,6 +275,9 @@ void vvm_not::take_value(unsigned, vpip_bit_t val)
|
|||
|
||||
/*
|
||||
* $Log: vvm_gates.cc,v $
|
||||
* Revision 1.11 2000/03/18 02:26:02 steve
|
||||
* Update bufz to nexus style.
|
||||
*
|
||||
* Revision 1.10 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
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: vvm_gates.h,v 1.46 2000/03/18 01:27:00 steve Exp $"
|
||||
#ident "$Id: vvm_gates.h,v 1.47 2000/03/18 02:26:02 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vvm.h"
|
||||
|
|
@ -723,19 +723,22 @@ template <unsigned WIDTH> 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 <unsigned WIDTH> 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
|
||||
|
|
|
|||
Loading…
Reference in New Issue