Do not allow implicit wires in sensitivity lists.
This commit is contained in:
parent
5882c6a481
commit
0976fd393b
|
|
@ -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: compiler.h,v 1.8 2002/04/15 00:04:22 steve Exp $"
|
#ident "$Id: compiler.h,v 1.9 2002/04/22 00:53:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include <list>
|
# include <list>
|
||||||
|
|
@ -67,6 +67,7 @@
|
||||||
|
|
||||||
/* Implicit definitions of wires. */
|
/* Implicit definitions of wires. */
|
||||||
extern bool warn_implicit;
|
extern bool warn_implicit;
|
||||||
|
extern bool error_implicit;
|
||||||
|
|
||||||
/* inherit timescales accross files. */
|
/* inherit timescales accross files. */
|
||||||
extern bool warn_timescale;
|
extern bool warn_timescale;
|
||||||
|
|
@ -80,6 +81,9 @@ extern list<const char*>library_suff;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: compiler.h,v $
|
* $Log: compiler.h,v $
|
||||||
|
* Revision 1.9 2002/04/22 00:53:39 steve
|
||||||
|
* Do not allow implicit wires in sensitivity lists.
|
||||||
|
*
|
||||||
* Revision 1.8 2002/04/15 00:04:22 steve
|
* Revision 1.8 2002/04/15 00:04:22 steve
|
||||||
* Timescale warnings.
|
* Timescale warnings.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
16
elab_net.cc
16
elab_net.cc
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: elab_net.cc,v 1.87 2002/03/09 02:10:22 steve Exp $"
|
#ident "$Id: elab_net.cc,v 1.88 2002/04/22 00:53:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -1200,10 +1200,17 @@ NetNet* PEIdent::elaborate_net(Design*des, NetScope*scope,
|
||||||
sig = new NetNet(scope, scope->name()+"."+path_.peek_name(0),
|
sig = new NetNet(scope, scope->name()+"."+path_.peek_name(0),
|
||||||
NetNet::IMPLICIT, 1);
|
NetNet::IMPLICIT, 1);
|
||||||
|
|
||||||
if (warn_implicit)
|
if (error_implicit) {
|
||||||
|
cerr << get_line() << ": error: "
|
||||||
|
<< scope->name() << "." << path_.peek_name(0)
|
||||||
|
<< " not defined in this scope." << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
|
||||||
|
} else if (warn_implicit) {
|
||||||
cerr << get_line() << ": warning: implicit "
|
cerr << get_line() << ": warning: implicit "
|
||||||
"definition of wire " << scope->name()
|
"definition of wire " << scope->name()
|
||||||
<< "." << path_ << "." << endl;
|
<< "." << path_.peek_name(0) << "." << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2062,6 +2069,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: elab_net.cc,v $
|
* $Log: elab_net.cc,v $
|
||||||
|
* Revision 1.88 2002/04/22 00:53:39 steve
|
||||||
|
* Do not allow implicit wires in sensitivity lists.
|
||||||
|
*
|
||||||
* Revision 1.87 2002/03/09 02:10:22 steve
|
* Revision 1.87 2002/03/09 02:10:22 steve
|
||||||
* Add the NetUserFunc netlist node.
|
* Add the NetUserFunc netlist node.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
13
elaborate.cc
13
elaborate.cc
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: elaborate.cc,v 1.244 2002/04/21 22:31:02 steve Exp $"
|
#ident "$Id: elaborate.cc,v 1.245 2002/04/22 00:53:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
# include "netmisc.h"
|
# include "netmisc.h"
|
||||||
# include "util.h"
|
# include "util.h"
|
||||||
# include "parse_api.h"
|
# include "parse_api.h"
|
||||||
|
# include "compiler.h"
|
||||||
|
|
||||||
static Link::strength_t drive_type(PGate::strength_t drv)
|
static Link::strength_t drive_type(PGate::strength_t drv)
|
||||||
{
|
{
|
||||||
|
|
@ -1817,8 +1818,12 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
|
||||||
|
|
||||||
if ((expr_.count() == 1) && (expr_[0]->type() == PEEvent::POSITIVE)) {
|
if ((expr_.count() == 1) && (expr_[0]->type() == PEEvent::POSITIVE)) {
|
||||||
|
|
||||||
|
bool save_flag = error_implicit;
|
||||||
|
error_implicit = true;
|
||||||
NetNet*ex = expr_[0]->expr()->elaborate_net(des, scope,
|
NetNet*ex = expr_[0]->expr()->elaborate_net(des, scope,
|
||||||
1, 0, 0, 0);
|
1, 0, 0, 0);
|
||||||
|
error_implicit = save_flag;
|
||||||
|
|
||||||
if (ex == 0) {
|
if (ex == 0) {
|
||||||
expr_[0]->dump(cerr);
|
expr_[0]->dump(cerr);
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
|
|
@ -1944,8 +1949,11 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
|
||||||
the sub-expression as a net and decide how to handle
|
the sub-expression as a net and decide how to handle
|
||||||
the edge. */
|
the edge. */
|
||||||
|
|
||||||
|
bool save_flag = error_implicit;
|
||||||
|
error_implicit = true;
|
||||||
NetNet*expr = expr_[idx]->expr()->elaborate_net(des, scope,
|
NetNet*expr = expr_[idx]->expr()->elaborate_net(des, scope,
|
||||||
0, 0, 0, 0);
|
0, 0, 0, 0);
|
||||||
|
error_implicit = save_flag;
|
||||||
if (expr == 0) {
|
if (expr == 0) {
|
||||||
expr_[idx]->dump(cerr);
|
expr_[idx]->dump(cerr);
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
|
|
@ -2504,6 +2512,9 @@ Design* elaborate(list<const char*>roots)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: elaborate.cc,v $
|
* $Log: elaborate.cc,v $
|
||||||
|
* Revision 1.245 2002/04/22 00:53:39 steve
|
||||||
|
* Do not allow implicit wires in sensitivity lists.
|
||||||
|
*
|
||||||
* Revision 1.244 2002/04/21 22:31:02 steve
|
* Revision 1.244 2002/04/21 22:31:02 steve
|
||||||
* Redo handling of assignment internal delays.
|
* Redo handling of assignment internal delays.
|
||||||
* Leave it possible for them to be calculated
|
* Leave it possible for them to be calculated
|
||||||
|
|
|
||||||
8
main.cc
8
main.cc
|
|
@ -19,7 +19,7 @@ const char COPYRIGHT[] =
|
||||||
* 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: main.cc,v 1.53 2002/04/15 00:04:22 steve Exp $"
|
#ident "$Id: main.cc,v 1.54 2002/04/22 00:53:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -87,6 +87,9 @@ FILE *depend_file = NULL;
|
||||||
*/
|
*/
|
||||||
bool warn_implicit = false;
|
bool warn_implicit = false;
|
||||||
bool warn_timescale = false;
|
bool warn_timescale = false;
|
||||||
|
|
||||||
|
bool error_implicit = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Verbose messages enabled.
|
* Verbose messages enabled.
|
||||||
*/
|
*/
|
||||||
|
|
@ -493,6 +496,9 @@ int main(int argc, char*argv[])
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: main.cc,v $
|
* $Log: main.cc,v $
|
||||||
|
* Revision 1.54 2002/04/22 00:53:39 steve
|
||||||
|
* Do not allow implicit wires in sensitivity lists.
|
||||||
|
*
|
||||||
* Revision 1.53 2002/04/15 00:04:22 steve
|
* Revision 1.53 2002/04/15 00:04:22 steve
|
||||||
* Timescale warnings.
|
* Timescale warnings.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue