Pass -m flag from driver via iconfig file.

This commit is contained in:
steve 2003-09-23 05:57:15 +00:00
parent 2f8181f40a
commit daa85f2479
4 changed files with 22 additions and 30 deletions

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: build_string.c,v 1.12 2003/09/22 01:12:09 steve Exp $" #ident "$Id: build_string.c,v 1.13 2003/09/23 05:57:15 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -53,7 +53,6 @@ int build_string(char*output, size_t olen, const char*pattern)
tmp_buf[tail-pattern-1] = 0; tmp_buf[tail-pattern-1] = 0;
if (((*pattern == 'v') && verbose_flag) if (((*pattern == 'v') && verbose_flag)
|| ((*pattern == 'M') && depfile)
|| ((*pattern == 'N') && npath)) { || ((*pattern == 'N') && npath)) {
int rc = build_string(output, olen, int rc = build_string(output, olen,
tmp_buf); tmp_buf);
@ -84,14 +83,6 @@ int build_string(char*output, size_t olen, const char*pattern)
} }
break; break;
case 'm':
if (mod_list) {
strcpy(output, mod_list);
output += strlen(mod_list);
olen -= strlen(mod_list);
}
break;
case 'N': case 'N':
if (npath) { if (npath) {
strcpy(output, npath); strcpy(output, npath);
@ -121,6 +112,9 @@ int build_string(char*output, size_t olen, const char*pattern)
/* /*
* $Log: build_string.c,v $ * $Log: build_string.c,v $
* Revision 1.13 2003/09/23 05:57:15 steve
* Pass -m flag from driver via iconfig file.
*
* Revision 1.12 2003/09/22 01:12:09 steve * Revision 1.12 2003/09/22 01:12:09 steve
* Pass more ivl arguments through the iconfig file. * Pass more ivl arguments through the iconfig file.
* *

View File

@ -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
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: main.c,v 1.54 2003/09/22 01:12:09 steve Exp $" #ident "$Id: main.c,v 1.55 2003/09/23 05:57:15 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -491,17 +491,7 @@ int main(int argc, char **argv)
break; break;
case 'm': case 'm':
if (mod_list == 0) { fprintf(iconfig_file, "module:%s\n", optarg);
mod_list = malloc(strlen(" -m")+strlen(optarg)+1);
strcpy(mod_list, " -m");
strcat(mod_list, optarg);
} else {
mod_list = realloc(mod_list, strlen(mod_list)
+ strlen(" -m")
+ strlen(optarg) + 1);
strcat(mod_list, " -m");
strcat(mod_list, optarg);
}
break; break;
case 'N': case 'N':
@ -704,6 +694,9 @@ int main(int argc, char **argv)
/* /*
* $Log: main.c,v $ * $Log: main.c,v $
* Revision 1.55 2003/09/23 05:57:15 steve
* Pass -m flag from driver via iconfig file.
*
* Revision 1.54 2003/09/22 01:12:09 steve * Revision 1.54 2003/09/22 01:12:09 steve
* Pass more ivl arguments through the iconfig file. * Pass more ivl arguments through the iconfig file.
* *

View File

@ -57,10 +57,10 @@
# These rules support synthesized and non-synthesized variants. # These rules support synthesized and non-synthesized variants.
[-tvvp -S] [-tvvp -S]
<ivl>%B/ivl %[v-v] -C%C %[N-N%N] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp -Fsynth2 -Fsynth -Fsyn-rules -Fcprop -Fnodangle %f %m -- - <ivl>%B/ivl %[v-v] -C%C %[N-N%N] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp -Fsynth2 -Fsynth -Fsyn-rules -Fcprop -Fnodangle %f -- -
[-tvvp] [-tvvp]
<ivl>%B/ivl %[v-v] -C%C %[N-N%N] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp -Fcprop -Fnodangle %f %m -- - <ivl>%B/ivl %[v-v] -C%C %[N-N%N] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp -Fcprop -Fnodangle %f -- -
# This is the XNF code generator. # This is the XNF code generator.

17
main.cc
View File

@ -19,7 +19,7 @@ const char COPYRIGHT[] =
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: main.cc,v 1.69 2003/09/22 01:12:08 steve Exp $" #ident "$Id: main.cc,v 1.70 2003/09/23 05:57:36 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -169,6 +169,9 @@ static void process_generation_flag(const char*gen)
* This specifies the ivlpp command line used to process * This specifies the ivlpp command line used to process
* library modules as I read them in. * library modules as I read them in.
* *
* module:<name>
* Load a VPI module.
*
* out:<path> * out:<path>
* Path to the output file. * Path to the output file.
* *
@ -216,6 +219,9 @@ static void read_iconfig_file(const char*ipath)
} else if (strcmp(buf, "ivlpp") == 0) { } else if (strcmp(buf, "ivlpp") == 0) {
ivlpp_string = strdup(cp); ivlpp_string = strdup(cp);
} else if (strcmp(buf,"module") == 0) {
flags["VPI_MODULE_LIST"] = flags["VPI_MODULE_LIST"]+","+cp;
} else if (strcmp(buf, "out") == 0) { } else if (strcmp(buf, "out") == 0) {
flags["-o"] = cp; flags["-o"] = cp;
@ -365,7 +371,7 @@ int main(int argc, char*argv[])
min_typ_max_flag = TYP; min_typ_max_flag = TYP;
min_typ_max_warn = 10; min_typ_max_warn = 10;
while ((opt = getopt(argc, argv, "C:F:f:g:hm:M:N:o:P:p:s:T:t:VvW:Y:y:")) != EOF) switch (opt) { while ((opt = getopt(argc, argv, "C:F:f:hN:P:p:t:Vv")) != EOF) switch (opt) {
case 'C': case 'C':
read_iconfig_file(optarg); read_iconfig_file(optarg);
@ -388,9 +394,6 @@ int main(int argc, char*argv[])
case 'h': case 'h':
help_flag = true; help_flag = true;
break; break;
case 'm':
flags["VPI_MODULE_LIST"] = flags["VPI_MODULE_LIST"]+","+optarg;
break;
case 'N': case 'N':
net_path = optarg; net_path = optarg;
break; break;
@ -429,7 +432,6 @@ int main(int argc, char*argv[])
"\t-C <name> Config file from driver.\n" "\t-C <name> Config file from driver.\n"
"\t-F <name> Apply netlist function <name>.\n" "\t-F <name> Apply netlist function <name>.\n"
"\t-h Print usage information, and exit.\n" "\t-h Print usage information, and exit.\n"
"\t-m <module> Load vpi module <module>.\n"
"\t-N <file> Dump the elaborated netlist to <file>.\n" "\t-N <file> Dump the elaborated netlist to <file>.\n"
"\t-P <file> Write the parsed input to <file>.\n" "\t-P <file> Write the parsed input to <file>.\n"
"\t-p <assign> Set a parameter value.\n" "\t-p <assign> Set a parameter value.\n"
@ -658,6 +660,9 @@ int main(int argc, char*argv[])
/* /*
* $Log: main.cc,v $ * $Log: main.cc,v $
* Revision 1.70 2003/09/23 05:57:36 steve
* Pass -m flag from driver via iconfig file.
*
* Revision 1.69 2003/09/22 01:12:08 steve * Revision 1.69 2003/09/22 01:12:08 steve
* Pass more ivl arguments through the iconfig file. * Pass more ivl arguments through the iconfig file.
* *