Harmless fixup of warnings.

This commit is contained in:
steve 2003-06-21 01:21:42 +00:00
parent ccf4d4d7da
commit 61195c5daa
11 changed files with 62 additions and 37 deletions

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: PDelays.cc,v 1.10 2003/02/08 19:49:21 steve Exp $" #ident "$Id: PDelays.cc,v 1.11 2003/06/21 01:21:42 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -116,8 +116,6 @@ void PDelays::eval_delays(Design*des, NetScope*scope,
{ {
assert(scope); assert(scope);
int shift = scope->time_unit() - des->get_precision();
if (delay_[0]) { if (delay_[0]) {
rise_time = calculate_val(des, scope, delay_[0]); rise_time = calculate_val(des, scope, delay_[0]);
@ -148,6 +146,9 @@ void PDelays::eval_delays(Design*des, NetScope*scope,
/* /*
* $Log: PDelays.cc,v $ * $Log: PDelays.cc,v $
* Revision 1.11 2003/06/21 01:21:42 steve
* Harmless fixup of warnings.
*
* Revision 1.10 2003/02/08 19:49:21 steve * Revision 1.10 2003/02/08 19:49:21 steve
* Calculate delay statement delays using elaborated * Calculate delay statement delays using elaborated
* expressions instead of pre-elaborated expression * expressions instead of pre-elaborated expression

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elab_anet.cc,v 1.7 2003/03/06 00:28:41 steve Exp $" #ident "$Id: elab_anet.cc,v 1.8 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -107,7 +107,7 @@ NetNet* PEIdent::elaborate_anet(Design*des, NetScope*scope) const
NetNet*sig = des->find_signal(scope, path_); NetNet*sig = des->find_signal(scope, path_);
if (sig == 0) { if (sig == 0) {
if (NetMemory*mem = des->find_memory(scope, path_)) { if (des->find_memory(scope, path_)) {
cerr << get_line() << ": error: memories not allowed " cerr << get_line() << ": error: memories not allowed "
<< "on left side of procedural continuous " << "on left side of procedural continuous "
<< "assignment." << endl; << "assignment." << endl;
@ -149,6 +149,9 @@ NetNet* PEIdent::elaborate_anet(Design*des, NetScope*scope) const
/* /*
* $Log: elab_anet.cc,v $ * $Log: elab_anet.cc,v $
* Revision 1.8 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.7 2003/03/06 00:28:41 steve * Revision 1.7 2003/03/06 00:28:41 steve
* All NetObj objects have lex_string base names. * All NetObj objects have lex_string base names.
* *

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elab_net.cc,v 1.113 2003/05/01 01:13:57 steve Exp $" #ident "$Id: elab_net.cc,v 1.114 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -104,8 +104,6 @@ NetNet* PEBinary::elaborate_net(Design*des, NetScope*scope,
} }
NetNet*osig; NetNet*osig;
NetNode*gate;
NetNode*gate_t;
switch (op_) { switch (op_) {
case '^': // XOR case '^': // XOR
@ -177,8 +175,6 @@ NetNet* PEBinary::elaborate_net_add_(Design*des, NetScope*scope,
} }
NetNet*osig; NetNet*osig;
NetNode*gate;
NetNode*gate_t;
unsigned width = lsig->pin_count(); unsigned width = lsig->pin_count();
if (rsig->pin_count() > lsig->pin_count()) if (rsig->pin_count() > lsig->pin_count())
@ -233,7 +229,7 @@ NetNet* PEBinary::elaborate_net_add_(Design*des, NetScope*scope,
if (owidth > width) if (owidth > width)
connect(osig->pin(width), adder->pin_Cout()); connect(osig->pin(width), adder->pin_Cout());
gate = adder; NetNode*gate = adder;
gate->rise_time(rise); gate->rise_time(rise);
gate->fall_time(fall); gate->fall_time(fall);
gate->decay_time(decay); gate->decay_time(decay);
@ -976,7 +972,7 @@ NetNet* PEBinary::elaborate_net_shift_(Design*des, NetScope*scope,
// Calculate the number of useful bits for the shift amount, // Calculate the number of useful bits for the shift amount,
// and elaborate the right_ expression as the shift amount. // and elaborate the right_ expression as the shift amount.
unsigned dwid = 0; unsigned dwid = 0;
while ((1 << dwid) < lwidth) while ((1U << dwid) < lwidth)
dwid += 1; dwid += 1;
NetNet*rsig = right_->elaborate_net(des, scope, dwid, 0, 0, 0); NetNet*rsig = right_->elaborate_net(des, scope, dwid, 0, 0, 0);
@ -2327,6 +2323,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope,
/* /*
* $Log: elab_net.cc,v $ * $Log: elab_net.cc,v $
* Revision 1.114 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.113 2003/05/01 01:13:57 steve * Revision 1.113 2003/05/01 01:13:57 steve
* More complete bit range internal error message, * More complete bit range internal error message,
* Better test of part select ranges on non-zero * Better test of part select ranges on non-zero

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elab_sig.cc,v 1.28 2003/03/06 00:28:41 steve Exp $" #ident "$Id: elab_sig.cc,v 1.29 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -505,6 +505,8 @@ void PWire::elaborate_sig(Design*des, NetScope*scope) const
delete lval; delete lval;
delete rval; delete rval;
NetMemory*sig = new NetMemory(scope, name, wid, lnum, rnum); NetMemory*sig = new NetMemory(scope, name, wid, lnum, rnum);
// The constructor automatically adds the memory object
// to the scope. Do I need to set line number information?
} else { } else {
@ -522,6 +524,9 @@ void PWire::elaborate_sig(Design*des, NetScope*scope) const
/* /*
* $Log: elab_sig.cc,v $ * $Log: elab_sig.cc,v $
* Revision 1.29 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.28 2003/03/06 00:28:41 steve * Revision 1.28 2003/03/06 00:28:41 steve
* All NetObj objects have lex_string base names. * All NetObj objects have lex_string base names.
* *

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elaborate.cc,v 1.282 2003/06/13 19:10:20 steve Exp $" #ident "$Id: elaborate.cc,v 1.283 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -1089,7 +1089,7 @@ NetProc* PAssign::elaborate(Design*des, NetScope*scope) const
/* Based on the specific type of the l-value, do cleanup /* Based on the specific type of the l-value, do cleanup
processing on the r-value. */ processing on the r-value. */
if (NetVariable*tmp = lv->var()) { if (lv->var()) {
} else if (rv->expr_type() == NetExpr::ET_REAL) { } else if (rv->expr_type() == NetExpr::ET_REAL) {
@ -1134,7 +1134,7 @@ NetProc* PAssignNB::elaborate(Design*des, NetScope*scope) const
rv = new NetEConst(*val); rv = new NetEConst(*val);
delete val; delete val;
} else if (rv = rval()->elaborate_expr(des, scope)) { } else if ((rv = rval()->elaborate_expr(des, scope))) {
/* OK, go on. */ /* OK, go on. */
@ -2423,7 +2423,7 @@ bool Module::elaborate(Design*des, NetScope*scope) const
continue; continue;
} }
NetProcTop*top; NetProcTop*top=NULL;
switch ((*st)->type()) { switch ((*st)->type()) {
case PProcess::PR_INITIAL: case PProcess::PR_INITIAL:
top = new NetProcTop(scope, NetProcTop::KINITIAL, cur); top = new NetProcTop(scope, NetProcTop::KINITIAL, cur);
@ -2432,6 +2432,7 @@ bool Module::elaborate(Design*des, NetScope*scope) const
top = new NetProcTop(scope, NetProcTop::KALWAYS, cur); top = new NetProcTop(scope, NetProcTop::KALWAYS, cur);
break; break;
} }
assert(top);
// Evaluate the attributes for this process, if there // Evaluate the attributes for this process, if there
// are any. These attributes are to be attached to the // are any. These attributes are to be attached to the
@ -2559,6 +2560,9 @@ Design* elaborate(list<const char*>roots)
/* /*
* $Log: elaborate.cc,v $ * $Log: elaborate.cc,v $
* Revision 1.283 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.282 2003/06/13 19:10:20 steve * Revision 1.282 2003/06/13 19:10:20 steve
* Handle assign of real to vector. * Handle assign of real to vector.
* *

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: eval.cc,v 1.35 2003/04/14 03:40:21 steve Exp $" #ident "$Id: eval.cc,v 1.36 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -150,7 +150,6 @@ verinum* PEBinary::eval_const(const Design*des, const NetScope*scope) const
*/ */
verinum* PEIdent::eval_const(const Design*des, const NetScope*scope) const verinum* PEIdent::eval_const(const Design*des, const NetScope*scope) const
{ {
NetScope*found_in;
assert(scope); assert(scope);
const NetExpr*expr = des->find_parameter(scope, path_); const NetExpr*expr = des->find_parameter(scope, path_);
@ -241,6 +240,9 @@ verinum* PEUnary::eval_const(const Design*des, const NetScope*scope) const
/* /*
* $Log: eval.cc,v $ * $Log: eval.cc,v $
* Revision 1.36 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.35 2003/04/14 03:40:21 steve * Revision 1.35 2003/04/14 03:40:21 steve
* Make some effort to preserve bits while * Make some effort to preserve bits while
* operating on constant values. * operating on constant values.

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: link_const.cc,v 1.15 2002/08/12 01:34:59 steve Exp $" #ident "$Id: link_const.cc,v 1.16 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -127,10 +127,10 @@ verinum::V Nexus::driven_value() const
const NetConst*obj; const NetConst*obj;
const NetNet*sig; const NetNet*sig;
if (obj = dynamic_cast<const NetConst*>(cur->get_obj())) { if ((obj = dynamic_cast<const NetConst*>(cur->get_obj()))) {
val = obj->value(cur->get_pin()); val = obj->value(cur->get_pin());
} else if (sig = dynamic_cast<const NetNet*>(cur->get_obj())) { } else if ((sig = dynamic_cast<const NetNet*>(cur->get_obj()))) {
if (sig->type() == NetNet::SUPPLY0) { if (sig->type() == NetNet::SUPPLY0) {
driven_ = V0; driven_ = V0;
@ -164,6 +164,9 @@ verinum::V Nexus::driven_value() const
/* /*
* $Log: link_const.cc,v $ * $Log: link_const.cc,v $
* Revision 1.16 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.15 2002/08/12 01:34:59 steve * Revision 1.15 2002/08/12 01:34:59 steve
* conditional ident string using autoconfig. * conditional ident string using autoconfig.
* *

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: netlist.h,v 1.291 2003/06/20 00:53:19 steve Exp $" #ident "$Id: netlist.h,v 1.292 2003/06/21 01:21:43 steve Exp $"
#endif #endif
/* /*
@ -1997,7 +1997,7 @@ class NetFuncDef {
unsigned port_count() const; unsigned port_count() const;
const NetNet*port(unsigned idx) const; const NetNet*port(unsigned idx) const;
virtual void dump(ostream&, unsigned ind) const; void dump(ostream&, unsigned ind) const;
private: private:
NetScope*scope_; NetScope*scope_;
@ -3306,6 +3306,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/* /*
* $Log: netlist.h,v $ * $Log: netlist.h,v $
* Revision 1.292 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.291 2003/06/20 00:53:19 steve * Revision 1.291 2003/06/20 00:53:19 steve
* Module attributes from the parser * Module attributes from the parser
* through to elaborated form. * through to elaborated form.

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: set_width.cc,v 1.31 2003/06/18 03:55:19 steve Exp $" #ident "$Id: set_width.cc,v 1.32 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -284,7 +284,7 @@ bool NetEConst::set_width(unsigned w)
} else { } else {
unsigned use_w = w; unsigned use_w = w;
bool flag = true;
verinum::V pad_bit = value_.has_sign() verinum::V pad_bit = value_.has_sign()
? value_[value_.len() - 1] ? value_[value_.len() - 1]
: verinum::V0; : verinum::V0;
@ -411,6 +411,9 @@ bool NetEUReduce::set_width(unsigned w)
/* /*
* $Log: set_width.cc,v $ * $Log: set_width.cc,v $
* Revision 1.32 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.31 2003/06/18 03:55:19 steve * Revision 1.31 2003/06/18 03:55:19 steve
* Add arithmetic shift operators. * Add arithmetic shift operators.
* *

View File

@ -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) && !defined(macintosh) #if !defined(WINNT) && !defined(macintosh)
#ident "$Id: syn-rules.y,v 1.24 2002/08/24 05:02:37 steve Exp $" #ident "$Id: syn-rules.y,v 1.25 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -142,7 +142,6 @@ static void hookup_RAMDQ(NetRamDq*ram, NetESignal*d, NetNet*adr,
/* Connect the input Data bits of the RAM, from the r-value of /* Connect the input Data bits of the RAM, from the r-value of
the assignment. */ the assignment. */
int loff = a->get_loff();
for (unsigned idx = 0 ; idx < ram->width() ; idx += 1) { for (unsigned idx = 0 ; idx < ram->width() ; idx += 1) {
connect(ram->pin_Data(idx), d->bit(idx+rval_pinoffset)); connect(ram->pin_Data(idx), d->bit(idx+rval_pinoffset));
} }
@ -183,7 +182,7 @@ static void make_DFF_CE(Design*des, NetProcTop*top, NetEvWait*wclk,
NetAssign_*a; NetAssign_*a;
unsigned rval_pinoffset=0; unsigned rval_pinoffset=0;
for (unsigned i=0; a=asn->l_val(i); i++) { for (unsigned i=0; (a=asn->l_val(i)); i++) {
// asn->l_val(i) are the set of *NetAssign_'s that form the list // asn->l_val(i) are the set of *NetAssign_'s that form the list
// of lval expressions. Treat each one independently, keeping // of lval expressions. Treat each one independently, keeping
@ -232,7 +231,7 @@ static void make_initializer(Design*des, NetProcTop*top, NetAssignBase*asn)
for (Link*cur = nex->first_nlink() for (Link*cur = nex->first_nlink()
; cur ; cur = cur->next_nlink()) { ; cur ; cur = cur->next_nlink()) {
if (NetNet*net = dynamic_cast<NetNet*> (cur->get_obj())) if (dynamic_cast<NetNet*> (cur->get_obj()))
cur->set_init(bit); cur->set_init(bit);
} }

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: synth2.cc,v 1.25 2003/04/03 04:30:00 steve Exp $" #ident "$Id: synth2.cc,v 1.26 2003/06/21 01:21:43 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -171,24 +171,24 @@ bool NetCase::synth_async(Design*des, NetScope*scope,
elided. */ elided. */
map<unsigned long,unsigned long>guard2sel; map<unsigned long,unsigned long>guard2sel;
cur = 0; cur = 0;
for (unsigned idx = 0 ; idx < (1<<esig->pin_count()) ; idx += 1) { for (unsigned idx = 0 ; idx < (1U<<esig->pin_count()) ; idx += 1) {
if ((idx & ~sel_mask) == sel_ref) { if ((idx & ~sel_mask) == sel_ref) {
guard2sel[idx] = cur; guard2sel[idx] = cur;
cur += 1; cur += 1;
} }
} }
assert(cur == (1 << sel_pins)); assert(cur == (1U << sel_pins));
NetMux*mux = new NetMux(scope, scope->local_symbol(), NetMux*mux = new NetMux(scope, scope->local_symbol(),
nex_out->pin_count(), nex_out->pin_count(),
1 << sel_pins, sel_pins); 1U << sel_pins, sel_pins);
/* Connect the non-constant select bits to the select input of /* Connect the non-constant select bits to the select input of
the mux device. */ the mux device. */
cur = 0; cur = 0;
for (unsigned idx = 0 ; idx < esig->pin_count() ; idx += 1) { for (unsigned idx = 0 ; idx < esig->pin_count() ; idx += 1) {
/* skip bits that are known to be constant. */ /* skip bits that are known to be constant. */
if ((sel_mask & (1 << idx)) == 0) if ((sel_mask & (1U << idx)) == 0)
continue; continue;
connect(mux->pin_Sel(cur), esig->pin(idx)); connect(mux->pin_Sel(cur), esig->pin(idx));
@ -201,7 +201,7 @@ bool NetCase::synth_async(Design*des, NetScope*scope,
connect(nex_out->pin(idx), mux->pin_Result(idx)); connect(nex_out->pin(idx), mux->pin_Result(idx));
NetProc**statement_map = new NetProc*[1 << sel_pins]; NetProc**statement_map = new NetProc*[1 << sel_pins];
for (unsigned item = 0 ; item < (1<<sel_pins) ; item += 1) for (unsigned item = 0 ; item < (1U<<sel_pins) ; item += 1)
statement_map[item] = 0; statement_map[item] = 0;
/* Assign the input statements to MUX inputs. This involves /* Assign the input statements to MUX inputs. This involves
@ -230,7 +230,7 @@ bool NetCase::synth_async(Design*des, NetScope*scope,
sub-statements. If I get to an input that has no statement, sub-statements. If I get to an input that has no statement,
then use the default statement there. */ then use the default statement there. */
NetNet*default_sig = 0; NetNet*default_sig = 0;
for (unsigned item = 0 ; item < (1<<sel_pins) ; item += 1) { for (unsigned item = 0 ; item < (1U<<sel_pins) ; item += 1) {
/* Detect the case that this is a default input, and I /* Detect the case that this is a default input, and I
have a precalculated default_sig. */ have a precalculated default_sig. */
@ -779,6 +779,9 @@ void synth2(Design*des)
/* /*
* $Log: synth2.cc,v $ * $Log: synth2.cc,v $
* Revision 1.26 2003/06/21 01:21:43 steve
* Harmless fixup of warnings.
*
* Revision 1.25 2003/04/03 04:30:00 steve * Revision 1.25 2003/04/03 04:30:00 steve
* Prevent overrun comparing verinums to zero. * Prevent overrun comparing verinums to zero.
* *