Fix coding errors handling names of logic devices,

and add support for buf device in vvm.
This commit is contained in:
steve 1999-11-21 01:16:51 +00:00
parent a81dcd7955
commit b4aade1e4c
3 changed files with 46 additions and 4 deletions

View File

@ -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<string,Module*>&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.
*

View File

@ -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 <iostream>
@ -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.
*

View File

@ -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 <unsigned long DELAY> 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 <unsigned long DELAY> class vvm_bufif1 {
public:
@ -987,6 +1011,10 @@ template <unsigned WIDTH> 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.
*