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
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#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
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
# include <iomanip>
|
# include <iomanip>
|
||||||
# include "netlist.h"
|
# include "netlist.h"
|
||||||
# include "compiler.h"
|
# include "compiler.h"
|
||||||
|
# include "ivl_assert.h"
|
||||||
|
|
||||||
static ostream& operator<< (ostream&o, NetBlock::Type t)
|
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
|
void NetEvWait::dump(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
assert(nevents() > 0);
|
o << setw(ind) <<"" << "@(";
|
||||||
o << setw(ind) <<"" << "@(" << event(0)->full_name();
|
|
||||||
|
if (nevents() > 0)
|
||||||
|
o << event(0)->full_name();
|
||||||
|
|
||||||
for (unsigned idx = 1 ; idx < nevents() ; idx += 1)
|
for (unsigned idx = 1 ; idx < nevents() ; idx += 1)
|
||||||
o << " or " << event(idx)->full_name();
|
o << " or " << event(idx)->full_name();
|
||||||
|
|
@ -1199,6 +1202,9 @@ void Design::dump(ostream&o) const
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: design_dump.cc,v $
|
* $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
|
* Revision 1.172 2007/01/16 05:44:14 steve
|
||||||
* Major rework of array handling. Memories are replaced with the
|
* Major rework of array handling. Memories are replaced with the
|
||||||
* more general concept of arrays. The NetMemory and NetEMemory
|
* 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
|
* 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.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
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -1683,6 +1683,13 @@ NetNet* PEIdent::elaborate_net(Design*des, NetScope*scope,
|
||||||
|
|
||||||
/* Handle the case that this is an array elsewhere. */
|
/* Handle the case that this is an array elsewhere. */
|
||||||
if (sig->array_dimensions() > 0) {
|
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,
|
return elaborate_net_array_(des, scope, sig, lwidth,
|
||||||
rise, fall, decay,
|
rise, fall, decay,
|
||||||
drive0, drive1);
|
drive0, drive1);
|
||||||
|
|
@ -2895,6 +2902,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: elab_net.cc,v $
|
* $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
|
* Revision 1.195 2007/01/31 04:21:10 steve
|
||||||
* Add method to bind assertions to verilog source lines.
|
* Add method to bind assertions to verilog source lines.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue