Commit Graph

104 Commits

Author SHA1 Message Date
Stephen Williams 8cf1fd1820 Introduce shell of vhdlpp program.
Create the makefiles and configuration scripts to hold together
the vhdlpp front-end program. Create a shell main.
2011-01-18 17:03:51 -08:00
Cary R 4fae068227 Add a configure check for -Wextra vs -W
This patch adds a configure check to see if gcc supports -Wextra.
If it does then we use it instead of -W since -Wextra is a more
descriptive name.
2010-11-02 11:05:17 -07:00
Cary R a4a7b0a09d Make ivl_alloc.h the last include so it doesn't effect any system includes.
In ivl_alloc.h we redefine malloc(), realloc() and calloc() to have
standard error checking. We don't want to do this for anything that
comes from the standard headers. This specifically doesn't work if
a C++ header files does std::malloc, etc.

Also change to -W instead of -Wextra since that is more portable. I
plan to add a check from -Wextra and use it when available since it
is more descriptive.
2010-11-02 10:51:57 -07:00
Cary R b0269fa926 Add -Wextra for C++ compiling in the vpi and vvp directory.
This patch adds -Wextra to the compilation flags for C++ files in
the vvp and vpi subdirectories. It also fixes all the problems
found while adding -Wextra. This mostly entailed removing some of
the unused arguments, removing the name for others and using the
correct number of initializers.
2010-10-14 19:18:18 -07:00
Cary R 1993bf6f69 Remove malloc.h support and for C++ files use <c...> include files.
The functions (malloc, free, etc.) that used to be provided in
malloc.h are now provided in cstdlib for C++ files and stdlib.h for
C files. Since we require a C99 compliant compiler it makes sense
that malloc.h is no longer needed.

This patch also modifies all the C++ files to use the <c...>
version of the standard C header files (e.g. <cstdlib> vs
<stdlib.h>). Some of the files used the C++ version and others did
not. There are still a few other header changes that could be done,
but this takes care of much of it.
2010-06-01 08:56:30 -07:00
Cary R adfbd796b9 Check that the C and C++ compilers match.
Since we have not tested and some of the flags are not configured to
support mixed compiler compilation do not allow it for now.
2010-05-19 07:49:23 -07:00
Cary R 1c0408d9b9 More configuration updates for OpenSolaris
This patch updates the shared and PICFLAGS to support the Sun compiler.
It also reorganizes how the dependency and warning flags are set.
2010-05-17 20:53:28 -07:00
Cary R 80bf64fc27 Use -xMMD instead of -xMD on OpenSolaris.
Using -xMD generates dependencies for all files including the
system files. This could point to some system .cc files and
was causing GNU make to try to build these files if the
dependency files existed. Using -xMMD generates only the
dependencies outside the system directories.

It's possible that the OpenSolaris make knows how to deal with
this correctly, but Icarus needs GNU make.
2010-05-13 19:14:38 -07:00
Cary R 128f3d29cc Fix new shadow issues and add -Wshadow to gcc compile.
Some new shadow issues have crept in. This patch fixes these new
issues and adds -Wshadow to the normal warning flags to keep any
new occurrences from happening.
2010-05-13 19:04:13 -07:00
Cary R 2aa627d89f Update all Makefile.in files to support OpenSolaris
This patch updates all the Makefile.in files and configure.in
as follows:

Do not use the -Wall warning flag when using the SunPro compiler.

The SunPro compiler uses -xMD instead of -MD.

