diff --git a/README.txt b/README.txt index 47c552da9..89512670f 100644 --- a/README.txt +++ b/README.txt @@ -166,6 +166,17 @@ Usage: ivl ... file target specific information to the target back-end, or options/parameters to optimization functions, if any are defined. +-m + Cause a named VPI module to be included in the module + list. This parameter appends the named module to the end of + the VPI_MODULE_LIST. This is an ordered list of modules to be + loaded into the simulation at runtime. + + This list can also be set with -fVPI_MODULE_LIST= which + sets the list completely. Then, -m after this will append + module names to the list sp specified. The default list + includes "system". + -N Dump the elaborated netlist to the named file. The netlist is the folly elaborated netlist, after all the function modules diff --git a/main.cc b/main.cc index 204b587e4..15d500794 100644 --- a/main.cc +++ b/main.cc @@ -19,7 +19,7 @@ const char COPYRIGHT[] = * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: main.cc,v 1.27 1999/12/30 17:37:14 steve Exp $" +#ident "$Id: main.cc,v 1.28 2000/01/13 05:11:25 steve Exp $" #endif const char NOTICE[] = @@ -122,7 +122,9 @@ int main(int argc, char*argv[]) unsigned flag_errors = 0; queue net_func_queue; - while ((opt = getopt(argc, argv, "F:f:hN:o:P:s:t:v")) != EOF) switch (opt) { + flags["VPI_MODULE_LIST"] = "system"; + + while ((opt = getopt(argc, argv, "F:f:hm:N:o:P:s:t:v")) != EOF) switch (opt) { case 'F': { net_func tmp = name_to_net_func(optarg); if (tmp == 0) { @@ -140,6 +142,9 @@ int main(int argc, char*argv[]) case 'h': help_flag = true; break; + case 'm': + flags["VPI_MODULE_LIST"] = flags["VPI_MODULE_LIST"]+","+optarg; + break; case 'N': net_path = optarg; break; @@ -282,6 +287,9 @@ int main(int argc, char*argv[]) /* * $Log: main.cc,v $ + * Revision 1.28 2000/01/13 05:11:25 steve + * Support for multiple VPI modules. + * * Revision 1.27 1999/12/30 17:37:14 steve * Remove the now useless sigfold functor. * diff --git a/t-vvm.cc b/t-vvm.cc index 1295fa50f..83d46ac22 100644 --- a/t-vvm.cc +++ b/t-vvm.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: t-vvm.cc,v 1.95 2000/01/13 03:35:35 steve Exp $" +#ident "$Id: t-vvm.cc,v 1.96 2000/01/13 05:11:25 steve Exp $" #endif # include @@ -715,7 +715,20 @@ void target_vvm::end_design(ostream&os, const Design*mod) if (vpi_module_path.length() > 0) os << " vvm_set_module_path(\"" << vpi_module_path << "\");" << endl; - os << " vvm_load_vpi_module(\"system.vpi\");" << endl; + + string vpi_module_list = mod->get_flag("VPI_MODULE_LIST"); + while (vpi_module_list.length()) { + string name; + unsigned pos = vpi_module_list.find(','); + if (pos < vpi_module_list.length()) { + name = vpi_module_list.substr(0, pos); + vpi_module_list = vpi_module_list.substr(pos+1); + } else { + name = vpi_module_list; + vpi_module_list = ""; + } + os << " vvm_load_vpi_module(\"" << name << ".vpi\");" << endl; + } os << " design_init();" << endl; os << " design_start();" << endl; @@ -2023,6 +2036,9 @@ extern const struct target tgt_vvm = { }; /* * $Log: t-vvm.cc,v $ + * Revision 1.96 2000/01/13 05:11:25 steve + * Support for multiple VPI modules. + * * Revision 1.95 2000/01/13 03:35:35 steve * Multiplication all the way to simulation. *