diff --git a/Makefile.in b/Makefile.in index 865b1aca5..670977dfd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,7 +39,7 @@ srcdir = @srcdir@ datarootdir = @datarootdir@ SUBDIRS = ivlpp vvp vpi libveriuser cadpli tgt-null tgt-stub tgt-vvp \ - tgt-vhdl driver + tgt-vhdl tgt-vlog95 driver # Only run distclean for these directories. NOTUSED = tgt-fpga tgt-pal tgt-verilog diff --git a/configure.in b/configure.in index 58022f816..3edfa3eb2 100644 --- a/configure.in +++ b/configure.in @@ -250,4 +250,4 @@ AC_MSG_RESULT(ok) # XXX disable tgt-fpga for the moment -AC_OUTPUT(Makefile ivlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile) +AC_OUTPUT(Makefile ivlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile) diff --git a/tgt-vlog95/Makefile.in b/tgt-vlog95/Makefile.in new file mode 100644 index 000000000..0d1c443b1 --- /dev/null +++ b/tgt-vlog95/Makefile.in @@ -0,0 +1,96 @@ +# +# This source code is free software; you can redistribute it +# and/or modify it in source code form under the terms of the GNU +# Library General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., +# 59 Temple Place - Suite 330 +# Boston, MA 02111-1307, USA +# +SHELL = /bin/sh + +suffix = @install_suffix@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +srcdir = @srcdir@ + +VPATH = $(srcdir) + +bindir = @bindir@ +libdir = @libdir@ + +CC = @CC@ +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir) @CPPFLAGS@ @DEFS@ @PICFLAG@ +CFLAGS = -Wall @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +all: dep vlog95.tgt + +check: all + +dep: + mkdir dep + +%.o: %.c + $(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o + mv $*.d dep + +O = vlog95.o + +ifeq (@CYGWIN@,yes) + TGTLDFLAGS=-L.. -livl + TGTDEPLIBS=../libivl.a +else + TGTLDFLAGS= + TGTDEPLIBS= +endif + + +vlog95.tgt: $O $(TGTDEPLIBS) + $(CC) @shared@ -o $@ $O $(TGTLDFLAGS) + +clean: + rm -rf *.o dep vlog95.tgt + +distclean: clean + rm -f Makefile config.log + +Makefile: $(srcdir)/Makefile.in ../config.status + cd ..; ./config.status --file=tgt-vlog95/$@ + +install: all installdirs $(libdir)/ivl$(suffix)/vlog95.tgt $(INSTALL_DOC) $(libdir)/ivl$(suffix)/vlog95.conf $(libdir)/ivl$(suffix)/vlog95-s.conf + +$(libdir)/ivl$(suffix)/vlog95.tgt: ./vlog95.tgt + $(INSTALL_PROGRAM) ./vlog95.tgt "$(DESTDIR)$(libdir)/ivl$(suffix)/vlog95.tgt" + +$(libdir)/ivl$(suffix)/vlog95.conf: $(srcdir)/vlog95.conf + $(INSTALL_DATA) $(srcdir)/vlog95.conf "$(DESTDIR)$(libdir)/ivl$(suffix)/vlog95.conf" + +$(libdir)/ivl$(suffix)/vlog95-s.conf: $(srcdir)/vlog95-s.conf + $(INSTALL_DATA) $(srcdir)/vlog95-s.conf "$(DESTDIR)$(libdir)/ivl$(suffix)/vlog95-s.conf" + + +installdirs: $(srcdir)/../mkinstalldirs + $(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)/ivl$(suffix)" + +uninstall: + rm -f "$(DESTDIR)$(libdir)/ivl$(suffix)/vlog95.tgt" + rm -f "$(DESTDIR)$(libdir)/ivl$(suffix)/vlog95.conf" + rm -f "$(DESTDIR)$(libdir)/ivl$(suffix)/vlog95-s.conf" + + +-include $(patsubst %.o, dep/%.d, $O) diff --git a/tgt-vlog95/vlog95-s.conf b/tgt-vlog95/vlog95-s.conf new file mode 100644 index 000000000..19573a944 --- /dev/null +++ b/tgt-vlog95/vlog95-s.conf @@ -0,0 +1,4 @@ +functor:synth2 +functor:synth +functor:syn-rules +flag:DLL=vlog95.tgt diff --git a/tgt-vlog95/vlog95.c b/tgt-vlog95/vlog95.c new file mode 100644 index 000000000..a26e6f1b2 --- /dev/null +++ b/tgt-vlog95/vlog95.c @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Cary R. (cygcary@yahoo.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * + * This is the vlog95 target module. It generates a 1364-1995 compliant + * netlist from the input netlist. The generated netlist is expected to + * be simulation equivalent to the original. + */ + +# include "version_base.h" +# include "version_tag.h" +# include "config.h" +# include "ivl_target.h" +# include + +static const char*version_string = +"Icarus Verilog VLOG95 Code Generator " VERSION " (" VERSION_TAG ")\n\n" +"Copyright (C) 2010 Cary R. (cygcary@yahoo.com)\n\n" +" This program is free software; you can redistribute it and/or modify\n" +" it under the terms of the GNU General Public License as published by\n" +" the Free Software Foundation; either version 2 of the License, or\n" +" (at your option) any later version.\n\n" +" This program is distributed in the hope that it will be useful,\n" +" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +" GNU General Public License for more details.\n\n" +" You should have received a copy of the GNU General Public License along\n" +" with this program; if not, write to the Free Software Foundation, Inc.,\n" +" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n" +; + + +int target_design(ivl_design_t des) +{ + return 0; +} + + +const char* target_query(const char*key) +{ + if (strcmp(key,"version") == 0) + return version_string; + + return 0; +} diff --git a/tgt-vlog95/vlog95.conf b/tgt-vlog95/vlog95.conf new file mode 100644 index 000000000..ee96d5cb3 --- /dev/null +++ b/tgt-vlog95/vlog95.conf @@ -0,0 +1 @@ +flag:DLL=vlog95.tgt