target methods need not take a file stream.

This commit is contained in:
steve 2000-08-08 01:50:42 +00:00
parent dab45178a7
commit d58533fd7b
8 changed files with 681 additions and 630 deletions

231
emit.cc
View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: emit.cc,v 1.48 2000/07/30 18:25:43 steve Exp $"
#ident "$Id: emit.cc,v 1.49 2000/08/08 01:50:42 steve Exp $"
#endif
/*
@ -30,220 +30,220 @@
# include <typeinfo>
# include <cassert>
void NetNode::emit_node(ostream&o, struct target_t*tgt) const
void NetNode::emit_node(struct target_t*tgt) const
{
cerr << "EMIT: Gate type? " << typeid(*this).name() << endl;
}
void NetLogic::emit_node(ostream&o, struct target_t*tgt) const
void NetLogic::emit_node(struct target_t*tgt) const
{
tgt->logic(o, this);
tgt->logic(this);
}
void NetUDP_COMB::emit_node(ostream&o, struct target_t*tgt) const
void NetUDP_COMB::emit_node(struct target_t*tgt) const
{
tgt->udp_comb(o, this);
tgt->udp_comb(this);
}
void NetUDP::emit_node(ostream&o, struct target_t*tgt) const
void NetUDP::emit_node(struct target_t*tgt) const
{
tgt->udp(o, this);
tgt->udp(this);
}
void NetAddSub::emit_node(ostream&o, struct target_t*tgt) const
void NetAddSub::emit_node(struct target_t*tgt) const
{
tgt->lpm_add_sub(o, this);
tgt->lpm_add_sub(this);
}
void NetAssign::emit_node(ostream&o, struct target_t*tgt) const
void NetAssign::emit_node(struct target_t*tgt) const
{
tgt->net_assign(o, this);
tgt->net_assign(this);
}
void NetAssignNB::emit_node(ostream&o, struct target_t*tgt) const
void NetAssignNB::emit_node(struct target_t*tgt) const
{
tgt->net_assign_nb(o, this);
tgt->net_assign_nb(this);
}
void NetCaseCmp::emit_node(ostream&o, struct target_t*tgt) const
void NetCaseCmp::emit_node(struct target_t*tgt) const
{
tgt->net_case_cmp(o, this);
tgt->net_case_cmp(this);
}
void NetCAssign::emit_node(ostream&o, struct target_t*tgt) const
void NetCAssign::emit_node(struct target_t*tgt) const
{
tgt->net_cassign(o, this);
tgt->net_cassign(this);
}
void NetCLShift::emit_node(ostream&o, struct target_t*tgt) const
void NetCLShift::emit_node(struct target_t*tgt) const
{
tgt->lpm_clshift(o, this);
tgt->lpm_clshift(this);
}
void NetCompare::emit_node(ostream&o, struct target_t*tgt) const
void NetCompare::emit_node(struct target_t*tgt) const
{
tgt->lpm_compare(o, this);
tgt->lpm_compare(this);
}
void NetConst::emit_node(ostream&o, struct target_t*tgt) const
void NetConst::emit_node(struct target_t*tgt) const
{
tgt->net_const(o, this);
tgt->net_const(this);
}
void NetDivide::emit_node(ostream&o, struct target_t*tgt) const
void NetDivide::emit_node(struct target_t*tgt) const
{
tgt->lpm_divide(o, this);
tgt->lpm_divide(this);
}
void NetFF::emit_node(ostream&o, struct target_t*tgt) const
void NetFF::emit_node(struct target_t*tgt) const
{
tgt->lpm_ff(o, this);
tgt->lpm_ff(this);
}
void NetForce::emit_node(ostream&o, struct target_t*tgt) const
void NetForce::emit_node(struct target_t*tgt) const
{
tgt->net_force(o, this);
tgt->net_force(this);
}
void NetMult::emit_node(ostream&o, struct target_t*tgt) const
void NetMult::emit_node(struct target_t*tgt) const
{
tgt->lpm_mult(o, this);
tgt->lpm_mult(this);
}
void NetMux::emit_node(ostream&o, struct target_t*tgt) const
void NetMux::emit_node(struct target_t*tgt) const
{
tgt->lpm_mux(o, this);
tgt->lpm_mux(this);
}
void NetRamDq::emit_node(ostream&o, struct target_t*tgt) const
void NetRamDq::emit_node(struct target_t*tgt) const
{
tgt->lpm_ram_dq(o, this);
tgt->lpm_ram_dq(this);
}
void NetBUFZ::emit_node(ostream&o, struct target_t*tgt) const
void NetBUFZ::emit_node(struct target_t*tgt) const
{
tgt->bufz(o, this);
tgt->bufz(this);
}
bool NetProcTop::emit(ostream&o, struct target_t*tgt) const
bool NetProcTop::emit(struct target_t*tgt) const
{
return tgt->process(o, this);
return tgt->process(this);
}
bool NetProc::emit_proc(ostream&o, struct target_t*tgt) const
bool NetProc::emit_proc(struct target_t*tgt) const
{
cerr << "EMIT: Proc type? " << typeid(*this).name() << endl;
return false;
}
bool NetAssign::emit_proc(ostream&o, struct target_t*tgt) const
bool NetAssign::emit_proc(struct target_t*tgt) const
{
tgt->proc_assign(o, this);
tgt->proc_assign(this);
return true;
}
bool NetAssignNB::emit_proc(ostream&o, struct target_t*tgt) const
bool NetAssignNB::emit_proc(struct target_t*tgt) const
{
tgt->proc_assign_nb(o, this);
tgt->proc_assign_nb(this);
return true;
}
bool NetAssignMem::emit_proc(ostream&o, struct target_t*tgt) const
bool NetAssignMem::emit_proc(struct target_t*tgt) const
{
tgt->proc_assign_mem(o, this);
tgt->proc_assign_mem(this);
return true;
}
bool NetAssignMemNB::emit_proc(ostream&o, struct target_t*tgt) const
bool NetAssignMemNB::emit_proc(struct target_t*tgt) const
{
tgt->proc_assign_mem_nb(o, this);
tgt->proc_assign_mem_nb(this);
return true;
}
bool NetBlock::emit_proc(ostream&o, struct target_t*tgt) const
bool NetBlock::emit_proc(struct target_t*tgt) const
{
return tgt->proc_block(o, this);
return tgt->proc_block(this);
}
bool NetCase::emit_proc(ostream&o, struct target_t*tgt) const
bool NetCase::emit_proc(struct target_t*tgt) const
{
tgt->proc_case(o, this);
tgt->proc_case(this);
return true;
}
bool NetCAssign::emit_proc(ostream&o, struct target_t*tgt) const
bool NetCAssign::emit_proc(struct target_t*tgt) const
{
return tgt->proc_cassign(o, this);
return tgt->proc_cassign(this);
}
bool NetCondit::emit_proc(ostream&o, struct target_t*tgt) const
bool NetCondit::emit_proc(struct target_t*tgt) const
{
tgt->proc_condit(o, this);
tgt->proc_condit(this);
return true;
}
bool NetDeassign::emit_proc(ostream&o, struct target_t*tgt) const
bool NetDeassign::emit_proc(struct target_t*tgt) const
{
return tgt->proc_deassign(o, this);
return tgt->proc_deassign(this);
}
bool NetDisable::emit_proc(ostream&o, struct target_t*tgt) const
bool NetDisable::emit_proc(struct target_t*tgt) const
{
return tgt->proc_disable(o, this);
return tgt->proc_disable(this);
}
bool NetForce::emit_proc(ostream&o, struct target_t*tgt) const
bool NetForce::emit_proc(struct target_t*tgt) const
{
return tgt->proc_force(o, this);
return tgt->proc_force(this);
}
bool NetForever::emit_proc(ostream&o, struct target_t*tgt) const
bool NetForever::emit_proc(struct target_t*tgt) const
{
tgt->proc_forever(o, this);
tgt->proc_forever(this);
return true;
}
bool NetPDelay::emit_proc(ostream&o, struct target_t*tgt) const
bool NetPDelay::emit_proc(struct target_t*tgt) const
{
return tgt->proc_delay(o, this);
return tgt->proc_delay(this);
}
bool NetPDelay::emit_proc_recurse(ostream&o, struct target_t*tgt) const
bool NetPDelay::emit_proc_recurse(struct target_t*tgt) const
{
if (statement_) return statement_->emit_proc(o, tgt);
if (statement_) return statement_->emit_proc(tgt);
return true;
}
bool NetRelease::emit_proc(ostream&o, struct target_t*tgt) const
bool NetRelease::emit_proc(struct target_t*tgt) const
{
return tgt->proc_release(o, this);
return tgt->proc_release(this);
}
bool NetRepeat::emit_proc(ostream&o, struct target_t*tgt) const
bool NetRepeat::emit_proc(struct target_t*tgt) const
{
tgt->proc_repeat(o, this);
tgt->proc_repeat(this);
return true;
}
bool NetSTask::emit_proc(ostream&o, struct target_t*tgt) const
bool NetSTask::emit_proc(struct target_t*tgt) const
{
tgt->proc_stask(o, this);
tgt->proc_stask(this);
return true;
}
bool NetUTask::emit_proc(ostream&o, struct target_t*tgt) const
bool NetUTask::emit_proc(struct target_t*tgt) const
{
tgt->proc_utask(o, this);
tgt->proc_utask(this);
return true;
}
bool NetWhile::emit_proc(ostream&o, struct target_t*tgt) const
bool NetWhile::emit_proc(struct target_t*tgt) const
{
tgt->proc_while(o, this);
tgt->proc_while(this);
return true;
}
void NetBlock::emit_recurse(ostream&o, struct target_t*tgt) const
void NetBlock::emit_recurse(struct target_t*tgt) const
{
if (last_ == 0)
return;
@ -251,69 +251,69 @@ void NetBlock::emit_recurse(ostream&o, struct target_t*tgt) const
NetProc*cur = last_;
do {
cur = cur->next_;
cur->emit_proc(o, tgt);
cur->emit_proc(tgt);
} while (cur != last_);
}
void NetCondit::emit_recurse_if(ostream&o, struct target_t*tgt) const
void NetCondit::emit_recurse_if(struct target_t*tgt) const
{
if (if_)
if_->emit_proc(o, tgt);
if_->emit_proc(tgt);
}
void NetCondit::emit_recurse_else(ostream&o, struct target_t*tgt) const
void NetCondit::emit_recurse_else(struct target_t*tgt) const
{
if (else_)
else_->emit_proc(o, tgt);
else_->emit_proc(tgt);
}
void NetEvProbe::emit_node(ostream&o, struct target_t*tgt) const
void NetEvProbe::emit_node(struct target_t*tgt) const
{
tgt->net_probe(o, this);
tgt->net_probe(this);
}
bool NetEvTrig::emit_proc(ostream&o, struct target_t*tgt) const
bool NetEvTrig::emit_proc(struct target_t*tgt) const
{
return tgt->proc_trigger(o, this);
return tgt->proc_trigger(this);
}
bool NetEvWait::emit_proc(ostream&o, struct target_t*tgt) const
bool NetEvWait::emit_proc(struct target_t*tgt) const
{
return tgt->proc_wait(o, this);
return tgt->proc_wait(this);
}
bool NetEvWait::emit_recurse(ostream&o, struct target_t*tgt) const
bool NetEvWait::emit_recurse(struct target_t*tgt) const
{
if (!statement_) return true;
return statement_->emit_proc(o, tgt);
return statement_->emit_proc(tgt);
}
void NetForever::emit_recurse(ostream&o, struct target_t*tgt) const
void NetForever::emit_recurse(struct target_t*tgt) const
{
if (statement_)
statement_->emit_proc(o, tgt);
statement_->emit_proc(tgt);
}
void NetRepeat::emit_recurse(ostream&o, struct target_t*tgt) const
void NetRepeat::emit_recurse(struct target_t*tgt) const
{
if (statement_)
statement_->emit_proc(o, tgt);
statement_->emit_proc(tgt);
}
void NetScope::emit_scope(ostream&o, struct target_t*tgt) const
void NetScope::emit_scope(struct target_t*tgt) const
{
tgt->scope(o, this);
tgt->scope(this);
for (NetEvent*cur = events_ ; cur ; cur = cur->snext_)
tgt->event(o, cur);
tgt->event(cur);
for (NetScope*cur = sub_ ; cur ; cur = cur->sib_)
cur->emit_scope(o, tgt);
cur->emit_scope(tgt);
if (signals_) {
NetNet*cur = signals_->sig_next_;
do {
tgt->signal(o, cur);
tgt->signal(cur);
cur = cur->sig_next_;
} while (cur != signals_->sig_next_);
}
@ -321,34 +321,34 @@ void NetScope::emit_scope(ostream&o, struct target_t*tgt) const
if (memories_) {
NetMemory*cur = memories_->snext_;
do {
tgt->memory(o, cur);
tgt->memory(cur);
cur = cur->snext_;
} while (cur != memories_->snext_);
}
}
void NetScope::emit_defs(ostream&o, struct target_t*tgt) const
void NetScope::emit_defs(struct target_t*tgt) const
{
switch (type_) {
case MODULE:
for (NetScope*cur = sub_ ; cur ; cur = cur->sib_)
cur->emit_defs(o, tgt);
cur->emit_defs(tgt);
break;
case FUNC:
tgt->func_def(o, this->func_def());
tgt->func_def(this->func_def());
break;
case TASK:
tgt->task_def(o, this->task_def());
tgt->task_def(this->task_def());
break;
}
}
void NetWhile::emit_proc_recurse(ostream&o, struct target_t*tgt) const
void NetWhile::emit_proc_recurse(struct target_t*tgt) const
{
proc_->emit_proc(o, tgt);
proc_->emit_proc(tgt);
}
bool Design::emit(ostream&o, struct target_t*tgt) const
@ -357,28 +357,28 @@ bool Design::emit(ostream&o, struct target_t*tgt) const
tgt->start_design(o, this);
// enumerate the scopes
root_scope_->emit_scope(o, tgt);
root_scope_->emit_scope(tgt);
// emit nodes
if (nodes_) {
NetNode*cur = nodes_->node_next_;
do {
cur->emit_node(o, tgt);
cur->emit_node(tgt);
cur = cur->node_next_;
} while (cur != nodes_->node_next_);
}
// emit task and function definitions
root_scope_->emit_defs(o, tgt);
root_scope_->emit_defs(tgt);
// emit the processes
for (const NetProcTop*idx = procs_ ; idx ; idx = idx->next_)
rc = rc && idx->emit(o, tgt);
rc = rc && idx->emit(tgt);
tgt->end_design(o, this);
tgt->end_design(this);
return rc;
}
@ -461,6 +461,9 @@ bool emit(ostream&o, const Design*des, const char*type)
/*
* $Log: emit.cc,v $
* Revision 1.49 2000/08/08 01:50:42 steve
* target methods need not take a file stream.
*
* Revision 1.48 2000/07/30 18:25:43 steve
* Rearrange task and function elaboration so that the
* NetTaskDef and NetFuncDef functions are created during

109
netlist.h
View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: netlist.h,v 1.153 2000/08/02 14:48:15 steve Exp $"
#ident "$Id: netlist.h,v 1.154 2000/08/08 01:50:42 steve Exp $"
#endif
/*
@ -263,7 +263,7 @@ class NetNode : public NetObj {
// connected to the same of my own pins.
NetNode*next_node();
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void dump_node(ostream&, unsigned) const;
// This is used to scan a modifiable netlist, one node at a time.
@ -388,7 +388,7 @@ class NetAddSub : public NetNode {
const Link& pin_Result(unsigned idx) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void functor_node(Design*des, functor_t*fun);
};
@ -419,7 +419,7 @@ class NetCLShift : public NetNode {
const Link& pin_Distance(unsigned idx) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
private:
unsigned width_;
@ -467,7 +467,7 @@ class NetCompare : public NetNode {
virtual void functor_node(Design*, functor_t*);
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
private:
unsigned width_;
@ -502,7 +502,7 @@ class NetDivide : public NetNode {
const Link& pin_Result(unsigned idx) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void functor_node(Design*des, functor_t*fun);
private:
@ -541,7 +541,7 @@ class NetFF : public NetNode {
const Link& pin_Q(unsigned) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void functor_node(Design*des, functor_t*fun);
};
@ -638,7 +638,7 @@ class NetMult : public NetNode {
const Link& pin_Sum(unsigned idx) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void functor_node(Design*des, functor_t*fun);
private:
@ -684,7 +684,7 @@ class NetMux : public NetNode {
const Link& pin_Sel(unsigned) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void functor_node(Design*des, functor_t*fun);
private:
@ -727,7 +727,7 @@ class NetRamDq : public NetNode {
const Link& pin_Q(unsigned idx) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
// Use this method to absorb other NetRamDq objects that are
// connected to the same memory, and have compatible pin
@ -849,7 +849,7 @@ class NetBUFZ : public NetNode {
~NetBUFZ();
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
};
/*
@ -870,7 +870,7 @@ class NetCaseCmp : public NetNode {
~NetCaseCmp();
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
};
/*
@ -890,7 +890,7 @@ class NetConst : public NetNode {
verinum::V value(unsigned idx) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void functor_node(Design*, functor_t*);
virtual void dump_node(ostream&, unsigned ind) const;
@ -919,7 +919,7 @@ class NetLogic : public NetNode {
TYPE type() const { return type_; }
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void functor_node(Design*, functor_t*);
private:
@ -985,7 +985,7 @@ class NetUDP : public NetNode {
public:
explicit NetUDP(const string&n, unsigned pins, bool sequ =false);
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node( struct target_t*) const;
virtual void dump_node(ostream&, unsigned ind) const;
/* return false if the entry conflicts with an existing
@ -1045,7 +1045,7 @@ class NetUDP_COMB : public NetNode {
public:
explicit NetUDP_COMB(const string&n, unsigned pins);
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void dump_node(ostream&, unsigned ind) const;
/* append a new truth table row. */
@ -1088,7 +1088,7 @@ class NetProc : public LineInfo {
// This method is called to emit the statement to the
// target. The target returns true if OK, false for errors.
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
// This method is called by functors that want to scan a
// process in search of matchable patterns.
@ -1152,8 +1152,8 @@ class NetAssign : public NetAssign_ {
NetExpr*mux, NetExpr*rv);
~NetAssign();
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual int match_proc(struct proc_match_t*);
virtual void dump(ostream&, unsigned ind) const;
virtual void dump_node(ostream&, unsigned ind) const;
@ -1172,8 +1172,8 @@ class NetAssignNB : public NetAssign_ {
~NetAssignNB();
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual int match_proc(struct proc_match_t*);
virtual void dump(ostream&, unsigned ind) const;
virtual void dump_node(ostream&, unsigned ind) const;
@ -1214,7 +1214,7 @@ class NetAssignMem : public NetAssignMem_ {
~NetAssignMem();
virtual int match_proc(struct proc_match_t*);
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1227,7 +1227,7 @@ class NetAssignMemNB : public NetAssignMem_ {
~NetAssignMemNB();
virtual int match_proc(struct proc_match_t*);
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1259,9 +1259,9 @@ class NetBlock : public NetProc {
// This version of emit_recurse scans all the statements of
// the begin-end block sequentially. It is typically of use
// for sequential blocks.
void emit_recurse(ostream&, struct target_t*) const;
void emit_recurse(struct target_t*) const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual int match_proc(struct proc_match_t*);
virtual void dump(ostream&, unsigned ind) const;
@ -1298,7 +1298,7 @@ class NetCase : public NetProc {
const NetExpr*expr(unsigned idx) const { return items_[idx].guard;}
const NetProc*stat(unsigned idx) const { return items_[idx].statement; }
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1334,9 +1334,9 @@ class NetCAssign : public NetProc, public NetNode {
const Link& lval_pin(unsigned) const;
virtual void dump(ostream&, unsigned ind) const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
private:
NetNet*lval_;
@ -1364,10 +1364,10 @@ class NetCondit : public NetProc {
// Replace the condition expression.
void set_expr(NetExpr*ex);
void emit_recurse_if(ostream&, struct target_t*) const;
void emit_recurse_else(ostream&, struct target_t*) const;
void emit_recurse_if(struct target_t*) const;
void emit_recurse_else(struct target_t*) const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual int match_proc(struct proc_match_t*);
virtual void dump(ostream&, unsigned ind) const;
@ -1391,7 +1391,7 @@ class NetDeassign : public NetProc {
const NetNet*lval() const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1419,7 +1419,7 @@ class NetDisable : public NetProc {
const NetScope*target() const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1529,7 +1529,7 @@ class NetEvTrig : public NetProc {
const NetEvent*event() const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1553,8 +1553,8 @@ class NetEvWait : public NetProc {
NetProc*statement();
virtual bool emit_proc(ostream&, struct target_t*) const;
bool emit_recurse(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
bool emit_recurse(struct target_t*) const;
virtual int match_proc(struct proc_match_t*);
virtual void dump(ostream&, unsigned ind) const;
@ -1580,7 +1580,7 @@ class NetEvProbe : public NetNode {
NetEvent* event();
const NetEvent* event() const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
virtual void dump_node(ostream&, unsigned ind) const;
private:
@ -1609,9 +1609,9 @@ class NetForce : public NetProc, public NetNode {
const Link& lval_pin(unsigned) const;
virtual void dump(ostream&, unsigned ind) const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump_node(ostream&, unsigned ind) const;
virtual void emit_node(ostream&, struct target_t*) const;
virtual void emit_node(struct target_t*) const;
private:
NetNet*lval_;
@ -1627,9 +1627,9 @@ class NetForever : public NetProc {
explicit NetForever(NetProc*s);
~NetForever();
void emit_recurse(ostream&, struct target_t*) const;
void emit_recurse(struct target_t*) const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1689,10 +1689,10 @@ class NetPDelay : public NetProc {
unsigned long delay() const;
const NetExpr*expr() const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
bool emit_proc_recurse(ostream&, struct target_t*) const;
bool emit_proc_recurse(struct target_t*) const;
private:
unsigned long delay_;
@ -1710,9 +1710,9 @@ class NetRepeat : public NetProc {
~NetRepeat();
const NetExpr*expr() const;
void emit_recurse(ostream&, struct target_t*) const;
void emit_recurse(struct target_t*) const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1734,7 +1734,7 @@ class NetRelease : public NetProc {
const NetNet*lval() const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1760,7 +1760,7 @@ class NetSTask : public NetProc {
const NetExpr* parm(unsigned idx) const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1858,7 +1858,7 @@ class NetUTask : public NetProc {
const string& name() const { return task_->name(); }
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1878,9 +1878,9 @@ class NetWhile : public NetProc {
const NetExpr*expr() const { return cond_; }
void emit_proc_recurse(ostream&, struct target_t*) const;
void emit_proc_recurse(struct target_t*) const;
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual bool emit_proc(struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
private:
@ -1907,7 +1907,7 @@ class NetProcTop : public LineInfo {
const NetProc*statement() const;
void dump(ostream&, unsigned ind) const;
bool emit(ostream&, struct target_t*tgt) const;
bool emit(struct target_t*tgt) const;
private:
const Type type_;
@ -2522,8 +2522,8 @@ class NetScope {
string local_symbol();
void dump(ostream&) const;
void emit_scope(ostream&o, struct target_t*tgt) const;
void emit_defs(ostream&o, struct target_t*tgt) const;
void emit_scope(struct target_t*tgt) const;
void emit_defs(struct target_t*tgt) const;
/* This method runs the functor on me. Recurse through the
children of this node as well. */
@ -2722,6 +2722,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/*
* $Log: netlist.h,v $
* Revision 1.154 2000/08/08 01:50:42 steve
* target methods need not take a file stream.
*
* Revision 1.153 2000/08/02 14:48:15 steve
* cleanup.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-null.cc,v 1.13 2000/07/29 16:21:08 steve Exp $"
#ident "$Id: t-null.cc,v 1.14 2000/08/08 01:50:42 steve Exp $"
#endif
# include "netlist.h"
@ -30,30 +30,32 @@
static class target_null_t : public target_t {
public:
void bufz(ostream&os, const NetBUFZ*) { }
void event(ostream&, const NetEvent*) { }
void func_def(ostream&, const NetFuncDef*) { }
void memory(ostream&, const NetMemory*) { }
void task_def(ostream&, const NetTaskDef*) { }
void net_assign(ostream&os, const NetAssign*) { }
void net_assign_nb(ostream&os, const NetAssignNB*) { }
void net_const(ostream&, const NetConst*) { }
void net_esignal(ostream&, const NetESignal*) { }
void net_probe(ostream&, const NetEvProbe*) { }
bool proc_block(ostream&, const NetBlock*) { return true; }
void proc_condit(ostream&, const NetCondit*) { }
bool proc_delay(ostream&, const NetPDelay*) { return true; }
void proc_forever(ostream&, const NetForever*) { }
void proc_repeat(ostream&, const NetRepeat*) { }
void proc_stask(ostream&, const NetSTask*) { }
void proc_utask(ostream&os, const NetUTask*) { }
bool proc_wait(ostream&os, const NetEvWait*) { return true; }
void bufz(const NetBUFZ*) { }
void event(const NetEvent*) { }
void func_def(const NetFuncDef*) { }
void memory(const NetMemory*) { }
void task_def(const NetTaskDef*) { }
void net_assign(const NetAssign*) { }
void net_assign_nb(const NetAssignNB*) { }
void net_const(const NetConst*) { }
void net_probe(const NetEvProbe*) { }
bool proc_block(const NetBlock*) { return true; }
void proc_condit(const NetCondit*) { }
bool proc_delay(const NetPDelay*) { return true; }
void proc_forever(const NetForever*) { }
void proc_repeat(const NetRepeat*) { }
void proc_stask(const NetSTask*) { }
void proc_utask(const NetUTask*) { }
bool proc_wait(const NetEvWait*) { return true; }
} target_null_obj;
extern const struct target tgt_null = { "null", &target_null_obj };
/*
* $Log: t-null.cc,v $
* Revision 1.14 2000/08/08 01:50:42 steve
* target methods need not take a file stream.
*
* Revision 1.13 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-verilog.cc,v 1.11 2000/07/29 16:21:08 steve Exp $"
#ident "$Id: t-verilog.cc,v 1.12 2000/08/08 01:50:42 steve Exp $"
#endif
/*
@ -39,17 +39,24 @@ extern const struct target tgt_verilog;
class target_verilog : public target_t {
public:
virtual void start_design(ostream&os, const Design*);
virtual void signal(ostream&os, const NetNet*);
virtual void logic(ostream&os, const NetLogic*);
virtual void bufz(ostream&os, const NetBUFZ*);
virtual void start_process(ostream&os, const NetProcTop*);
virtual bool proc_block(ostream&os, const NetBlock*);
virtual bool proc_delay(ostream&os, const NetPDelay*);
virtual void proc_stask(ostream&os, const NetSTask*);
virtual void end_design(ostream&os, const Design*);
virtual void signal(const NetNet*);
virtual void logic(const NetLogic*);
virtual void bufz(const NetBUFZ*);
virtual bool process(const NetProcTop*);
virtual bool proc_block(const NetBlock*);
virtual bool proc_delay(const NetPDelay*);
virtual void proc_stask(const NetSTask*);
virtual void end_design(const Design*);
private:
void start_process(const NetProcTop*);
void end_process(const NetProcTop*);
unsigned indent_;
ostream*out_;
# define OS (*out_)
void emit_expr_(ostream&os, const NetExpr*);
};
@ -64,6 +71,7 @@ void target_verilog::start_design(ostream&os, const Design*)
{
indent_ = 0;
os << "module " << "main" << ";" << endl;
out_ = &os;
}
/*
@ -71,85 +79,97 @@ void target_verilog::start_design(ostream&os, const Design*)
* chance to declare signal variables before the network is assembled
* or behaviors are written.
*/
void target_verilog::signal(ostream&os, const NetNet*net)
void target_verilog::signal(const NetNet*net)
{
os << " " << net->type();
OS << " " << net->type();
if (net->pin_count() > 1)
os << " [" << net->msb() << ":" << net->lsb() << "]";
OS << " [" << net->msb() << ":" << net->lsb() << "]";
if (net->rise_time())
os << " #" << net->rise_time();
OS << " #" << net->rise_time();
os << " " << mangle(net->name()) << ";" << endl;
OS << " " << mangle(net->name()) << ";" << endl;
}
void target_verilog::logic(ostream&os, const NetLogic*net)
void target_verilog::logic(const NetLogic*net)
{
switch (net->type()) {
case NetLogic::AND:
os << " and";
OS << " and";
break;
case NetLogic::NAND:
os << " nand";
OS << " nand";
break;
case NetLogic::NOR:
os << " nor";
OS << " nor";
break;
case NetLogic::NOT:
os << " not";
OS << " not";
break;
case NetLogic::OR:
os << " or";
OS << " or";
break;
case NetLogic::XNOR:
os << " xnor";
OS << " xnor";
break;
case NetLogic::XOR:
os << " xor";
OS << " xor";
break;
}
os << " #" << net->rise_time() << " " << mangle(net->name()) << "(";
OS << " #" << net->rise_time() << " " << mangle(net->name()) << "(";
unsigned sidx;
const NetNet*sig = find_link_signal(net, 0, sidx);
os << mangle(sig->name()) << "[" << sidx << "]";
OS << mangle(sig->name()) << "[" << sidx << "]";
for (unsigned idx = 1 ; idx < net->pin_count() ; idx += 1) {
sig = find_link_signal(net, idx, sidx);
assert(sig);
os << ", " << mangle(sig->name()) << "[" << sidx << "]";
OS << ", " << mangle(sig->name()) << "[" << sidx << "]";
}
os << ");" << endl;
OS << ");" << endl;
}
void target_verilog::bufz(ostream&os, const NetBUFZ*net)
void target_verilog::bufz(const NetBUFZ*net)
{
assert( net->pin_count() == 2 );
os << " assign ";
OS << " assign ";
unsigned sidx;
const NetNet*sig = find_link_signal(net, 0, sidx);
os << mangle(sig->name()) << "[" << sidx << "] = ";
OS << mangle(sig->name()) << "[" << sidx << "] = ";
sig = find_link_signal(net, 1, sidx);
os << mangle(sig->name()) << "[" << sidx << "];" << endl;
OS << mangle(sig->name()) << "[" << sidx << "];" << endl;
}
void target_verilog::start_process(ostream&os, const NetProcTop*proc)
bool target_verilog::process(const NetProcTop*top)
{
start_process(top);
bool rc = top->statement()->emit_proc(this);
end_process(top);
return rc;
}
void target_verilog::start_process(const NetProcTop*proc)
{
switch (proc->type()) {
case NetProcTop::KINITIAL:
os << " initial" << endl;
OS << " initial" << endl;
break;
case NetProcTop::KALWAYS:
os << " always" << endl;
OS << " always" << endl;
break;
}
indent_ = 6;
}
void target_verilog::end_process(const NetProcTop*)
{
}
void target_verilog::emit_expr_(ostream&os, const NetExpr*expr)
{
@ -172,22 +192,22 @@ void target_verilog::emit_expr_(ostream&os, const NetExpr*expr)
}
}
bool target_verilog::proc_block(ostream&os, const NetBlock*net)
bool target_verilog::proc_block(const NetBlock*net)
{
os << setw(indent_) << "" << "begin" << endl;
OS << setw(indent_) << "" << "begin" << endl;
indent_ += 4;
net->emit_recurse(os, this);
net->emit_recurse(this);
indent_ -= 4;
os << setw(indent_) << "" << "end" << endl;
OS << setw(indent_) << "" << "end" << endl;
return true;
}
bool target_verilog::proc_delay(ostream&os, const NetPDelay*net)
bool target_verilog::proc_delay(const NetPDelay*net)
{
os << setw(indent_) << "" << "#" << net->delay() << endl;
OS << setw(indent_) << "" << "#" << net->delay() << endl;
indent_ += 4;
bool flag = net->emit_proc_recurse(os, this);
bool flag = net->emit_proc_recurse(this);
indent_ -= 4;
return flag;
}
@ -208,20 +228,20 @@ static void vtask_parm(ostream&os, const NetExpr*ex)
}
}
void target_verilog::proc_stask(ostream&os, const NetSTask*net)
void target_verilog::proc_stask(const NetSTask*net)
{
os << setw(indent_) << "" << net->name();
OS << setw(indent_) << "" << net->name();
if (net->nparms() > 0) {
os << "(";
vtask_parm(os, net->parm(0));
OS << "(";
vtask_parm(OS, net->parm(0));
for (unsigned idx = 1 ; idx < net->nparms() ; idx += 1) {
os << ", ";
vtask_parm(os, net->parm(idx));
OS << ", ";
vtask_parm(OS, net->parm(idx));
}
os << ")";
OS << ")";
}
os << ";" << endl;
OS << ";" << endl;
}
@ -229,9 +249,9 @@ void target_verilog::proc_stask(ostream&os, const NetSTask*net)
* All done with the design. Flush any output that I've been holding
* off, and write the footers for the target.
*/
void target_verilog::end_design(ostream&os, const Design*)
void target_verilog::end_design(const Design*)
{
os << "endmodule" << endl;
OS << "endmodule" << endl;
}
static target_verilog tgt_verilog_obj;
@ -243,6 +263,9 @@ const struct target tgt_verilog = {
/*
* $Log: t-verilog.cc,v $
* Revision 1.12 2000/08/08 01:50:42 steve
* target methods need not take a file stream.
*
* Revision 1.11 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*

420
t-vvm.cc

File diff suppressed because it is too large Load Diff

185
t-xnf.cc
View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-xnf.cc,v 1.32 2000/07/14 06:12:58 steve Exp $"
#ident "$Id: t-xnf.cc,v 1.33 2000/08/08 01:50:42 steve Exp $"
#endif
/* XNF BACKEND
@ -95,23 +95,23 @@ class target_xnf : public target_t {
public:
void start_design(ostream&os, const Design*);
void end_design(ostream&os, const Design*);
void memory(ostream&os, const NetMemory*);
void signal(ostream&os, const NetNet*);
void end_design(const Design*);
void memory(const NetMemory*);
void signal(const NetNet*);
void lpm_add_sub(ostream&os, const NetAddSub*);
void lpm_compare(ostream&os, const NetCompare*);
void lpm_add_sub(const NetAddSub*);
void lpm_compare(const NetCompare*);
void lpm_compare_eq_(ostream&os, const NetCompare*);
void lpm_compare_ge_(ostream&os, const NetCompare*);
void lpm_compare_le_(ostream&os, const NetCompare*);
void lpm_ff(ostream&os, const NetFF*);
void lpm_mux(ostream&os, const NetMux*);
void lpm_ram_dq(ostream&os, const NetRamDq*);
void lpm_ff(const NetFF*);
void lpm_mux(const NetMux*);
void lpm_ram_dq(const NetRamDq*);
void net_const(ostream&os, const NetConst*);
void logic(ostream&os, const NetLogic*);
void bufz(ostream&os, const NetBUFZ*);
void udp(ostream&os, const NetUDP*);
void net_const(const NetConst*);
void logic(const NetLogic*);
void bufz(const NetBUFZ*);
void udp(const NetUDP*);
private:
static string mangle(const string&);
@ -125,6 +125,8 @@ class target_xnf : public target_t {
static void draw_carry(ostream&os, const NetAddSub*, unsigned idx,
enum adder_type);
ostream*out_;
#define OS (*out_)
ofstream ncf_;
};
@ -233,9 +235,9 @@ void target_xnf::start_design(ostream&os, const Design*des)
}
}
void target_xnf::end_design(ostream&os, const Design*)
void target_xnf::end_design(const Design*)
{
os << "EOF" << endl;
OS << "EOF" << endl;
ncf_.close();
}
@ -282,7 +284,7 @@ void scrape_pad_info(string str, char&dir, unsigned&num)
* Memories are handled by the lpm_ram_dq method, so there is nothing
* to do here.
*/
void target_xnf::memory(ostream&, const NetMemory*)
void target_xnf::memory(const NetMemory*)
{
}
@ -297,7 +299,7 @@ void target_xnf::memory(ostream&, const NetMemory*)
* descriptions, that enumerate the pins from most significant to
* least significant.
*/
void target_xnf::signal(ostream&os, const NetNet*net)
void target_xnf::signal(const NetNet*net)
{
/* Look for signals that are ports to the root module. If they
@ -316,11 +318,11 @@ void target_xnf::signal(ostream&os, const NetNet*net)
string pname = mname.substr(mname.find('/')+1, mname.length());
if (net->pin_count() == 1) {
os << "SIG, " << mangle(net->name()) << ", PIN="
OS << "SIG, " << mangle(net->name()) << ", PIN="
<< pname << endl;
} else for (unsigned idx = 0; idx < net->pin_count(); idx += 1) {
os << "SIG, " << mangle(net->name()) << "<" << idx
OS << "SIG, " << mangle(net->name()) << "<" << idx
<< ">, PIN=" << pname << idx << endl;
}
@ -343,7 +345,7 @@ void target_xnf::signal(ostream&os, const NetNet*net)
char dir;
unsigned num;
scrape_pad_info(pad, dir, num);
os << "EXT, " << mangle(net->name()) << ", " << dir
OS << "EXT, " << mangle(net->name()) << ", " << dir
<< ", " << num << endl;
ncf_ << "# Assignment to pin " << num << " (DIR=" << dir <<
@ -469,7 +471,7 @@ void target_xnf::draw_carry(ostream &os, const NetAddSub*gate, unsigned idx,
* Application note XAPP013
* Xilinx Libraries Guide, Chapter 12
*/
void target_xnf::lpm_add_sub(ostream&os, const NetAddSub*gate)
void target_xnf::lpm_add_sub(const NetAddSub*gate)
{
unsigned width = gate->width();
@ -477,13 +479,13 @@ void target_xnf::lpm_add_sub(ostream&os, const NetAddSub*gate)
bits of the carry chain. Label this with the width instead
of the bit position so that symbols don't clash. */
draw_carry(os, gate, width+1, FORCE0);
draw_carry(OS, gate, width+1, FORCE0);
/* Now make the 2 bit adders that chain from the cin
initializer and up. Save the tail bits for later. */
for (unsigned idx = 0 ; idx < width-2 ; idx += 2)
draw_carry(os, gate, idx, DOUBLE);
draw_carry(OS, gate, idx, DOUBLE);
/* Always have one or two tail bits. The situation gets a
little tricky if we want the carry output, so handle that
@ -507,23 +509,23 @@ void target_xnf::lpm_add_sub(ostream&os, const NetAddSub*gate)
if (gate->pin_Cout().is_linked()) {
if (width%2 == 0) {
draw_carry(os, gate, width-2, DOUBLE);
draw_carry(os, gate, width, EXAMINE_CI);
draw_carry(OS, gate, width-2, DOUBLE);
draw_carry(OS, gate, width, EXAMINE_CI);
} else {
draw_carry(os, gate, width-1, LOWER_W_CO);
draw_carry(OS, gate, width-1, LOWER_W_CO);
}
} else {
if (width%2 == 0)
draw_carry(os, gate, width-2, LOWER);
draw_carry(OS, gate, width-2, LOWER);
else
draw_carry(os, gate, width-1, LOWER);
draw_carry(OS, gate, width-1, LOWER);
}
/* Now draw all the single bit (plus carry in) adders from XOR
gates. This puts the F and G units to use. */
for (unsigned idx = 0 ; idx < width ; idx += 1)
draw_xor(os, gate, idx);
draw_xor(OS, gate, idx);
}
@ -532,20 +534,20 @@ void target_xnf::lpm_add_sub(ostream&os, const NetAddSub*gate)
* comparator being implemented. So, here we dispatch to the correct
* code generator.
*/
void target_xnf::lpm_compare(ostream&os, const NetCompare*dev)
void target_xnf::lpm_compare(const NetCompare*dev)
{
if (dev->pin_AEB().is_linked()) {
lpm_compare_eq_(os, dev);
lpm_compare_eq_(OS, dev);
return;
}
if (dev->pin_AGEB().is_linked()) {
lpm_compare_ge_(os, dev);
lpm_compare_ge_(OS, dev);
return;
}
if (dev->pin_ALEB().is_linked()) {
lpm_compare_le_(os, dev);
lpm_compare_le_(OS, dev);
return;
}
@ -639,7 +641,7 @@ void target_xnf::lpm_compare_le_(ostream&os, const NetCompare*dev)
cerr << "XXXX LE not supported yet" << endl;
}
void target_xnf::lpm_ff(ostream&os, const NetFF*net)
void target_xnf::lpm_ff(const NetFF*net)
{
string type = net->attribute("LPM_FFType");
if (type == "") type = "DFF";
@ -649,7 +651,7 @@ void target_xnf::lpm_ff(ostream&os, const NetFF*net)
string lcaname = net->attribute("XNF-LCA");
if (lcaname != "") {
draw_sym_with_lcaname(os, lcaname, net);
draw_sym_with_lcaname(OS, lcaname, net);
return;
}
@ -665,30 +667,30 @@ void target_xnf::lpm_ff(ostream&os, const NetFF*net)
verinum::V ival = link_get_ival(net->pin_Q(idx));
os << "SYM, " << mangle(net->name()) << "<" << idx << ">, DFF, ";
OS << "SYM, " << mangle(net->name()) << "<" << idx << ">, DFF, ";
switch (ival) {
case verinum::V0:
os << "INIT=R, ";
OS << "INIT=R, ";
break;
case verinum::V1:
os << "INIT=S, ";
OS << "INIT=S, ";
break;
}
os << "LIBVER=2.0.0" << endl;
draw_pin(os, "Q", net->pin_Q(idx));
draw_pin(os, "D", net->pin_Data(idx));
OS << "LIBVER=2.0.0" << endl;
draw_pin(OS, "Q", net->pin_Q(idx));
draw_pin(OS, "D", net->pin_Data(idx));
if (net->attribute("Clock:LPM_Polarity") == "INVERT")
draw_pin(os, "~C", net->pin_Clock());
draw_pin(OS, "~C", net->pin_Clock());
else
draw_pin(os, "C", net->pin_Clock());
draw_pin(OS, "C", net->pin_Clock());
if (count_outputs(net->pin_Enable()) > 0)
draw_pin(os, "CE", net->pin_Enable());
draw_pin(OS, "CE", net->pin_Enable());
os << "END" << endl;
OS << "END" << endl;
}
}
@ -699,51 +701,51 @@ void target_xnf::lpm_ff(ostream&os, const NetFF*net)
* devices that have a single select input. These are typically
* generated from ?: expressions.
*/
void target_xnf::lpm_mux(ostream&os, const NetMux*net)
void target_xnf::lpm_mux(const NetMux*net)
{
assert(net->sel_width() == 1);
assert(net->size() == 2);
for (unsigned idx = 0 ; idx < net->width() ; idx += 1) {
os << "SYM, " << mangle(net->name()) << "<" << idx << ">,"
OS << "SYM, " << mangle(net->name()) << "<" << idx << ">,"
<< " EQN, EQN=(I0 * I2) + (~I0 * I1)" << endl;
draw_pin(os, "I0", net->pin_Sel(0));
draw_pin(os, "I1", net->pin_Data(idx,0));
draw_pin(os, "I2", net->pin_Data(idx,1));
draw_pin(os, "O", net->pin_Result(idx));
draw_pin(OS, "I0", net->pin_Sel(0));
draw_pin(OS, "I1", net->pin_Data(idx,0));
draw_pin(OS, "I2", net->pin_Data(idx,1));
draw_pin(OS, "O", net->pin_Result(idx));
os << "END" << endl;
OS << "END" << endl;
}
}
void target_xnf::lpm_ram_dq(ostream&os, const NetRamDq*ram)
void target_xnf::lpm_ram_dq(const NetRamDq*ram)
{
assert(ram->count_partners() == 1);
const NetMemory*mem = ram->mem();
for (unsigned idx = 0 ; idx < ram->width() ; idx += 1) {
os << "SYM, " << mangle(ram->name())
OS << "SYM, " << mangle(ram->name())
<< "<" << idx << ">, RAMS" << endl;
draw_pin(os, "O", ram->pin_Q(idx));
draw_pin(os, "D", ram->pin_Data(idx));
draw_pin(os, "WE", ram->pin_WE());
draw_pin(os, "WCLK", ram->pin_InClock());
draw_pin(OS, "O", ram->pin_Q(idx));
draw_pin(OS, "D", ram->pin_Data(idx));
draw_pin(OS, "WE", ram->pin_WE());
draw_pin(OS, "WCLK", ram->pin_InClock());
for (unsigned adr = 0 ; adr < ram->awidth() ; adr += 1) {
strstream tmp;
tmp << "A" << adr << ends;
draw_pin(os, tmp.str(), ram->pin_Address(adr));
draw_pin(OS, tmp.str(), ram->pin_Address(adr));
}
os << "END" << endl;
OS << "END" << endl;
}
}
void target_xnf::net_const(ostream&os, const NetConst*c)
void target_xnf::net_const(const NetConst*c)
{
for (unsigned idx = 0 ; idx < c->pin_count() ; idx += 1) {
verinum::V v=c->value(idx);
@ -754,7 +756,7 @@ void target_xnf::net_const(ostream&os, const NetConst*c)
unsigned cpin;
const NetObj*cur;
os << " PWR, " << v << ", " << choose_sig_name(&lnk) << endl;
OS << " PWR, " << v << ", " << choose_sig_name(&lnk) << endl;
}
}
@ -762,54 +764,54 @@ void target_xnf::net_const(ostream&os, const NetConst*c)
* The logic gates I know so far can be translated directly into XNF
* standard symbol types. This is a fairly obvious transformation.
*/
void target_xnf::logic(ostream&os, const NetLogic*net)
void target_xnf::logic(const NetLogic*net)
{
// The XNF-LCA attribute overrides anything I might guess
// about this object.
string lca = net->attribute("XNF-LCA");
if (lca != "") {
draw_sym_with_lcaname(os, lca, net);
draw_sym_with_lcaname(OS, lca, net);
return;
}
os << "SYM, " << mangle(net->name()) << ", ";
OS << "SYM, " << mangle(net->name()) << ", ";
switch (net->type()) {
case NetLogic::AND:
os << "AND";
OS << "AND";
break;
case NetLogic::BUF:
os << "BUF";
OS << "BUF";
break;
case NetLogic::NAND:
os << "NAND";
OS << "NAND";
break;
case NetLogic::NOR:
os << "NOR";
OS << "NOR";
break;
case NetLogic::NOT:
os << "INV";
OS << "INV";
break;
case NetLogic::OR:
os << "OR";
OS << "OR";
break;
case NetLogic::XNOR:
os << "XNOR";
OS << "XNOR";
break;
case NetLogic::XOR:
os << "XOR";
OS << "XOR";
break;
case NetLogic::BUFIF0:
case NetLogic::BUFIF1:
os << "TBUF";
OS << "TBUF";
break;
default:
cerr << "internal error: XNF: Unhandled logic type." << endl;
break;
}
os << ", LIBVER=2.0.0" << endl;
OS << ", LIBVER=2.0.0" << endl;
/* All of these kinds of devices have an output on pin 0. */
draw_pin(os, "O", net->pin(0));
draw_pin(OS, "O", net->pin(0));
/* Most devices have inputs called I<N> for all the remaining
pins. The TBUF devices are slightly different, but
@ -818,32 +820,32 @@ void target_xnf::logic(ostream&os, const NetLogic*net)
case NetLogic::BUFIF0:
assert(net->pin_count() == 3);
draw_pin(os, "I", net->pin(1));
draw_pin(os, "~T", net->pin(2));
draw_pin(OS, "I", net->pin(1));
draw_pin(OS, "~T", net->pin(2));
break;
case NetLogic::BUFIF1:
assert(net->pin_count() == 3);
draw_pin(os, "I", net->pin(1));
draw_pin(os, "T", net->pin(2));
draw_pin(OS, "I", net->pin(1));
draw_pin(OS, "T", net->pin(2));
break;
default:
if (net->pin_count() == 2) {
draw_pin(os, "I", net->pin(1));
draw_pin(OS, "I", net->pin(1));
} else for (unsigned idx = 1; idx < net->pin_count(); idx += 1) {
string name = "I";
assert(net->pin_count() <= 11);
name += (char)('0'+idx-1);
draw_pin(os, name, net->pin(idx));
draw_pin(OS, name, net->pin(idx));
}
break;
}
os << "END" << endl;
OS << "END" << endl;
}
void target_xnf::bufz(ostream&os, const NetBUFZ*net)
void target_xnf::bufz(const NetBUFZ*net)
{
static int warned_once=0;
if (!warned_once) {
@ -851,14 +853,14 @@ void target_xnf::bufz(ostream&os, const NetBUFZ*net)
<< endl;
warned_once=1;
}
os << "SYM, " << mangle(net->name()) << ", BUF, LIBVER=2.0.0" << endl;
OS << "SYM, " << mangle(net->name()) << ", BUF, LIBVER=2.0.0" << endl;
assert(net->pin_count() == 2);
draw_pin(os, "O", net->pin(0));
draw_pin(os, "I", net->pin(1));
os << "END" << endl;
draw_pin(OS, "O", net->pin(0));
draw_pin(OS, "I", net->pin(1));
OS << "END" << endl;
}
void target_xnf::udp(ostream&os, const NetUDP*net)
void target_xnf::udp(const NetUDP*net)
{
string lca = net->attribute("XNF-LCA");
@ -869,7 +871,7 @@ void target_xnf::udp(ostream&os, const NetUDP*net)
return;
}
draw_sym_with_lcaname(os, lca, net);
draw_sym_with_lcaname(OS, lca, net);
}
static target_xnf target_xnf_obj;
@ -878,6 +880,9 @@ extern const struct target tgt_xnf = { "xnf", &target_xnf_obj };
/*
* $Log: t-xnf.cc,v $
* Revision 1.33 2000/08/08 01:50:42 steve
* target methods need not take a file stream.
*
* Revision 1.32 2000/07/14 06:12:58 steve
* Move inital value handling from NetNet to Nexus
* objects. This allows better propogation of inital

101
target.cc
View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: target.cc,v 1.41 2000/07/29 16:21:08 steve Exp $"
#ident "$Id: target.cc,v 1.42 2000/08/08 01:50:42 steve Exp $"
#endif
# include "target.h"
@ -31,209 +31,209 @@ void target_t::start_design(ostream&os, const Design*)
{
}
void target_t::scope(ostream&, const NetScope*)
void target_t::scope(const NetScope*)
{
}
void target_t::event(ostream&, const NetEvent*ev)
void target_t::event(const NetEvent*ev)
{
cerr << ev->get_line() << ": error: target (" << typeid(*this).name()
<< "): Unhandled event <" << ev->full_name() << ">." << endl;
}
void target_t::signal(ostream&os, const NetNet*)
void target_t::signal(const NetNet*)
{
}
void target_t::memory(ostream&os, const NetMemory*)
void target_t::memory(const NetMemory*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled memory." << endl;
}
void target_t::func_def(ostream&os, const NetFuncDef*)
void target_t::func_def(const NetFuncDef*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled function definition." << endl;
}
void target_t::task_def(ostream&os, const NetTaskDef*)
void target_t::task_def(const NetTaskDef*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled task definition." << endl;
}
void target_t::logic(ostream&os, const NetLogic*)
void target_t::logic(const NetLogic*)
{
}
void target_t::bufz(ostream&os, const NetBUFZ*)
void target_t::bufz(const NetBUFZ*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled continuous assign (BUFZ)." << endl;
}
void target_t::udp(ostream&os, const NetUDP*)
void target_t::udp(const NetUDP*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled UDP." << endl;
}
void target_t::udp_comb(ostream&os, const NetUDP_COMB*)
void target_t::udp_comb(const NetUDP_COMB*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled combinational primitive." << endl;
}
void target_t::lpm_add_sub(ostream&, const NetAddSub*)
void target_t::lpm_add_sub(const NetAddSub*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetAddSub." << endl;
}
void target_t::lpm_clshift(ostream&, const NetCLShift*)
void target_t::lpm_clshift(const NetCLShift*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetCLShift." << endl;
}
void target_t::lpm_compare(ostream&, const NetCompare*)
void target_t::lpm_compare(const NetCompare*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetCompare." << endl;
}
void target_t::lpm_divide(ostream&, const NetDivide*)
void target_t::lpm_divide(const NetDivide*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetDivide." << endl;
}
void target_t::lpm_ff(ostream&, const NetFF*)
void target_t::lpm_ff(const NetFF*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetFF." << endl;
}
void target_t::lpm_mult(ostream&, const NetMult*)
void target_t::lpm_mult(const NetMult*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetMult." << endl;
}
void target_t::lpm_mux(ostream&, const NetMux*)
void target_t::lpm_mux(const NetMux*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetMux." << endl;
}
void target_t::lpm_ram_dq(ostream&, const NetRamDq*)
void target_t::lpm_ram_dq(const NetRamDq*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetRamDq." << endl;
}
void target_t::net_assign(ostream&os, const NetAssign*)
void target_t::net_assign(const NetAssign*)
{
}
void target_t::net_assign_nb(ostream&os, const NetAssignNB*)
void target_t::net_assign_nb(const NetAssignNB*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled non-blocking assignment node." << endl;
}
void target_t::net_case_cmp(ostream&os, const NetCaseCmp*)
void target_t::net_case_cmp(const NetCaseCmp*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled case compare node." << endl;
}
bool target_t::net_cassign(ostream&os, const NetCAssign*dev)
bool target_t::net_cassign(const NetCAssign*dev)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetCAssign node." << endl;
return false;
}
void target_t::net_const(ostream&os, const NetConst*)
void target_t::net_const(const NetConst*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled CONSTANT node." << endl;
}
bool target_t::net_force(ostream&os, const NetForce*dev)
bool target_t::net_force(const NetForce*dev)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled NetForce node." << endl;
return false;
}
void target_t::net_probe(ostream&os, const NetEvProbe*net)
void target_t::net_probe(const NetEvProbe*net)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled probe trigger node" << endl;
net->dump_node(cerr, 4);
}
bool target_t::process(ostream&os, const NetProcTop*top)
bool target_t::process(const NetProcTop*top)
{
return top->statement()->emit_proc(os, this);
return top->statement()->emit_proc(this);
}
void target_t::proc_assign(ostream&os, const NetAssign*)
void target_t::proc_assign(const NetAssign*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled procedural assignment." << endl;
}
void target_t::proc_assign_mem(ostream&os, const NetAssignMem*)
void target_t::proc_assign_mem(const NetAssignMem*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled memory assignment." << endl;
}
void target_t::proc_assign_nb(ostream&os, const NetAssignNB*)
void target_t::proc_assign_nb(const NetAssignNB*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled non-blocking assignment." << endl;
}
void target_t::proc_assign_mem_nb(ostream&os, const NetAssignMemNB*)
void target_t::proc_assign_mem_nb(const NetAssignMemNB*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled non-blocking memory assignment." << endl;
}
bool target_t::proc_block(ostream&os, const NetBlock*)
bool target_t::proc_block(const NetBlock*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_block." << endl;
return false;
}
void target_t::proc_case(ostream&os, const NetCase*cur)
void target_t::proc_case(const NetCase*cur)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled case:" << endl;
cur->dump(cerr, 6);
}
bool target_t::proc_cassign(ostream&os, const NetCAssign*dev)
bool target_t::proc_cassign(const NetCAssign*dev)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_cassign." << endl;
return false;
}
void target_t::proc_condit(ostream&os, const NetCondit*condit)
void target_t::proc_condit(const NetCondit*condit)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled conditional:" << endl;
condit->dump(cerr, 6);
}
bool target_t::proc_deassign(ostream&os, const NetDeassign*dev)
bool target_t::proc_deassign(const NetDeassign*dev)
{
cerr << dev->get_line() << ": internal error: "
<< "target (" << typeid(*this).name() << "): "
@ -241,14 +241,14 @@ bool target_t::proc_deassign(ostream&os, const NetDeassign*dev)
return false;
}
bool target_t::proc_delay(ostream&os, const NetPDelay*)
bool target_t::proc_delay(const NetPDelay*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_delay." << endl;
return false;
}
bool target_t::proc_disable(ostream&os, const NetDisable*obj)
bool target_t::proc_disable(const NetDisable*obj)
{
cerr << obj->get_line() << ": internal error: "
<< "target (" << typeid(*this).name() << "): "
@ -256,20 +256,20 @@ bool target_t::proc_disable(ostream&os, const NetDisable*obj)
return false;
}
bool target_t::proc_force(ostream&os, const NetForce*dev)
bool target_t::proc_force(const NetForce*dev)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_force." << endl;
return false;
}
void target_t::proc_forever(ostream&os, const NetForever*)
void target_t::proc_forever(const NetForever*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_forever." << endl;
}
bool target_t::proc_release(ostream&os, const NetRelease*dev)
bool target_t::proc_release(const NetRelease*dev)
{
cerr << dev->get_line() << ": internal error: "
<< "target (" << typeid(*this).name() << "): "
@ -277,46 +277,46 @@ bool target_t::proc_release(ostream&os, const NetRelease*dev)
return false;
}
void target_t::proc_repeat(ostream&os, const NetRepeat*)
void target_t::proc_repeat(const NetRepeat*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_repeat." << endl;
}
bool target_t::proc_trigger(ostream&os, const NetEvTrig*tr)
bool target_t::proc_trigger(const NetEvTrig*tr)
{
cerr << tr->get_line() << ": error: target (" << typeid(*this).name()
<< "): Unhandled event trigger." << endl;
return false;
}
void target_t::proc_stask(ostream&os, const NetSTask*)
void target_t::proc_stask(const NetSTask*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_stask." << endl;
}
void target_t::proc_utask(ostream&os, const NetUTask*)
void target_t::proc_utask(const NetUTask*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_utask." << endl;
}
bool target_t::proc_wait(ostream&os, const NetEvWait*tr)
bool target_t::proc_wait(const NetEvWait*tr)
{
cerr << tr->get_line() << ": error: target (" << typeid(*this).name()
<< "): Unhandled event wait." << endl;
return false;
}
void target_t::proc_while(ostream&os, const NetWhile*net)
void target_t::proc_while(const NetWhile*net)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled while:" << endl;
net->dump(cerr, 6);
}
void target_t::end_design(ostream&os, const Design*)
void target_t::end_design(const Design*)
{
}
@ -398,6 +398,9 @@ void expr_scan_t::expr_binary(const NetEBinary*ex)
/*
* $Log: target.cc,v $
* Revision 1.42 2000/08/08 01:50:42 steve
* target methods need not take a file stream.
*
* Revision 1.41 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*

102
target.h
View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: target.h,v 1.40 2000/07/29 16:21:08 steve Exp $"
#ident "$Id: target.h,v 1.41 2000/08/08 01:50:42 steve Exp $"
#endif
# include "netlist.h"
@ -52,77 +52,78 @@ struct target {
struct target_t {
virtual ~target_t();
/* Start the design. */
/* Start the design. This sets the main output file stream
that the target should use. */
virtual void start_design(ostream&os, const Design*);
/* This is called once for each scope in the design, before
anything else is called. */
virtual void scope(ostream&os, const NetScope*);
virtual void scope(const NetScope*);
/* Output an event object. Called for each named event in the scope. */
virtual void event(ostream&os, const NetEvent*);
virtual void event(const NetEvent*);
/* Output a signal (called for each signal) */
virtual void signal(ostream&os, const NetNet*);
virtual void signal(const NetNet*);
/* Output a memory (called for each memory object) */
virtual void memory(ostream&os, const NetMemory*);
virtual void memory(const NetMemory*);
/* Output a defined task. */
virtual void task_def(ostream&, const NetTaskDef*);
virtual void func_def(ostream&, const NetFuncDef*);
virtual void task_def(const NetTaskDef*);
virtual void func_def(const NetFuncDef*);
/* LPM style components are handled here. */
virtual void lpm_add_sub(ostream&os, const NetAddSub*);
virtual void lpm_clshift(ostream&os, const NetCLShift*);
virtual void lpm_compare(ostream&os, const NetCompare*);
virtual void lpm_divide(ostream&os, const NetDivide*);
virtual void lpm_ff(ostream&os, const NetFF*);
virtual void lpm_mult(ostream&os, const NetMult*);
virtual void lpm_mux(ostream&os, const NetMux*);
virtual void lpm_ram_dq(ostream&os, const NetRamDq*);
virtual void lpm_add_sub(const NetAddSub*);
virtual void lpm_clshift(const NetCLShift*);
virtual void lpm_compare(const NetCompare*);
virtual void lpm_divide(const NetDivide*);
virtual void lpm_ff(const NetFF*);
virtual void lpm_mult(const NetMult*);
virtual void lpm_mux(const NetMux*);
virtual void lpm_ram_dq(const NetRamDq*);
/* Output a gate (called for each gate) */
virtual void logic(ostream&os, const NetLogic*);
virtual void bufz(ostream&os, const NetBUFZ*);
virtual void udp(ostream&os, const NetUDP*);
virtual void udp_comb(ostream&os, const NetUDP_COMB*);
virtual void net_assign(ostream&os, const NetAssign*);
virtual void net_assign_nb(ostream&os, const NetAssignNB*);
virtual void net_case_cmp(ostream&os, const NetCaseCmp*);
virtual bool net_cassign(ostream&os, const NetCAssign*);
virtual void net_const(ostream&os, const NetConst*);
virtual bool net_force(ostream&os, const NetForce*);
virtual void net_probe(ostream&os, const NetEvProbe*);
virtual void logic(const NetLogic*);
virtual void bufz(const NetBUFZ*);
virtual void udp(const NetUDP*);
virtual void udp_comb(const NetUDP_COMB*);
virtual void net_assign(const NetAssign*);
virtual void net_assign_nb(const NetAssignNB*);
virtual void net_case_cmp(const NetCaseCmp*);
virtual bool net_cassign(const NetCAssign*);
virtual void net_const(const NetConst*);
virtual bool net_force(const NetForce*);
virtual void net_probe(const NetEvProbe*);
/* Output a process (called for each process). It is up to the
target to recurse if desired. */
virtual bool process(ostream&os, const NetProcTop*);
virtual bool process(const NetProcTop*);
/* Various kinds of process nodes are dispatched through these. */
virtual void proc_assign(ostream&os, const NetAssign*);
virtual void proc_assign_mem(ostream&os, const NetAssignMem*);
virtual void proc_assign_nb(ostream&os, const NetAssignNB*);
virtual void proc_assign_mem_nb(ostream&os, const NetAssignMemNB*);
virtual bool proc_block(ostream&os, const NetBlock*);
virtual void proc_case(ostream&os, const NetCase*);
virtual bool proc_cassign(ostream&os, const NetCAssign*);
virtual void proc_condit(ostream&os, const NetCondit*);
virtual bool proc_deassign(ostream&os, const NetDeassign*);
virtual bool proc_disable(ostream&os, const NetDisable*);
virtual bool proc_force(ostream&os, const NetForce*);
virtual void proc_forever(ostream&os, const NetForever*);
virtual bool proc_release(ostream&os, const NetRelease*);
virtual void proc_repeat(ostream&os, const NetRepeat*);
virtual bool proc_trigger(ostream&os, const NetEvTrig*);
virtual void proc_stask(ostream&os, const NetSTask*);
virtual void proc_utask(ostream&os, const NetUTask*);
virtual bool proc_wait(ostream&os, const NetEvWait*);
virtual void proc_while(ostream&os, const NetWhile*);
virtual bool proc_delay(ostream&os, const NetPDelay*);
virtual void proc_assign(const NetAssign*);
virtual void proc_assign_mem(const NetAssignMem*);
virtual void proc_assign_nb(const NetAssignNB*);
virtual void proc_assign_mem_nb(const NetAssignMemNB*);
virtual bool proc_block(const NetBlock*);
virtual void proc_case(const NetCase*);
virtual bool proc_cassign(const NetCAssign*);
virtual void proc_condit(const NetCondit*);
virtual bool proc_deassign(const NetDeassign*);
virtual bool proc_delay(const NetPDelay*);
virtual bool proc_disable(const NetDisable*);
virtual bool proc_force(const NetForce*);
virtual void proc_forever(const NetForever*);
virtual bool proc_release(const NetRelease*);
virtual void proc_repeat(const NetRepeat*);
virtual bool proc_trigger(const NetEvTrig*);
virtual void proc_stask(const NetSTask*);
virtual void proc_utask(const NetUTask*);
virtual bool proc_wait(const NetEvWait*);
virtual void proc_while(const NetWhile*);
/* Done with the design. */
virtual void end_design(ostream&os, const Design*);
virtual void end_design(const Design*);
};
/* This class is used by the NetExpr class to help with the scanning
@ -160,6 +161,9 @@ extern const struct target *target_table[];
/*
* $Log: target.h,v $
* Revision 1.41 2000/08/08 01:50:42 steve
* target methods need not take a file stream.
*
* Revision 1.40 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*