The -f flag is now in place.
This commit is contained in:
parent
3aef1be0e7
commit
b5b15a5990
36
iverilog.c
36
iverilog.c
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: iverilog.c,v 1.6 2000/04/26 21:11:41 steve Exp $"
|
||||
#ident "$Id: iverilog.c,v 1.7 2000/04/29 01:20:14 steve Exp $"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -34,6 +34,8 @@ const char*opath = "a.out";
|
|||
const char*targ = "vvm";
|
||||
const char*start = 0;
|
||||
|
||||
char*f_list = 0;
|
||||
|
||||
int verbose_flag = 0;
|
||||
|
||||
char tmp[4096];
|
||||
|
|
@ -93,6 +95,13 @@ static int t_vvm(char*cmd, unsigned ncmd)
|
|||
strcpy(cmd+ncmd, tmp);
|
||||
ncmd += rc;
|
||||
|
||||
if (f_list) {
|
||||
rc = strlen(f_list);
|
||||
cmd = realloc(cmd, ncmd+rc+1);
|
||||
strcpy(cmd+ncmd, tmp);
|
||||
ncmd += rc;
|
||||
}
|
||||
|
||||
if (start) {
|
||||
sprintf(tmp, " -s%s", start);
|
||||
rc = strlen(tmp);
|
||||
|
|
@ -144,6 +153,13 @@ static int t_xnf(char*cmd, unsigned ncmd)
|
|||
strcpy(cmd+ncmd, tmp);
|
||||
ncmd += rc;
|
||||
|
||||
if (f_list) {
|
||||
rc = strlen(f_list);
|
||||
cmd = realloc(cmd, ncmd+rc+1);
|
||||
strcpy(cmd+ncmd, tmp);
|
||||
ncmd += rc;
|
||||
}
|
||||
|
||||
if (start) {
|
||||
sprintf(tmp, " -s%s", start);
|
||||
rc = strlen(tmp);
|
||||
|
|
@ -173,7 +189,7 @@ int main(int argc, char **argv)
|
|||
int opt, idx;
|
||||
char*cp;
|
||||
|
||||
while ((opt = getopt(argc, argv, "B:Eo:s:t:v")) != EOF) {
|
||||
while ((opt = getopt(argc, argv, "B:Ef:o:s:t:v")) != EOF) {
|
||||
|
||||
switch (opt) {
|
||||
case 'B':
|
||||
|
|
@ -182,6 +198,19 @@ int main(int argc, char **argv)
|
|||
case 'E':
|
||||
e_flag = 1;
|
||||
break;
|
||||
case 'f':
|
||||
if (f_list == 0) {
|
||||
f_list = malloc(strlen("-f")+strlen(optarg)+1);
|
||||
strcpy(f_list, "-f");
|
||||
strcat(f_list, optarg);
|
||||
} else {
|
||||
f_list = realloc(f_list, strlen(f_list) +
|
||||
strlen(" -f") +
|
||||
strlen(optarg) + 1);
|
||||
strcat(f_list, " -f");
|
||||
strcat(f_list, optarg);
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
opath = optarg;
|
||||
break;
|
||||
|
|
@ -258,6 +287,9 @@ int main(int argc, char **argv)
|
|||
|
||||
/*
|
||||
* $Log: iverilog.c,v $
|
||||
* Revision 1.7 2000/04/29 01:20:14 steve
|
||||
* The -f flag is now in place.
|
||||
*
|
||||
* Revision 1.6 2000/04/26 21:11:41 steve
|
||||
* Mussed up command string mashing.
|
||||
*
|
||||
|
|
|
|||
10
iverilog.man
10
iverilog.man
|
|
@ -4,7 +4,7 @@ iverilog - Icarus Verilog compiler
|
|||
|
||||
.SH SYNOPSIS
|
||||
.B iverilog
|
||||
[-Dmacro[=defn]] [-E] [-Iincludepath] [-mmodule] [-ooutputfilename] [-stopmodule] [-ttype] [-v] sourcefile[s]
|
||||
[-Dmacro[=defn]] [-E] [-fflag=value] [-Iincludepath] [-mmodule] [-ooutputfilename] [-stopmodule] [-ttype] [-v] sourcefile[s]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
|
|
@ -30,6 +30,12 @@ is the Verilog input, but with file inclusions and macro references
|
|||
expanded and removed. This is useful, for example, to preprocess
|
||||
verilog source for use by other compilers.
|
||||
.TP 8
|
||||
.B -f\fIflag=value\fP
|
||||
Assign a value to a target specific flag. The \fB-f\fP switch may be
|
||||
used as often as necessary to specify all the desired flags. The flags
|
||||
that are used depend on the target that is selected, and are described
|
||||
in target specific documentation. Flags that are not used are ignored.
|
||||
.TP 8
|
||||
.B -I\fIincludepath\fP
|
||||
Append path \fIincludepath\fP to list of paths searched for Verilog
|
||||
include files. (NOT IMPLEMENTED)
|
||||
|
|
@ -56,7 +62,7 @@ information from the various components.
|
|||
.SH TARGETS
|
||||
|
||||
The Icarus Verilog compiler supports a variety of targets, for
|
||||
different purposes, and the \fB-t\fP flag is used to select the
|
||||
different purposes, and the \fB-t\fP switch is used to select the
|
||||
desired target.
|
||||
|
||||
.TP 8
|
||||
|
|
|
|||
Loading…
Reference in New Issue