There are still more fixes needed before Icarus will compile
on OpenSolaris.
2010-05-13 18:54:09 -07:00
Cary R 96dab230f6 Start adding vlog95 (1364-1995) back end.
This is the initial commit in an effort to build a 1364-1995
back end for Icarus Verilog. It is expected that this back end
will allow the user to write 1364-2005 RTL and then using this
back end (converter) generate functionally equivalent 1364-1995
compatible code. This can be used to support older tools in a
work flow. The primary focus will be simulation equivalence,
though I expect to verify logical equivalence as well.
2010-03-25 12:31:51 -07:00
Stephen Williams 06270cdd2b Basic work queue thread for lxt2 output. 2010-01-08 20:20:26 -08:00
Cary R a1e2bfc93c Having lround() does not mean llround() is available.
We need to check for both lround() and llround() for at
least Cygwin.
2009-12-24 20:47:19 -05:00
Cary R b6f7354cee Update lxt/lxt2 files to latest from GTKWave.
This patch updated the four file lxt_write.{c,h} and
lxt2_write.{c,h} to the latest ones from GTKWave. This
required adding the wavealloc.h include file and an
update to configure.in and vpi/vpi_config.h.in to add
checks/definitions for ALLOCA and FSEEKO.
2009-12-02 17:21:19 -08:00
Cary R ff39575dc0 We must have autoconf version 2.60 or later.
When AC_PROG_CC_C99 was added recently we created an implicit
requirement for autoconf version 2.60. This patch makes that
implicit requirement and explicit requirement.
2009-10-08 17:00:00 -07:00
Cary R 39f243b18e Add a configure check to see if uint64_t and unsigned long are identical.
This is needed to get vvp to compile under MacOS 10.6 and possibly other
64 bit systems that define uint64_t as unsigned long long vs unsigned
long (both are 64 bits).
2009-10-08 11:50:05 -07:00
Cary R ed7e9f8be5 Check if the compiler supports C99 and better check for some math functions.
Add a configuration check that says we would like to use C99 if the
compiler supports it. Also change the lround(), nan(), fmin() and
fmax() checks to look in the default libraries as well as the math
library.

Update the iverilog-vpi sh script to correctly quote CC since it
may now have two words (gcc -std=gnu99).

Add a missing int for main in draw_tt.c.
2009-10-01 11:51:52 -07:00
Cary R 86c22dec4f Use AC_HELP_STRING instead of AS_HELP_STRING.
The later causes a warning under MinGW. The former appears
to work everywhere.
2009-03-26 19:34:50 -07:00
Cary R 72c2e3f0ac Use a single = in configure.in test
The ability to use == is an extension so use the more common =.
(cherry picked from commit 327e8d0ec0)
2009-03-26 14:04:50 -07:00
Stephen Williams ff450cdcb8 Slightly more portable version of configure test.
(cherry picked from commit 90f37fe3cb)
2009-03-24 07:59:05 -07:00
Stephen Williams 2d6105a3f2 At configure time, make sure prefix, exec_prefix and libdir are OK.
Icarus Verilog internally is not white-space clean. We need to make
sure the configured paths that cause the most trouble are clean and
usable. It is still possible to mess things up downstream, but at least
this should help.
2009-02-24 09:10:10 -08:00
Cary R 7b1905b997 Add memory freeing and pool management for valgrind.
This patch adds code to free most of the memory when vvp
finishes. It also adds valgrind hooks to manage the various
memory pools. The functionality is enabled by passing
--with-valgrind to configure. It requires that the
valgrind/memcheck.h header from a recent version of
valgrind be available. It check for the existence of this
file, but not that it is new enough (version 3.1.3 is known
to not work and version 3.4.0 is known to work).

You can still use valgrind when this option is not given,
but you will have memory that is not released and the
memory pools show as a single block.

With this vvp is 100% clean for many of the tests in the
test suite. There are still a few things that need to be
cleaned up, but it should be much easier to find any real
leaks now.

Enabling this causes a negligible increase in run time and
memory. The memory could be a problem for very large
simulations. The increase in run time is only noticeable on
very short simulations where it should not matter.
2009-02-01 06:55:28 -08:00
Stephen Williams 6b45f8899e Flatten the tree of configure scripts.
Collapse all the configure checks to a single configure script in
the root of the source tree. This makes the configure process run
a lot faster, expecially on Windows systems that are slower in general.
2008-12-13 21:42:55 -08:00
Cary R 7796a839aa Rewrite the check for windows and MinGW.
It is recommended that AC_CYGWIN not be used and under MinGW
the previous test was complaining about multiple calls to
AC_CANONICAL_HOST. The new test performs the same function
and also displays the MinGW status if we are compiling on
windows.

Also removed a AX_CCP_IDENT call in the vpi directory and
tgt-null is built by the top configure so there is no need
to try to run configure in that directory.
2008-12-12 21:10:50 -08:00
Stephen Williams 27f4ba2e38 Remove the unused CVS ident support in the configure scripts. 2008-11-19 21:07:34 -08:00
Stephen Williams 4bc90f7cfd Create support for the --enable-suffix configuration option.
This configure option causes the installed commands to have
a suffix string that makes them distinct from other versions
that also have a suffix string. This allows for multiple
installed versions of Icarus Verilog.

