More intelligent selection of module to elaborate.
This commit is contained in:
parent
b44ef063a8
commit
10f46dae66
14
README.txt
14
README.txt
|
|
@ -8,13 +8,13 @@ forms, then passed to a code generator for final output. The
|
|||
processing steps and the code generator are selected by command line
|
||||
switches.
|
||||
|
||||
INVOKING
|
||||
INVOKING ivl
|
||||
|
||||
The vl command is the compiler driver, that invokes the parser,
|
||||
optimization functions and the code generator.
|
||||
|
||||
Usage: vl <options>... file
|
||||
vl -h
|
||||
Usage: ivl <options>... file
|
||||
ivl -h
|
||||
|
||||
-F <name>
|
||||
Use this flag to request an optimization function be applied
|
||||
|
|
@ -39,7 +39,7 @@ Usage: vl <options>... file
|
|||
|
||||
-N <file>
|
||||
Dump the elaborated netlist to the named file. The netlist is
|
||||
the folly elaborated netlist, after all the function modules
|
||||
the fully elaborated netlist, after all the function modules
|
||||
are applied and right before the output generator is
|
||||
called. This is an aid for debugging the compiler, and the
|
||||
output generator in particular.
|
||||
|
|
@ -56,9 +56,9 @@ Usage: vl <options>... file
|
|||
the compiler.
|
||||
|
||||
-s <module>
|
||||
Normally, vl will elaborate the only module in the source
|
||||
file. If there are multiple modules, use this option to select
|
||||
the module to be used as the top-level module.
|
||||
Normally, vl will elaborate the only top-level module in the
|
||||
source file. If there are multiple modules, use this option to
|
||||
select the module to be used as the top-level module.
|
||||
|
||||
-t <name>
|
||||
Select the output format for the compiled result. Use the
|
||||
|
|
|
|||
26
main.cc
26
main.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: main.cc,v 1.14 1999/04/23 04:34:32 steve Exp $"
|
||||
#ident "$Id: main.cc,v 1.15 1999/05/05 03:27:15 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <stdio.h>
|
||||
|
|
@ -181,15 +181,32 @@ int main(int argc, char*argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (start_module == "") {
|
||||
for (map<string,Module*>::iterator mod = modules.begin()
|
||||
; mod != modules.end()
|
||||
; mod ++ ) {
|
||||
Module*cur = (*mod).second;
|
||||
if (cur->ports.size() == 0)
|
||||
if (start_module == "") {
|
||||
start_module = cur->get_name();
|
||||
} else {
|
||||
cerr << "More then 1 top level module."
|
||||
<< endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Select a root module, and elaborate the design. */
|
||||
if (start_module == "") {
|
||||
start_module = "main";
|
||||
cerr << "No top level modules, and no -s option." << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Design*des = elaborate(modules, primitives, start_module);
|
||||
if (des == 0) {
|
||||
cerr << "Unable to elaborate design." << endl;
|
||||
cerr << "Unable to elaborate module " << start_module <<
|
||||
"." << endl;
|
||||
return 1;
|
||||
}
|
||||
if (des->errors) {
|
||||
|
|
@ -232,6 +249,9 @@ int main(int argc, char*argv[])
|
|||
|
||||
/*
|
||||
* $Log: main.cc,v $
|
||||
* Revision 1.15 1999/05/05 03:27:15 steve
|
||||
* More intelligent selection of module to elaborate.
|
||||
*
|
||||
* Revision 1.14 1999/04/23 04:34:32 steve
|
||||
* Make debug output file parameters.
|
||||
*
|
||||
|
|
|
|||
4
parse.y
4
parse.y
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: parse.y,v 1.19 1999/05/01 02:57:53 steve Exp $"
|
||||
#ident "$Id: parse.y,v 1.20 1999/05/05 03:27:15 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "parse_misc.h"
|
||||
|
|
@ -752,6 +752,8 @@ statement
|
|||
}
|
||||
| delay statement_opt
|
||||
{ PDelayStatement*tmp = new PDelayStatement($1, $2);
|
||||
tmp->set_file(@1.text);
|
||||
tmp->set_lineno(@1.first_line);
|
||||
$$ = tmp;
|
||||
}
|
||||
| event_control statement_opt
|
||||
|
|
|
|||
Loading…
Reference in New Issue