Proper error messages when port direction is missing.
This commit is contained in:
parent
9abd84952b
commit
a59bbdeb4f
35
elab_net.cc
35
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.43 2000/08/01 22:44:26 steve Exp $"
|
#ident "$Id: elab_net.cc,v 1.44 2000/08/18 04:38:57 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "PExpr.h"
|
# include "PExpr.h"
|
||||||
|
|
@ -1216,6 +1216,36 @@ NetNet* PEIdent::elaborate_port(Design*des, NetScope*scope) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (sig->port_type()) {
|
||||||
|
case NetNet::PINPUT:
|
||||||
|
case NetNet::POUTPUT:
|
||||||
|
case NetNet::PINOUT:
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* If the name matches, but the signal is not a port,
|
||||||
|
then the user declared the object but there is no
|
||||||
|
matching input/output/inout declaration. */
|
||||||
|
|
||||||
|
case NetNet::NOT_A_PORT:
|
||||||
|
cerr << get_line() << ": error: signal " << text_ << " in"
|
||||||
|
<< " module " << scope->name() << " is not a port." << endl;
|
||||||
|
cerr << get_line() << ": : Are you missing an input/"
|
||||||
|
<< "output/inout declaration?" << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* This should not happen. A PWire can only become
|
||||||
|
PIMPLICIT if this is a udp reg port, and the make_udp
|
||||||
|
function should turn it into an output.... I think. */
|
||||||
|
|
||||||
|
case NetNet::PIMPLICIT:
|
||||||
|
cerr << get_line() << ": internal error: signal " << text_
|
||||||
|
<< " in module " << scope->name() << " is left as "
|
||||||
|
<< "port type PIMPLICIT." << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (msb_ && lsb_) {
|
if (msb_ && lsb_) {
|
||||||
/* Detect a part select. Evaluate the bits and elaborate
|
/* Detect a part select. Evaluate the bits and elaborate
|
||||||
|
|
@ -1632,6 +1662,9 @@ NetNet* PEUnary::elaborate_net(Design*des, const string&path,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: elab_net.cc,v $
|
* $Log: elab_net.cc,v $
|
||||||
|
* Revision 1.44 2000/08/18 04:38:57 steve
|
||||||
|
* Proper error messages when port direction is missing.
|
||||||
|
*
|
||||||
* Revision 1.43 2000/08/01 22:44:26 steve
|
* Revision 1.43 2000/08/01 22:44:26 steve
|
||||||
* Extend x or z that is top bit of a constant.
|
* Extend x or z that is top bit of a constant.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
15
elaborate.cc
15
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.182 2000/07/30 18:25:43 steve Exp $"
|
#ident "$Id: elaborate.cc,v 1.183 2000/08/18 04:38:57 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -435,13 +435,9 @@ void PGModule::elaborate_mod_(Design*des, Module*rmod, const string&path) const
|
||||||
for (unsigned ldx = 0 ; ldx < mport.count() ; ldx += 1) {
|
for (unsigned ldx = 0 ; ldx < mport.count() ; ldx += 1) {
|
||||||
PEIdent*pport = mport[ldx];
|
PEIdent*pport = mport[ldx];
|
||||||
prts[ldx] = pport->elaborate_port(des, my_scope);
|
prts[ldx] = pport->elaborate_port(des, my_scope);
|
||||||
if (prts[ldx] == 0) {
|
if (prts[ldx] == 0)
|
||||||
cerr << pport->get_line() << ": internal error: "
|
|
||||||
<< "Failed to elaborate port expr: "
|
|
||||||
<< *pport << endl;
|
|
||||||
des->errors += 1;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
assert(prts[ldx]);
|
assert(prts[ldx]);
|
||||||
prts_pin_count += prts[ldx]->pin_count();
|
prts_pin_count += prts[ldx]->pin_count();
|
||||||
}
|
}
|
||||||
|
|
@ -2296,8 +2292,6 @@ bool Module::elaborate(Design*des, NetScope*scope) const
|
||||||
|
|
||||||
NetProc*cur = (*st)->statement()->elaborate(des, path);
|
NetProc*cur = (*st)->statement()->elaborate(des, path);
|
||||||
if (cur == 0) {
|
if (cur == 0) {
|
||||||
cerr << (*st)->get_line() << ": error: Elaboration "
|
|
||||||
"failed for this process." << endl;
|
|
||||||
result_flag = false;
|
result_flag = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -2390,6 +2384,9 @@ Design* elaborate(const map<string,Module*>&modules,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: elaborate.cc,v $
|
* $Log: elaborate.cc,v $
|
||||||
|
* Revision 1.183 2000/08/18 04:38:57 steve
|
||||||
|
* Proper error messages when port direction is missing.
|
||||||
|
*
|
||||||
* Revision 1.182 2000/07/30 18:25:43 steve
|
* Revision 1.182 2000/07/30 18:25:43 steve
|
||||||
* Rearrange task and function elaboration so that the
|
* Rearrange task and function elaboration so that the
|
||||||
* NetTaskDef and NetFuncDef functions are created during
|
* NetTaskDef and NetFuncDef functions are created during
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue