Generate fake adder code in vvm.
This commit is contained in:
parent
41a1c6bb02
commit
555d447180
10
netlist.cc
10
netlist.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: netlist.cc,v 1.56 1999/09/03 04:28:38 steve Exp $"
|
||||
#ident "$Id: netlist.cc,v 1.57 1999/09/04 01:57:15 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <cassert>
|
||||
|
|
@ -329,6 +329,11 @@ NetAddSub::~NetAddSub()
|
|||
{
|
||||
}
|
||||
|
||||
unsigned NetAddSub::width()const
|
||||
{
|
||||
return (pin_count() - 6) / 3;
|
||||
}
|
||||
|
||||
NetObj::Link& NetAddSub::pin_DataA(unsigned idx)
|
||||
{
|
||||
idx = 6 + idx*3;
|
||||
|
|
@ -1749,6 +1754,9 @@ NetNet* Design::find_signal(bool (*func)(const NetNet*))
|
|||
|
||||
/*
|
||||
* $Log: netlist.cc,v $
|
||||
* Revision 1.57 1999/09/04 01:57:15 steve
|
||||
* Generate fake adder code in vvm.
|
||||
*
|
||||
* Revision 1.56 1999/09/03 04:28:38 steve
|
||||
* elaborate the binary plus operator.
|
||||
*
|
||||
|
|
|
|||
15
t-vvm.cc
15
t-vvm.cc
|
|
@ -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.37 1999/09/01 20:46:19 steve Exp $"
|
||||
#ident "$Id: t-vvm.cc,v 1.38 1999/09/04 01:57:15 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <iostream>
|
||||
|
|
@ -44,6 +44,9 @@ class target_vvm : public target_t {
|
|||
virtual void memory(ostream&os, const NetMemory*);
|
||||
virtual void task_def(ostream&os, const NetTaskDef*);
|
||||
virtual void func_def(ostream&os, const NetFuncDef*);
|
||||
|
||||
virtual void lpm_add_sub(ostream&os, const NetAddSub*);
|
||||
|
||||
virtual void logic(ostream&os, const NetLogic*);
|
||||
virtual void bufz(ostream&os, const NetBUFZ*);
|
||||
virtual void udp(ostream&os, const NetUDP*);
|
||||
|
|
@ -607,6 +610,13 @@ void target_vvm::emit_gate_outputfun_(const NetNode*gate)
|
|||
delayed << "}" << endl;
|
||||
}
|
||||
|
||||
void target_vvm::lpm_add_sub(ostream&os, const NetAddSub*gate)
|
||||
{
|
||||
os << "#error \"adders not yet supported in vvm.\"" << endl;
|
||||
os << "static vvm_add_sub<" << gate->width() << "> " <<
|
||||
mangle(gate->name()) << ";" << endl;
|
||||
}
|
||||
|
||||
void target_vvm::logic(ostream&os, const NetLogic*gate)
|
||||
{
|
||||
os << "static void " << mangle(gate->name()) <<
|
||||
|
|
@ -1401,6 +1411,9 @@ extern const struct target tgt_vvm = {
|
|||
};
|
||||
/*
|
||||
* $Log: t-vvm.cc,v $
|
||||
* Revision 1.38 1999/09/04 01:57:15 steve
|
||||
* Generate fake adder code in vvm.
|
||||
*
|
||||
* Revision 1.37 1999/09/01 20:46:19 steve
|
||||
* Handle recursive functions and arbitrary function
|
||||
* references to other functions, properly pass
|
||||
|
|
|
|||
Loading…
Reference in New Issue