Also, move installed C/C++ header files into a subdirectory of
their own under the target include directory, to make clearer
the purpose and source of those files.
2008-11-17 07:22:46 -08:00
Nick Gasson eda1df5df2 Avoid processing tgt-vhdl/Makefile.in twice
It's processed once by AC_OUTPUT in configure.in and then again
by AC_OUTPUT in tgt-vhdl/configure.in. This is a bug from when I
first started on the VHDL target, and was basing it on the tgt-vvp
code. The call to configure in the tgt-vhdl directory is not
actually necessary either, since it doesn't do any checks not
performed elsewhere, so that should proably be removed later.
2008-09-13 14:57:33 -07:00
Nick Gasson bfa2bfc8ae Makefile and autoconf changes to build VHDL code generator 2008-05-28 17:17:39 +01:00
Cary R b26bdd3c19 MinGW fixes (development)
The MinGW system() implementation appears to return the straight
return value instead of the waitpid() like result that more
normal systems return. Because of this just return the system()
result without processing for MinGW compilations.

Older version of the MinGW runtime (pre 3.14) just used the
underlying vsnprintf(). Which has some problems. The 3.14 version
has some nice improvements, but it has a sever bug when processing
"%*.*f", -1, -1, <some_real_value>.  Because of this we need to use
the underlying version without the enhancements for now.

snprintf prints %p differently than the other printf routines
so use _snprintf to get consistent results.

Only build the PDF files if both man and ps2pdf exist.

MinGW does not know about the z modifier for %d, %u, etc.

Add some missing Makefile check targets.
2008-05-22 20:24:21 -07:00
Stephen Williams b297a0a9fe Remove support for vvp32 build
Remove configure and Makefile support for the vvp32 build. Remove
also the libdir64 support.
2008-01-25 17:33:32 -08:00
Cary R 3543c0605c Disable lxt support if libbzip2 is not found.
Configure was checking for libbzip2, but it was not doing anything with
the result. This patch disables lxt support if libbzip2 is not found.
2007-10-18 21:17:50 -07:00
steve 67b1eee7ce Better configuration messages (Alan Feldstein) 2007-05-16 23:59:12 +00:00
steve 6804732b9e Spelling fixes (larry doolittle) 2007-02-26 19:49:48 +00:00
steve d3f89e0d4f Clean up makefiles to remove unsupported targets. 2006-02-15 18:42:42 +00:00
steve a8d49921ee gcc4 compile errors. 2005-07-14 23:34:18 +00:00
steve e4ae832153 Clean up spurious trailing white space. 2004-10-04 01:10:51 +00:00
steve e827f8f8c1 Cleanup and factoring of autoconf. 2004-09-27 22:34:10 +00:00
steve b108167441 rdynamic for openbsd. 2004-06-13 16:27:17 +00:00
steve 2003c5a21e Fix build order of vvp and vpi. 2004-06-09 22:13:43 +00:00
steve dd7472d125 Mingw needs -liberty, but Cygwin cannot tolerate it. 2004-03-11 06:06:59 +00:00
steve a0ed5e9e29 Separate out the lookup_sys_func table, for eventual
support for function type tables.

 Remove ipal compile flags.
2004-03-09 04:29:42 +00:00
steve 914746f6f3 Minor spelling fixes. 2004-03-08 02:33:49 +00:00
steve 081a6a4088 Cleanup configure detection of win32. 2004-02-15 03:17:36 +00:00
steve 4987970af4 Give the vip directory its own configure and vpi_config.h 2004-01-21 01:22:51 +00:00
steve 36785997cb Improve the gperf warning message. 2004-01-18 23:34:00 +00:00
steve ed831e7c32 Move come configure tests to aclocal.m4 2003-11-08 19:27:50 +00:00
steve bb8785962f Support 32bit compile on AMD64 systems. 2003-10-13 20:57:34 +00:00
steve 8cf7b62933 Support both 32bit and 64bit system.vpi on AMD64. 2003-10-08 23:17:39 +00:00
steve 52b756a6fa Configure control for the vpi subdirectory. 2003-10-02 21:30:40 +00:00
steve 01d22e2005 Put libraries in libdir64. 2003-10-02 19:33:44 +00:00