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
|
processing steps and the code generator are selected by command line
|
||||||
switches.
|
switches.
|
||||||
|
|
||||||
INVOKING
|
INVOKING ivl
|
||||||
|
|
||||||
The vl command is the compiler driver, that invokes the parser,
|
The vl command is the compiler driver, that invokes the parser,
|
||||||
optimization functions and the code generator.
|
optimization functions and the code generator.
|
||||||
|
|
||||||
Usage: vl <options>... file
|
Usage: ivl <options>... file
|
||||||
vl -h
|
ivl -h
|
||||||
|
|
||||||
-F <name>
|
-F <name>
|
||||||
Use this flag to request an optimization function be applied
|
Use this flag to request an optimization function be applied
|
||||||
|
|
@ -39,7 +39,7 @@ Usage: vl <options>... file
|
||||||
|
|
||||||
-N <file>
|
-N <file>
|
||||||
Dump the elaborated netlist to the named file. The netlist is
|
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
|
are applied and right before the output generator is
|
||||||
called. This is an aid for debugging the compiler, and the
|
called. This is an aid for debugging the compiler, and the
|
||||||
output generator in particular.
|
output generator in particular.
|
||||||
|
|
@ -56,9 +56,9 @@ Usage: vl <options>... file
|
||||||
the compiler.
|
the compiler.
|
||||||
|
|
||||||
-s <module>
|
-s <module>
|
||||||
Normally, vl will elaborate the only module in the source
|
Normally, vl will elaborate the only top-level module in the
|
||||||
file. If there are multiple modules, use this option to select
|
source file. If there are multiple modules, use this option to
|
||||||
the module to be used as the top-level module.
|
select the module to be used as the top-level module.
|
||||||
|
|
||||||
-t <name>
|
-t <name>
|
||||||
Select the output format for the compiled result. Use the
|
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
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#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
|
#endif
|
||||||
|
|
||||||
# include <stdio.h>
|
# 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. */
|
/* Select a root module, and elaborate the design. */
|
||||||
if (start_module == "") {
|
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);
|
Design*des = elaborate(modules, primitives, start_module);
|
||||||
if (des == 0) {
|
if (des == 0) {
|
||||||
cerr << "Unable to elaborate design." << endl;
|
cerr << "Unable to elaborate module " << start_module <<
|
||||||
|
"." << endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (des->errors) {
|
if (des->errors) {
|
||||||
|
|
@ -232,6 +249,9 @@ int main(int argc, char*argv[])
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: main.cc,v $
|
* $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
|
* Revision 1.14 1999/04/23 04:34:32 steve
|
||||||
* Make debug output file parameters.
|
* 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
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#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
|
#endif
|
||||||
|
|
||||||
# include "parse_misc.h"
|
# include "parse_misc.h"
|
||||||
|
|
@ -752,6 +752,8 @@ statement
|
||||||
}
|
}
|
||||||
| delay statement_opt
|
| delay statement_opt
|
||||||
{ PDelayStatement*tmp = new PDelayStatement($1, $2);
|
{ PDelayStatement*tmp = new PDelayStatement($1, $2);
|
||||||
|
tmp->set_file(@1.text);
|
||||||
|
tmp->set_lineno(@1.first_line);
|
||||||
$$ = tmp;
|
$$ = tmp;
|
||||||
}
|
}
|
||||||
| event_control statement_opt
|
| event_control statement_opt
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue