Detect and report arrays without index in net contexts.
This commit is contained in:
parent
85ceea7358
commit
074a6a44e3
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: design_dump.cc,v 1.172 2007/01/16 05:44:14 steve Exp $"
|
||||
#ident "$Id: design_dump.cc,v 1.173 2007/02/01 03:14:33 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
# include <iomanip>
|
||||
# include "netlist.h"
|
||||
# include "compiler.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
static ostream& operator<< (ostream&o, NetBlock::Type t)
|
||||
{
|
||||
|
|
@ -735,8 +736,10 @@ void NetEvTrig::dump(ostream&o, unsigned ind) const
|
|||
|
||||
void NetEvWait::dump(ostream&o, unsigned ind) const
|
||||
{
|
||||
assert(nevents() > 0);
|
||||
o << setw(ind) <<"" << "@(" << event(0)->full_name();
|
||||
o << setw(ind) <<"" << "@(";
|
||||
|
||||
if (nevents() > 0)
|
||||
o << event(0)->full_name();
|
||||
|
||||
for (unsigned idx = 1 ; idx < nevents() ; idx += 1)
|
||||
o << " or " << event(idx)->full_name();
|
||||
|
|
@ -1199,6 +1202,9 @@ void Design::dump(ostream&o) const
|
|||
|
||||
/*
|
||||
* $Log: design_dump.cc,v $
|
||||
* Revision 1.173 2007/02/01 03:14:33 steve
|
||||
* Detect and report arrays without index in net contexts.
|
||||
*
|
||||
* Revision 1.172 2007/01/16 05:44:14 steve
|
||||
* Major rework of array handling. Memories are replaced with the
|
||||
* more general concept of arrays. The NetMemory and NetEMemory
|
||||
|
|
|
|||
12
elab_net.cc
12
elab_net.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: elab_net.cc,v 1.195 2007/01/31 04:21:10 steve Exp $"
|
||||
#ident "$Id: elab_net.cc,v 1.196 2007/02/01 03:14:33 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -1683,6 +1683,13 @@ NetNet* PEIdent::elaborate_net(Design*des, NetScope*scope,
|
|||
|
||||
/* Handle the case that this is an array elsewhere. */
|
||||
if (sig->array_dimensions() > 0) {
|
||||
if (idx_.size() == 0) {
|
||||
cerr << get_line() << ": error: Array " << sig->name()
|
||||
<< " cannot be used here without an index." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return elaborate_net_array_(des, scope, sig, lwidth,
|
||||
rise, fall, decay,
|
||||
drive0, drive1);
|
||||
|
|
@ -2895,6 +2902,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope,
|
|||
|
||||
/*
|
||||
* $Log: elab_net.cc,v $
|
||||
* Revision 1.196 2007/02/01 03:14:33 steve
|
||||
* Detect and report arrays without index in net contexts.
|
||||
*
|
||||
* Revision 1.195 2007/01/31 04:21:10 steve
|
||||
* Add method to bind assertions to verilog source lines.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue