vvm support for pullup/down gates (PR#288)
This commit is contained in:
parent
1b69bb5d2f
commit
9dbcb32808
13
t-vvm.cc
13
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.212 2001/08/25 23:50:03 steve Exp $"
|
||||
#ident "$Id: t-vvm.cc,v 1.213 2001/10/14 03:50:53 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -1997,8 +1997,14 @@ void target_vvm::logic(const NetLogic*gate)
|
|||
out << "static vvm_xor " << mname << "("
|
||||
<< (gate->pin_count()-1 ) << ", ";
|
||||
break;
|
||||
case NetLogic::PULLDOWN:
|
||||
out << "static vvm_pulldown " << mname << "(";
|
||||
break;
|
||||
case NetLogic::PULLUP:
|
||||
out << "static vvm_pullup " << mname << "(";
|
||||
break;
|
||||
default:
|
||||
out << "#error \"internal ivl error:bad gate type for " <<
|
||||
out << "#error \"internal ivl error:bad gate type " << gate->type() << " for " <<
|
||||
gate->name() << "\"" << endl;
|
||||
}
|
||||
|
||||
|
|
@ -3652,6 +3658,9 @@ extern const struct target tgt_vvm = {
|
|||
};
|
||||
/*
|
||||
* $Log: t-vvm.cc,v $
|
||||
* Revision 1.213 2001/10/14 03:50:53 steve
|
||||
* vvm support for pullup/down gates (PR#288)
|
||||
*
|
||||
* Revision 1.212 2001/08/25 23:50:03 steve
|
||||
* Change the NetAssign_ class to refer to the signal
|
||||
* instead of link into the netlist. This is faster
|
||||
|
|
|
|||
|
|
@ -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.22 2001/07/25 03:10:50 steve Exp $"
|
||||
#ident "$Id: vvm_gates.cc,v 1.23 2001/10/14 03:50:53 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -839,8 +839,47 @@ void vvm_xor::take_value(unsigned key, vpip_bit_t val)
|
|||
output(compute_xor(input_, width_));
|
||||
}
|
||||
|
||||
vvm_pullup::vvm_pullup(unsigned d)
|
||||
: vvm_1bit_out(d)
|
||||
{
|
||||
}
|
||||
|
||||
void vvm_pullup::start()
|
||||
{
|
||||
output(St1);
|
||||
}
|
||||
|
||||
void vvm_pullup::take_value(unsigned key, vpip_bit_t val)
|
||||
{
|
||||
}
|
||||
|
||||
vvm_pullup::~vvm_pullup()
|
||||
{
|
||||
}
|
||||
|
||||
vvm_pulldown::vvm_pulldown(unsigned d)
|
||||
: vvm_1bit_out(d)
|
||||
{
|
||||
}
|
||||
|
||||
void vvm_pulldown::start()
|
||||
{
|
||||
output(St0);
|
||||
}
|
||||
|
||||
void vvm_pulldown::take_value(unsigned key, vpip_bit_t val)
|
||||
{
|
||||
}
|
||||
|
||||
vvm_pulldown::~vvm_pulldown()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* $Log: vvm_gates.cc,v $
|
||||
* Revision 1.23 2001/10/14 03:50:53 steve
|
||||
* vvm support for pullup/down gates (PR#288)
|
||||
*
|
||||
* Revision 1.22 2001/07/25 03:10:50 steve
|
||||
* Create a config.h.in file to hold all the config
|
||||
* junk, and support gcc 3.0. (Stephan Boettcher)
|
||||
|
|
|
|||
|
|
@ -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.71 2001/04/22 23:09:46 steve Exp $"
|
||||
#ident "$Id: vvm_gates.h,v 1.72 2001/10/14 03:50:53 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vvm.h"
|
||||
|
|
@ -864,6 +864,30 @@ class vvm_bufz : public vvm_nexus::recvr_t, public vvm_1bit_out {
|
|||
void take_value(unsigned, vpip_bit_t val);
|
||||
};
|
||||
|
||||
/*
|
||||
* The pullup is a trivial device that drives a logic 1 onto its output.
|
||||
*/
|
||||
class vvm_pullup : public vvm_nexus::recvr_t, public vvm_1bit_out {
|
||||
public:
|
||||
explicit vvm_pullup(unsigned delay =0);
|
||||
~vvm_pullup();
|
||||
void start();
|
||||
private:
|
||||
void take_value(unsigned, vpip_bit_t val);
|
||||
};
|
||||
|
||||
/*
|
||||
* The pulldown is a trivial device that drives a logic 0 onto its output.
|
||||
*/
|
||||
class vvm_pulldown : public vvm_nexus::recvr_t, public vvm_1bit_out {
|
||||
public:
|
||||
explicit vvm_pulldown(unsigned delay =0);
|
||||
~vvm_pulldown();
|
||||
void start();
|
||||
private:
|
||||
void take_value(unsigned, vpip_bit_t val);
|
||||
};
|
||||
|
||||
/*
|
||||
* Threads use the vvm_sync to wait for something to happen. This
|
||||
* class cooperates with the various event source classes that receive
|
||||
|
|
@ -960,6 +984,9 @@ class vvm_posedge : public vvm_nexus::recvr_t {
|
|||
|
||||
/*
|
||||
* $Log: vvm_gates.h,v $
|
||||
* Revision 1.72 2001/10/14 03:50:53 steve
|
||||
* vvm support for pullup/down gates (PR#288)
|
||||
*
|
||||
* Revision 1.71 2001/04/22 23:09:46 steve
|
||||
* More UDP consolidation from Stephan Boettcher.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue