The -s flag can now be repeated on the iverilog command.
This commit is contained in:
parent
55fb219503
commit
859318becd
|
|
@ -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) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: globals.h,v 1.5 2001/10/20 23:02:40 steve Exp $"
|
#ident "$Id: globals.h,v 1.6 2001/10/23 00:37:30 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
|
|
@ -42,8 +42,8 @@ extern const char*npath;
|
||||||
/* This is the name of the output file that the user selected. */
|
/* This is the name of the output file that the user selected. */
|
||||||
extern const char*opath;
|
extern const char*opath;
|
||||||
|
|
||||||
/* This pointer is set if there was a -s<value> parameter. */
|
/* This pointer is set if there were -s<value> parameters. */
|
||||||
extern const char*start;
|
extern char*start;
|
||||||
|
|
||||||
/* This flag is true if the -S flag was used on the command line. */
|
/* This flag is true if the -S flag was used on the command line. */
|
||||||
extern int synth_flag;
|
extern int synth_flag;
|
||||||
|
|
@ -65,6 +65,9 @@ extern int build_string(char*out, size_t olen, const char*pattern);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: globals.h,v $
|
* $Log: globals.h,v $
|
||||||
|
* Revision 1.6 2001/10/23 00:37:30 steve
|
||||||
|
* The -s flag can now be repeated on the iverilog command.
|
||||||
|
*
|
||||||
* Revision 1.5 2001/10/20 23:02:40 steve
|
* Revision 1.5 2001/10/20 23:02:40 steve
|
||||||
* Add automatic module libraries.
|
* Add automatic module libraries.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.TH iverilog 1 "$Date: 2001/10/20 23:02:40 $" Version "$Date: 2001/10/20 23:02:40 $"
|
.TH iverilog 1 "$Date: 2001/10/23 00:37:30 $" Version "$Date: 2001/10/23 00:37:30 $"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
iverilog - Icarus Verilog compiler
|
iverilog - Icarus Verilog compiler
|
||||||
|
|
||||||
|
|
@ -94,9 +94,10 @@ netlist format, the \fB-S\fP switch is unnecessary and has no effect.
|
||||||
.TP 8
|
.TP 8
|
||||||
.B -s \fItopmodule\fP
|
.B -s \fItopmodule\fP
|
||||||
Specify the top level module to elaborate. Icarus Verilog will by default
|
Specify the top level module to elaborate. Icarus Verilog will by default
|
||||||
choose the only module that has no ports. However, this simplistic
|
choose modules that are not instantiated in any other modules, but
|
||||||
heuristic is often not sufficient, and sometimes not what is wanted
|
sometimes that is not sufficient, or instantiates too many modules. If
|
||||||
anyhow.
|
the user specifies one or more root modules with \fB-s\fP flags, then
|
||||||
|
they will be used as root modules instead.
|
||||||
.TP 8
|
.TP 8
|
||||||
.B -T\fImin|typ|max\fP
|
.B -T\fImin|typ|max\fP
|
||||||
Use this switch to select min, typ or max times from min:typ:max
|
Use this switch to select min, typ or max times from min:typ:max
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ident "$Id: main.c,v 1.24 2001/10/20 23:02:40 steve Exp $"
|
#ident "$Id: main.c,v 1.25 2001/10/23 00:37:30 steve Exp $"
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
||||||
|
|
@ -84,7 +84,6 @@ const char*mtm = 0;
|
||||||
const char*opath = "a.out" EXEEXT;
|
const char*opath = "a.out" EXEEXT;
|
||||||
const char*npath = 0;
|
const char*npath = 0;
|
||||||
const char*targ = "vvp";
|
const char*targ = "vvp";
|
||||||
const char*start = 0;
|
|
||||||
|
|
||||||
char warning_flags[16] = "";
|
char warning_flags[16] = "";
|
||||||
char *library_flags = 0;
|
char *library_flags = 0;
|
||||||
|
|
@ -93,6 +92,7 @@ char*inc_list = 0;
|
||||||
char*def_list = 0;
|
char*def_list = 0;
|
||||||
char*mod_list = 0;
|
char*mod_list = 0;
|
||||||
char*command_filename = 0;
|
char*command_filename = 0;
|
||||||
|
char*start = 0;
|
||||||
|
|
||||||
char*f_list = 0;
|
char*f_list = 0;
|
||||||
|
|
||||||
|
|
@ -298,11 +298,9 @@ static int t_xnf(char*cmd, unsigned ncmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (start) {
|
if (start) {
|
||||||
sprintf(tmp, " -s%s", start);
|
cmd = realloc(cmd, ncmd+strlen(start)+1);
|
||||||
rc = strlen(tmp);
|
strcpy(cmd+ncmd, start);
|
||||||
cmd = realloc(cmd, ncmd+rc+1);
|
ncmd += strlen(start);
|
||||||
strcpy(cmd+ncmd, tmp);
|
|
||||||
ncmd += rc;
|
|
||||||
}
|
}
|
||||||
sprintf(tmp, " -- -");
|
sprintf(tmp, " -- -");
|
||||||
rc = strlen(tmp);
|
rc = strlen(tmp);
|
||||||
|
|
@ -488,7 +486,18 @@ int main(int argc, char **argv)
|
||||||
synth_flag = 1;
|
synth_flag = 1;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
start = optarg;
|
if (start) {
|
||||||
|
static const char *s = " -s ";
|
||||||
|
size_t l = strlen(start);
|
||||||
|
start = realloc(start, l + strlen(optarg) + strlen(s) + 1);
|
||||||
|
strcpy(start + l, s);
|
||||||
|
strcpy(start + l + strlen(s), optarg);
|
||||||
|
} else {
|
||||||
|
static const char *s = "-s ";
|
||||||
|
start = malloc(strlen(optarg) + strlen(s) + 1);
|
||||||
|
strcpy(start, s);
|
||||||
|
strcpy(start + strlen(s), optarg);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
if (strcmp(optarg,"min") == 0) {
|
if (strcmp(optarg,"min") == 0) {
|
||||||
|
|
@ -661,6 +670,9 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: main.c,v $
|
* $Log: main.c,v $
|
||||||
|
* Revision 1.25 2001/10/23 00:37:30 steve
|
||||||
|
* The -s flag can now be repeated on the iverilog command.
|
||||||
|
*
|
||||||
* Revision 1.24 2001/10/20 23:02:40 steve
|
* Revision 1.24 2001/10/20 23:02:40 steve
|
||||||
* Add automatic module libraries.
|
* Add automatic module libraries.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -58,20 +58,20 @@
|
||||||
# be useful and interesting if the -N flag is included.
|
# be useful and interesting if the -N flag is included.
|
||||||
|
|
||||||
[-tnull -S]
|
[-tnull -S]
|
||||||
<ivl>%B/ivl %[v-v] %y %W %[s-s%s] %[N-N%N] %[T-T%T] -tdll -fDLL=%B/null.tgt -- -
|
<ivl>%B/ivl %[v-v] %y %W %s %[N-N%N] %[T-T%T] -tdll -fDLL=%B/null.tgt -- -
|
||||||
|
|
||||||
[-tnull]
|
[-tnull]
|
||||||
<ivl>%B/ivl %[v-v] %y %W %[s-s%s] %[N-N%N] %[T-T%T] -tdll -fDLL=%B/null.tgt -- -
|
<ivl>%B/ivl %[v-v] %y %W %s %[N-N%N] %[T-T%T] -tdll -fDLL=%B/null.tgt -- -
|
||||||
|
|
||||||
# --
|
# --
|
||||||
# The vvp target generates code that the vvp simulation engine can execute.
|
# The vvp target generates code that the vvp simulation engine can execute.
|
||||||
# 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] %y %W %[s-s%s] %[N-N%N] %[T-T%T] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp -Fsynth -Fsyn-rules -Fcprop -Fnodangle %f %m -o%o -- -
|
<ivl>%B/ivl %[v-v] %y %W %s %[N-N%N] %[T-T%T] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp -Fsynth -Fsyn-rules -Fcprop -Fnodangle %f %m -o%o -- -
|
||||||
|
|
||||||
[-tvvp]
|
[-tvvp]
|
||||||
<ivl>%B/ivl %[v-v] %y %W %[s-s%s] %[N-N%N] %[T-T%T] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp -Fcprop -Fnodangle %f %m -o%o -- -
|
<ivl>%B/ivl %[v-v] %y %W %s %[N-N%N] %[T-T%T] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp -Fcprop -Fnodangle %f %m -o%o -- -
|
||||||
|
|
||||||
# --
|
# --
|
||||||
# The vvm target uses the <ivl> string to take the preprocessed code from
|
# The vvm target uses the <ivl> string to take the preprocessed code from
|
||||||
|
|
@ -80,20 +80,20 @@
|
||||||
# on the result.
|
# on the result.
|
||||||
|
|
||||||
[-tvvm]
|
[-tvvm]
|
||||||
<ivl>%B/ivl %[v-v] %y %W %[s-s%s] %[N-N%N] %[T-T%T] -tvvm -Fcprop -Fnodangle -fVPI_MODULE_PATH=%B %f %m -o%o.cc -- -
|
<ivl>%B/ivl %[v-v] %y %W %s %[N-N%N] %[T-T%T] -tvvm -Fcprop -Fnodangle -fVPI_MODULE_PATH=%B %f %m -o%o.cc -- -
|
||||||
|
|
||||||
|
|
||||||
# This is the XNF code generator.
|
# This is the XNF code generator.
|
||||||
|
|
||||||
[-txnf]
|
[-txnf]
|
||||||
<ivl>%B/ivl %y %[v-v] %[s-s%s] %[N-N%N] %[T-T%T] -txnf -Fsynth -Fsyn-rules -Fcprop -Fnodangle -o%o -- -
|
<ivl>%B/ivl %y %[v-v] %s %[N-N%N] %[T-T%T] -txnf -Fsynth -Fsyn-rules -Fcprop -Fnodangle -o%o -- -
|
||||||
|
|
||||||
# And this is another XNF code generator, under development.
|
# And this is another XNF code generator, under development.
|
||||||
[-tfpga]
|
[-tfpga]
|
||||||
<ivl>%B/ivl %y %[v-v] %[s-s%s] %[N-N%N] %[T-T%T] %f -tdll -fDLL=%B/fpga.tgt -Fsynth -Fsyn-rules -Fcprop -Fnodangle -o%o -- -
|
<ivl>%B/ivl %y %[v-v] %s %[N-N%N] %[T-T%T] %f -tdll -fDLL=%B/fpga.tgt -Fsynth -Fsyn-rules -Fcprop -Fnodangle -o%o -- -
|
||||||
|
|
||||||
# --
|
# --
|
||||||
# This is the pal code generator. The target module requires the -fpart=<type>
|
# This is the pal code generator. The target module requires the -fpart=<type>
|
||||||
# flag to specify the part type.
|
# flag to specify the part type.
|
||||||
[-tpal]
|
[-tpal]
|
||||||
<ivl>%B/ivl %y %[v-v] %[s-s%s] %[N-N%N] %[T-T%T] -tdll -fDLL=%B/pal.tgt -Fsynth -Fsyn-rules -Fcprop -Fnodangle -o%o -- -
|
<ivl>%B/ivl %y %[v-v] %s %[N-N%N] %[T-T%T] -tdll -fDLL=%B/pal.tgt -Fsynth -Fsyn-rules -Fcprop -Fnodangle -o%o -- -
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue