Report code generation errors through proc_delay.

This commit is contained in:
steve 2000-07-29 16:21:08 +00:00
parent 39c71ef68a
commit 3aa250b16b
7 changed files with 44 additions and 21 deletions

13
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.46 2000/07/27 05:13:44 steve Exp $"
#ident "$Id: emit.cc,v 1.47 2000/07/29 16:21:08 steve Exp $"
#endif
/*
@ -205,13 +205,13 @@ bool NetForever::emit_proc(ostream&o, struct target_t*tgt) const
bool NetPDelay::emit_proc(ostream&o, struct target_t*tgt) const
{
tgt->proc_delay(o, this);
return true;
return tgt->proc_delay(o, this);
}
void NetPDelay::emit_proc_recurse(ostream&o, struct target_t*tgt) const
bool NetPDelay::emit_proc_recurse(ostream&o, struct target_t*tgt) const
{
if (statement_) statement_->emit_proc(o, tgt);
if (statement_) return statement_->emit_proc(o, tgt);
return true;
}
bool NetRelease::emit_proc(ostream&o, struct target_t*tgt) const
@ -454,6 +454,9 @@ bool emit(ostream&o, const Design*des, const char*type)
/*
* $Log: emit.cc,v $
* Revision 1.47 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*
* Revision 1.46 2000/07/27 05:13:44 steve
* Support elaboration of disable statements.
*

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.149 2000/07/27 05:13:44 steve Exp $"
#ident "$Id: netlist.h,v 1.150 2000/07/29 16:21:08 steve Exp $"
#endif
/*
@ -1696,7 +1696,7 @@ class NetPDelay : public NetProc {
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
void emit_proc_recurse(ostream&, struct target_t*) const;
bool emit_proc_recurse(ostream&, struct target_t*) const;
private:
unsigned long delay_;
@ -2719,6 +2719,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/*
* $Log: netlist.h,v $
* Revision 1.150 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*
* Revision 1.149 2000/07/27 05:13:44 steve
* Support elaboration of disable statements.
*

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.12 2000/06/14 20:29:39 steve Exp $"
#ident "$Id: t-null.cc,v 1.13 2000/07/29 16:21:08 steve Exp $"
#endif
# include "netlist.h"
@ -42,7 +42,7 @@ static class target_null_t : public target_t {
void net_probe(ostream&, const NetEvProbe*) { }
bool proc_block(ostream&, const NetBlock*) { return true; }
void proc_condit(ostream&, const NetCondit*) { }
void proc_delay(ostream&, const NetPDelay*) { }
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*) { }
@ -54,6 +54,9 @@ static class target_null_t : public target_t {
extern const struct target tgt_null = { "null", &target_null_obj };
/*
* $Log: t-null.cc,v $
* Revision 1.13 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*
* Revision 1.12 2000/06/14 20:29:39 steve
* Ignore more things in null target.
*

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.10 2000/04/12 04:23:58 steve Exp $"
#ident "$Id: t-verilog.cc,v 1.11 2000/07/29 16:21:08 steve Exp $"
#endif
/*
@ -44,7 +44,7 @@ class target_verilog : public target_t {
virtual void bufz(ostream&os, const NetBUFZ*);
virtual void start_process(ostream&os, const NetProcTop*);
virtual bool proc_block(ostream&os, const NetBlock*);
virtual void proc_delay(ostream&os, const NetPDelay*);
virtual bool proc_delay(ostream&os, const NetPDelay*);
virtual void proc_stask(ostream&os, const NetSTask*);
virtual void end_design(ostream&os, const Design*);
private:
@ -182,13 +182,14 @@ bool target_verilog::proc_block(ostream&os, const NetBlock*net)
return true;
}
void target_verilog::proc_delay(ostream&os, const NetPDelay*net)
bool target_verilog::proc_delay(ostream&os, const NetPDelay*net)
{
os << setw(indent_) << "" << "#" << net->delay() << endl;
indent_ += 4;
net->emit_proc_recurse(os, this);
bool flag = net->emit_proc_recurse(os, this);
indent_ -= 4;
return flag;
}
@ -242,6 +243,9 @@ const struct target tgt_verilog = {
/*
* $Log: t-verilog.cc,v $
* Revision 1.11 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*
* Revision 1.10 2000/04/12 04:23:58 steve
* Named events really should be expressed with PEIdent
* objects in the pform,

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-vvm.cc,v 1.163 2000/07/26 03:53:11 steve Exp $"
#ident "$Id: t-vvm.cc,v 1.164 2000/07/29 16:21:08 steve Exp $"
#endif
# include <iostream>
@ -193,7 +193,7 @@ class target_vvm : public target_t {
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 void proc_delay(ostream&os, const NetPDelay*);
virtual bool proc_delay(ostream&os, const NetPDelay*);
virtual void end_design(ostream&os, const Design*);
void start_process(ostream&os, const NetProcTop*);
@ -3034,7 +3034,7 @@ void target_vvm::proc_while(ostream&os, const NetWhile*net)
* is an expression expresion, evaluate it at run time and use the
* unsigned interpretation of it as the actual delay.
*/
void target_vvm::proc_delay(ostream&os, const NetPDelay*proc)
bool target_vvm::proc_delay(ostream&os, const NetPDelay*proc)
{
thread_step_ += 1;
@ -3062,7 +3062,7 @@ void target_vvm::proc_delay(ostream&os, const NetPDelay*proc)
defn << "static bool " << thread_class_ << "_step_" << thread_step_
<< "_(vvm_thread*thr) {" << endl;
proc->emit_proc_recurse(os, this);
return proc->emit_proc_recurse(os, this);
}
void target_vvm::end_process(ostream&os, const NetProcTop*proc)
@ -3088,6 +3088,9 @@ extern const struct target tgt_vvm = {
};
/*
* $Log: t-vvm.cc,v $
* Revision 1.164 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*
* Revision 1.163 2000/07/26 03:53:11 steve
* Make simulation precision available to VPI.
*

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.40 2000/07/27 05:13:44 steve Exp $"
#ident "$Id: target.cc,v 1.41 2000/07/29 16:21:08 steve Exp $"
#endif
# include "target.h"
@ -241,10 +241,11 @@ bool target_t::proc_deassign(ostream&os, const NetDeassign*dev)
return false;
}
void target_t::proc_delay(ostream&os, const NetPDelay*)
bool target_t::proc_delay(ostream&os, const NetPDelay*)
{
cerr << "target (" << typeid(*this).name() << "): "
"Unhandled proc_delay." << endl;
return false;
}
bool target_t::proc_disable(ostream&os, const NetDisable*obj)
@ -397,6 +398,9 @@ void expr_scan_t::expr_binary(const NetEBinary*ex)
/*
* $Log: target.cc,v $
* Revision 1.41 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*
* Revision 1.40 2000/07/27 05:13:44 steve
* Support elaboration of disable statements.
*

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.39 2000/07/27 05:13:44 steve Exp $"
#ident "$Id: target.h,v 1.40 2000/07/29 16:21:08 steve Exp $"
#endif
# include "netlist.h"
@ -119,7 +119,7 @@ struct target_t {
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 void proc_delay(ostream&os, const NetPDelay*);
virtual bool proc_delay(ostream&os, const NetPDelay*);
/* Done with the design. */
virtual void end_design(ostream&os, const Design*);
@ -160,6 +160,9 @@ extern const struct target *target_table[];
/*
* $Log: target.h,v $
* Revision 1.40 2000/07/29 16:21:08 steve
* Report code generation errors through proc_delay.
*
* Revision 1.39 2000/07/27 05:13:44 steve
* Support elaboration of disable statements.
*