Donot create tables that have no entries.

This commit is contained in:
steve 2000-04-09 16:55:42 +00:00
parent e9b06f1022
commit cad5df1e9f
1 changed files with 16 additions and 9 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-vvm.cc,v 1.130 2000/04/04 03:20:15 steve Exp $"
#ident "$Id: t-vvm.cc,v 1.131 2000/04/09 16:55:42 steve Exp $"
#endif
# include <iostream>
@ -793,12 +793,16 @@ void target_vvm::event(ostream&os, const NetEvent*event)
void target_vvm::end_design(ostream&os, const Design*mod)
{
if (string_counter > 0)
os << "static struct __vpiStringConst string_table[" <<
string_counter+1 << "];" << endl;
if (number_counter > 0)
os << "static struct __vpiNumberConst number_table[" <<
number_counter+1 << "];" << endl;
if (nexus_wire_counter > 0)
os << "static vvm_nexus_wire nexus_wire_table[" <<
nexus_wire_counter << "];" << endl;
if (signal_bit_counter > 0)
os << "static vpip_bit_t signal_bit_table[" <<
signal_bit_counter << "];" << endl;
@ -2578,6 +2582,9 @@ extern const struct target tgt_vvm = {
};
/*
* $Log: t-vvm.cc,v $
* Revision 1.131 2000/04/09 16:55:42 steve
* Donot create tables that have no entries.
*
* Revision 1.130 2000/04/04 03:20:15 steve
* Simulate named event trigger and waits.
*