Fix coding errors handling names of logic devices,
and add support for buf device in vvm.
This commit is contained in:
parent
a81dcd7955
commit
b4aade1e4c
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#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
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -290,7 +290,7 @@ void PGBuiltin::elaborate(Design*des, const string&path) const
|
||||||
else
|
else
|
||||||
index = low - idx;
|
index = low - idx;
|
||||||
|
|
||||||
tmp << name << "<" << index << ">";
|
tmp << name << "<" << index << ">" << ends;
|
||||||
const string inm = tmp.str();
|
const string inm = tmp.str();
|
||||||
|
|
||||||
switch (type()) {
|
switch (type()) {
|
||||||
|
|
@ -2133,6 +2133,10 @@ Design* elaborate(const map<string,Module*>&modules,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: elaborate.cc,v $
|
* $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
|
* Revision 1.125 1999/11/21 00:13:08 steve
|
||||||
* Support memories in continuous assignments.
|
* Support memories in continuous assignments.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
12
t-vvm.cc
12
t-vvm.cc
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#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
|
#endif
|
||||||
|
|
||||||
# include <iostream>
|
# include <iostream>
|
||||||
|
|
@ -963,6 +963,9 @@ void target_vvm::logic(ostream&os, const NetLogic*gate)
|
||||||
os << "static vvm_and" << "<" << gate->pin_count()-1 <<
|
os << "static vvm_and" << "<" << gate->pin_count()-1 <<
|
||||||
"," << gate->rise_time() << "> ";
|
"," << gate->rise_time() << "> ";
|
||||||
break;
|
break;
|
||||||
|
case NetLogic::BUF:
|
||||||
|
os << "static vvm_buf<" << gate->rise_time() << "> ";
|
||||||
|
break;
|
||||||
case NetLogic::BUFIF0:
|
case NetLogic::BUFIF0:
|
||||||
os << "static vvm_bufif0<" << gate->rise_time() << "> ";
|
os << "static vvm_bufif0<" << gate->rise_time() << "> ";
|
||||||
break;
|
break;
|
||||||
|
|
@ -992,6 +995,9 @@ void target_vvm::logic(ostream&os, const NetLogic*gate)
|
||||||
os << "static vvm_xor" << "<" << gate->pin_count()-1 <<
|
os << "static vvm_xor" << "<" << gate->pin_count()-1 <<
|
||||||
"," << gate->rise_time() << "> ";
|
"," << gate->rise_time() << "> ";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
os << "#error \"internal ivl error:bad gate type for " <<
|
||||||
|
gate->name() << "\"" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
os << mangle(gate->name()) << "(&" << outfun << ");" << endl;
|
os << mangle(gate->name()) << "(&" << outfun << ");" << endl;
|
||||||
|
|
@ -1920,6 +1926,10 @@ extern const struct target tgt_vvm = {
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* $Log: t-vvm.cc,v $
|
* $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
|
* Revision 1.77 1999/11/21 00:13:09 steve
|
||||||
* Support memories in continuous assignments.
|
* Support memories in continuous assignments.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#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
|
#endif
|
||||||
|
|
||||||
# include "vvm.h"
|
# 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 {
|
template <unsigned long DELAY> class vvm_bufif1 {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -987,6 +1011,10 @@ template <unsigned WIDTH> class vvm_pevent {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vvm_gates.h,v $
|
* $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
|
* Revision 1.24 1999/11/21 00:13:09 steve
|
||||||
* Support memories in continuous assignments.
|
* Support memories in continuous assignments.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue