ivl -F and -t flags are onpassed throught the -C file.

This commit is contained in:
steve 2003-11-13 03:10:37 +00:00
parent 534a656be8
commit 435f06bd21
12 changed files with 71 additions and 42 deletions

View File

@ -16,7 +16,7 @@
# 59 Temple Place - Suite 330 # 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA # Boston, MA 02111-1307, USA
# #
#ident "$Id: Makefile.in,v 1.157 2003/11/01 04:22:50 steve Exp $" #ident "$Id: Makefile.in,v 1.158 2003/11/13 03:10:37 steve Exp $"
# #
# #
SHELL = /bin/sh SHELL = /bin/sh
@ -217,7 +217,9 @@ endif
CONF_INSTALL = $(libdir)/ivl/iverilog.conf CONF_INSTALL = $(libdir)/ivl/iverilog.conf
install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(CONF_INSTALL) $(includedir)/ivl_target.h $(includedir)/_pli_types.h $(includedir)/vpi_user.h $(includedir)/acc_user.h $(includedir)/veriuser.h $(WIN32_INSTALL) $(INSTALL_DOC) XNF_INSTALL = $(libdir)/ivl/xnf.conf $(libdir)/ivl/xnf-s.conf
install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(CONF_INSTALL) $(includedir)/ivl_target.h $(includedir)/_pli_types.h $(includedir)/vpi_user.h $(includedir)/acc_user.h $(includedir)/veriuser.h $(WIN32_INSTALL) $(INSTALL_DOC) $(XNF_INSTALL)
for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) $@); done for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) $@); done
for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) $@); done for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) $@); done
for dir in vpi ivlpp driver; \ for dir in vpi ivlpp driver; \
@ -236,6 +238,12 @@ $(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@
$(libdir)/ivl/iverilog.conf: $(srcdir)/iverilog.conf $(libdir)/ivl/iverilog.conf: $(srcdir)/iverilog.conf
$(INSTALL_DATA) $(srcdir)/iverilog.conf $(libdir)/ivl/iverilog.conf $(INSTALL_DATA) $(srcdir)/iverilog.conf $(libdir)/ivl/iverilog.conf
$(libdir)/ivl/xnf-s.conf: $(srcdir)/xnf-s.conf
$(INSTALL_DATA) $(srcdir)/xnf-s.conf $(libdir)/ivl/xnf-s.conf
$(libdir)/ivl/xnf.conf: $(srcdir)/xnf.conf
$(INSTALL_DATA) $(srcdir)/xnf.conf $(libdir)/ivl/xnf.conf
$(includedir)/ivl_target.h: $(srcdir)/ivl_target.h $(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
$(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h $(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h

View File

@ -48,32 +48,26 @@
# 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] -C%C %[N-N%N] -tdll -fDLL=%B/null.tgt -Fsynth -Fsyn-rules -- - <ivl>%B/ivl %[v-v] -C%c -C%C %[N-N%N] -fDLL=%B/null.tgt -- -
[-tnull] [-tnull]
<ivl>%B/ivl %[v-v] -C%C %[N-N%N] -tdll -fDLL=%B/null.tgt -- - <ivl>%B/ivl %[v-v] -C%c -C%C %[N-N%N] -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] -C%c -C%C %[N-N%N] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp %f -- - <ivl>%B/ivl %[v-v] -C%c -C%C %[N-N%N] -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp %f -- -
[-tvvp] [-tvvp]
<ivl>%B/ivl %[v-v] -C%c -C%C %[N-N%N] -tdll -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp %f -- - <ivl>%B/ivl %[v-v] -C%c -C%C %[N-N%N] -fDLL=%B/vvp.tgt -fVVP_EXECUTABLE=%B/../../bin/vvp %f -- -
# This is the XNF code generator. # This is the XNF code generator.
[-txnf] [-txnf]
<ivl>%B/ivl -C%C %[v-v] %[N-N%N] -txnf -Fsynth -Fsyn-rules -Fxnfio -Fcprop -Fnodangle -- - <ivl>%B/ivl -C%c -C%C %[v-v] %[N-N%N] -- -
# And this is another XNF code generator, under development. # And this is another XNF code generator, under development.
[-tfpga] [-tfpga]
<ivl>%B/ivl -C%C %[v-v] %[N-N%N] %f -tdll -fDLL=%B/fpga.tgt -Fsynth2 -Fsynth -Fsyn-rules -Fcprop -Fnodangle -- - <ivl>%B/ivl -C%c -C%C %[v-v] %[N-N%N] %f -fDLL=%B/fpga.tgt -- -
# --
# This is the pal code generator. The target module requires the -fpart=<type>
# flag to specify the part type.
[-tpal]
<ivl>%B/ivl -C%C %[v-v] %[N-N%N] %f -tdll -fDLL=%B/pal.tgt -Fsynth -Fsyn-rules -Fcprop -Fnodangle -- -

35
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.75 2003/11/10 20:59:03 steve Exp $" #ident "$Id: main.cc,v 1.76 2003/11/13 03:10:38 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -203,6 +203,9 @@ static void process_generation_flag(const char*gen)
* -T:<min/typ/max> * -T:<min/typ/max>
* Select which expression to use. * Select which expression to use.
* *
* -t:<target>
* Usually, "-t:dll"
*
* depfile:<path> * depfile:<path>
* Give the path to an output dependency file. * Give the path to an output dependency file.
* *
@ -326,6 +329,9 @@ static void read_iconfig_file(const char*ipath)
} else if (strcmp(buf, "-Y") == 0) { } else if (strcmp(buf, "-Y") == 0) {
library_suff.push_back(strdup(cp)); library_suff.push_back(strdup(cp));
} else if (strcmp(buf,"-t") == 0) {
target = strdup(cp);
} else if (strcmp(buf,"-T") == 0) { } else if (strcmp(buf,"-T") == 0) {
if (strcmp(cp,"min") == 0) { if (strcmp(cp,"min") == 0) {
min_typ_max_flag = MIN; min_typ_max_flag = MIN;
@ -405,23 +411,12 @@ 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:hN:P:p:t:Vv")) != EOF) switch (opt) { while ((opt = getopt(argc, argv, "C:f:hN:P:p:Vv")) != EOF) switch (opt) {
case 'C': case 'C':
read_iconfig_file(optarg); read_iconfig_file(optarg);
break; break;
case 'F': {
net_func tmp = name_to_net_func(optarg);
if (tmp == 0) {
cerr << "No such design transform function ``"
<< optarg << "''." << endl;
flag_errors += 1;
break;
}
net_func_queue.push(tmp);
break;
}
case 'f': case 'f':
parm_to_flagmap(optarg); parm_to_flagmap(optarg);
break; break;
@ -437,9 +432,6 @@ int main(int argc, char*argv[])
case 'p': case 'p':
parm_to_flagmap(optarg); parm_to_flagmap(optarg);
break; break;
case 't':
target = optarg;
break;
case 'v': case 'v':
verbose_flag = true; verbose_flag = true;
# if defined(HAVE_TIMES) # if defined(HAVE_TIMES)
@ -464,12 +456,10 @@ int main(int argc, char*argv[])
"usage: ivl <options> <file>\n" "usage: ivl <options> <file>\n"
"options:\n" "options:\n"
"\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-h Print usage information, and exit.\n" "\t-h Print usage information, and exit.\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"
"\t-t <name> Select target <name>.\n"
"\t-v Print progress indications" "\t-v Print progress indications"
#if defined(HAVE_TIMES) #if defined(HAVE_TIMES)
" and execution times" " and execution times"
@ -478,12 +468,6 @@ int main(int argc, char*argv[])
"\t-V Print version and copyright information, and exit.\n" "\t-V Print version and copyright information, and exit.\n"
; ;
cout << "Netlist functions:" << endl;
for (unsigned idx = 0 ; func_table[idx].name ; idx += 1)
cout << "\t-F " << func_table[idx].name << endl;
cout << "Target types:" << endl;
for (unsigned idx = 0 ; target_table[idx] ; idx += 1)
cout << "\t-t " << target_table[idx]->name << endl;
return 0; return 0;
} }
@ -716,6 +700,9 @@ int main(int argc, char*argv[])
/* /*
* $Log: main.cc,v $ * $Log: main.cc,v $
* Revision 1.76 2003/11/13 03:10:38 steve
* ivl -F and -t flags are onpassed throught the -C file.
*
* Revision 1.75 2003/11/10 20:59:03 steve * Revision 1.75 2003/11/10 20:59:03 steve
* Design::get_flag returns const char* instead of string. * Design::get_flag returns const char* instead of string.
* *

View File

@ -17,7 +17,7 @@
# 59 Temple Place - Suite 330 # 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA # Boston, MA 02111-1307, USA
# #
#ident "$Id: Makefile.in,v 1.14 2003/10/27 06:12:47 steve Exp $" #ident "$Id: Makefile.in,v 1.15 2003/11/13 03:10:38 steve Exp $"
# #
# #
SHELL = /bin/sh SHELL = /bin/sh
@ -96,11 +96,17 @@ INSTALL_DOC = $(mandir)/man1/iverilog-fpga.1
INSTALL_DOCDIR = $(mandir)/man1 INSTALL_DOCDIR = $(mandir)/man1
endif endif
install: all installdirs $(libdir)/ivl/fpga.tgt $(INSTALL_DOC) install: all installdirs $(libdir)/ivl/fpga.tgt $(INSTALL_DOC) $(libdir)/ivl/fpga.conf $(libdir)/ivl/fpga-s.conf
$(libdir)/ivl/fpga.tgt: ./fpga.tgt $(libdir)/ivl/fpga.tgt: ./fpga.tgt
$(INSTALL_PROGRAM) ./fpga.tgt $(libdir)/ivl/fpga.tgt $(INSTALL_PROGRAM) ./fpga.tgt $(libdir)/ivl/fpga.tgt
$(libdir)/ivl/fpga.conf: $(srcdir)/fpga.conf
$(INSTALL_DATA) $(srcdir)/fpga.conf $(libdir)/ivl/fpga.conf
$(libdir)/ivl/fpga-s.conf: $(srcdir)/fpga-s.conf
$(INSTALL_DATA) $(srcdir)/fpga-s.conf $(libdir)/ivl/fpga-s.conf
$(mandir)/man1/iverilog-fpga.1: $(srcdir)/iverilog-fpga.man $(mandir)/man1/iverilog-fpga.1: $(srcdir)/iverilog-fpga.man
$(INSTALL_DATA) $(srcdir)/iverilog-fpga.man $(mandir)/man1/iverilog-fpga.1 $(INSTALL_DATA) $(srcdir)/iverilog-fpga.man $(mandir)/man1/iverilog-fpga.1
@ -114,5 +120,7 @@ installdirs: ../mkinstalldirs
uninstall: uninstall:
rm -f $(libdir)/ivl/fpga.tgt rm -f $(libdir)/ivl/fpga.tgt
rm -f $(INSTALL_DOC) rm -f $(INSTALL_DOC)
rm -f $(libdir)/ivl/fpga-s.conf
rm -f $(libdir)/ivl/fpga.conf
-include $(patsubst %.o, dep/%.d, $O) -include $(patsubst %.o, dep/%.d, $O)

6
tgt-fpga/fpga.conf Normal file
View File

@ -0,0 +1,6 @@
functor:synth2
functor:synth
functor:syn-rules
functor:cprop
functor:nodangle
-t:dll

View File

@ -16,7 +16,7 @@
# 59 Temple Place - Suite 330 # 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA # Boston, MA 02111-1307, USA
# #
#ident "$Id: Makefile.in,v 1.9 2003/08/22 04:27:10 steve Exp $" #ident "$Id: Makefile.in,v 1.10 2003/11/13 03:10:38 steve Exp $"
# #
# #
SHELL = /bin/sh SHELL = /bin/sh
@ -73,17 +73,25 @@ clean:
distclean: clean distclean: clean
rm -f Makefile config.status config.log config.cache rm -f Makefile config.status config.log config.cache
install: all installdirs $(libdir)/ivl/null.tgt install: all installdirs $(libdir)/ivl/null.tgt $(INSTALL_DOC) $(libdir)/ivl/null.conf $(libdir)/ivl/null-s.conf
$(libdir)/ivl/null.tgt: ./null.tgt $(libdir)/ivl/null.tgt: ./null.tgt
$(INSTALL_PROGRAM) ./null.tgt $(libdir)/ivl/null.tgt $(INSTALL_PROGRAM) ./null.tgt $(libdir)/ivl/null.tgt
$(libdir)/ivl/null.conf: $(srcdir)/null.conf
$(INSTALL_DATA) $(srcdir)/null.conf $(libdir)/ivl/null.conf
$(libdir)/ivl/null-s.conf: $(srcdir)/null-s.conf
$(INSTALL_DATA) $(srcdir)/null-s.conf $(libdir)/ivl/null-s.conf
installdirs: ../mkinstalldirs installdirs: ../mkinstalldirs
$(srcdir)/../mkinstalldirs $(includedir) $(bindir) $(libdir)/ivl $(srcdir)/../mkinstalldirs $(includedir) $(bindir) $(libdir)/ivl
uninstall: uninstall:
rm -f $(libdir)/ivl/null.tgt rm -f $(libdir)/ivl/null.tgt
rm -f $(libdir)/ivl/null.conf
rm -f $(libdir)/ivl/null-s.conf
-include $(patsubst %.o, dep/%.d, $O) -include $(patsubst %.o, dep/%.d, $O)

3
tgt-null/null-s.conf Normal file
View File

@ -0,0 +1,3 @@
functor:synth2
functor:synth
functor:syn-rules

1
tgt-null/null.conf Normal file
View File

@ -0,0 +1 @@
-tdll

View File

@ -3,3 +3,4 @@ functor:synth
functor:syn-rules functor:syn-rules
functor:cprop functor:cprop
functor:nodangle functor:nodangle
-t:dll

View File

@ -1,2 +1,3 @@
functor:cprop functor:cprop
functor:nodangle functor:nodangle
-t:dll

6
xnf-s.conf Normal file
View File

@ -0,0 +1,6 @@
functor:synth
functor:syn-rules
functor:xnfio
functor:cprop
functor:nodangle
-t:xnf

6
xnf.conf Normal file
View File

@ -0,0 +1,6 @@
functor:synth
functor:syn-rules
functor:xnfio
functor:cprop
functor:nodangle
-t:xnf