Summary list of missing modules.

This commit is contained in:
steve 2003-09-25 00:25:14 +00:00
parent becae2cecd
commit 39b2928ad8
3 changed files with 51 additions and 60 deletions

View File

@ -19,10 +19,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: compiler.h,v 1.16 2003/03/01 06:25:30 steve Exp $"
#ident "$Id: compiler.h,v 1.17 2003/09/25 00:25:14 steve Exp $"
#endif
# include <list>
# include <map>
# include <string>
# include "StringHeap.h"
/*
@ -97,11 +99,15 @@ extern generation_t generation_flag;
/* This is the string to use to invoke the preprocessor. */
extern char*ivlpp_string;
extern map<string,unsigned> missing_modules;
extern StringHeapLex lex_strings;
/*
* $Log: compiler.h,v $
* Revision 1.17 2003/09/25 00:25:14 steve
* Summary list of missing modules.
*
* Revision 1.16 2003/03/01 06:25:30 steve
* Add the lex_strings string handler, and put
* scope names and system task/function names

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: elaborate.cc,v 1.291 2003/09/20 06:08:53 steve Exp $"
#ident "$Id: elaborate.cc,v 1.292 2003/09/25 00:25:14 steve Exp $"
#endif
# include "config.h"
@ -901,6 +901,7 @@ void PGModule::elaborate_scope(Design*des, NetScope*sc) const
// Not a module or primitive that I know about or can find by
// any means, so give up.
cerr << get_line() << ": error: Unknown module type: " << type_ << endl;
missing_modules[type_] += 1;
des->errors += 1;
}
@ -2555,10 +2556,8 @@ Design* elaborate(list<const char*>roots)
// Errors already? Probably missing root modules. Just give up
// now and return nothing.
if (des->errors > 0) {
delete des;
return 0;
}
if (des->errors > 0)
return des;
// This method recurses through the scopes, looking for
// defparam assignments to apply to the parameters in the
@ -2608,6 +2607,9 @@ Design* elaborate(list<const char*>roots)
/*
* $Log: elaborate.cc,v $
* Revision 1.292 2003/09/25 00:25:14 steve
* Summary list of missing modules.
*
* Revision 1.291 2003/09/20 06:08:53 steve
* Evaluate nb-assign r-values using elab_and_eval.
*

81
main.cc
View File

@ -19,7 +19,7 @@ const char COPYRIGHT[] =
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: main.cc,v 1.70 2003/09/23 05:57:36 steve Exp $"
#ident "$Id: main.cc,v 1.71 2003/09/25 00:25:14 steve Exp $"
#endif
# include "config.h"
@ -83,6 +83,8 @@ generation_t generation_flag = GN_DEFAULT;
map<string,string> flags;
map<string,unsigned> missing_modules;
list<const char*> library_suff;
list<const char*> roots;
@ -565,23 +567,20 @@ int main(int argc, char*argv[])
/* On with the process of elaborating the module. */
Design*des = elaborate(roots);
if (des == 0) {
cerr << "Elaboration failed" << endl;
if (net_path) {
ofstream out (net_path);
des->dump(out);
}
return 1;
}
if (des->errors) {
if ((des == 0) || (des->errors > 0)) {
if (des != 0) {
cerr << des->errors
<< " error(s) during elaboration." << endl;
if (net_path) {
ofstream out (net_path);
des->dump(out);
}
return des->errors;
} else {
cerr << "Elaboration failed" << endl;
}
goto errors_summary;
}
des->set_flags(flags);
@ -631,7 +630,8 @@ int main(int argc, char*argv[])
cout << "CODE GENERATION -t "<<target<< endl;
}
bool emit_rc = emit(des, target);
bool emit_rc;
emit_rc = emit(des, target);
if (!emit_rc) {
cerr << "error: Code generation had errors." << endl;
return 1;
@ -656,10 +656,30 @@ int main(int argc, char*argv[])
}
return 0;
errors_summary:
if (missing_modules.size() > 0) {
cerr << "*** These modules were missing:" << endl;
map<string,unsigned>::const_iterator idx;
for (idx = missing_modules.begin()
; idx != missing_modules.end()
; idx ++)
cerr << " " << (*idx).first
<< " referenced " << (*idx).second
<< " times."<< endl;
cerr << "***" << endl;
}
return des->errors;
}
/*
* $Log: main.cc,v $
* Revision 1.71 2003/09/25 00:25:14 steve
* Summary list of missing modules.
*
* Revision 1.70 2003/09/23 05:57:36 steve
* Pass -m flag from driver via iconfig file.
*
@ -678,42 +698,5 @@ int main(int argc, char*argv[])
* scope names and system task/function names
* into this table. Also, permallocate event
* names from the beginning.
*
* Revision 1.65 2003/02/22 04:12:49 steve
* Add the portbind warning.
*
* Revision 1.64 2002/08/18 22:06:29 steve
* Terminate if the functors signal errors.
*
* Revision 1.63 2002/08/12 01:34:59 steve
* conditional ident string using autoconfig.
*
* Revision 1.62 2002/07/24 16:22:19 steve
* Verbose messages.
*
* Revision 1.61 2002/06/30 02:21:31 steve
* Add structure for asynchronous logic synthesis.
*
* Revision 1.60 2002/06/24 01:49:39 steve
* Make link_drive_constant cache its results in
* the Nexus, to improve cprop performance.
*
* Revision 1.59 2002/06/06 18:57:18 steve
* Use standard name for iostream.
*
* Revision 1.58 2002/05/28 20:40:37 steve
* ivl indexes the search path for libraries, and
* supports case insensitive module-to-file lookup.
*
* Revision 1.57 2002/05/28 02:25:03 steve
* Pass library paths through -Cfile instead of command line.
*
* Revision 1.56 2002/05/28 00:50:39 steve
* Add the ivl -C flag for bulk configuration
* from the driver, and use that to run library
* modules through the preprocessor.
*
* Revision 1.55 2002/05/24 01:13:00 steve
* Support language generation flag -g.
*/