Commit Graph

128 Commits

Author SHA1 Message Date
Martin Whitaker 3a70a84e68 Don't use libhistory if libreadline includes the history functions. 2020-08-06 23:58:45 +01:00
Martin Whitaker a5b3c0483a Set default nm tool if $NM is not defined. 2020-08-06 23:49:45 +01:00
Martin Whitaker 7fa781d5f3 Re-enable disabled compiler warnings for Windows builds. 2019-08-03 12:41:38 +01:00
Udi Finkelstein 7cf279b8a5 Turn off warnings caused by gcc 6.2.0 as installed by the MSYS2 mingw32
package. This probably affects all gcc 5.x installs as well.
2017-01-02 22:46:07 +02:00
Udi Finkelstein f48b0e3434 Allows compiling for Windows (32 or 64 bits) under Linux. 2016-12-11 03:40:35 +02:00
Cary R 4b9b0b7125 GTKWave (fstapi.c) needs realpath() so check for it 2015-12-19 09:11:48 -08:00
Martin Whitaker cfbc90812b Enable use of MinGW ANSI stdio routines.
Defining __USE_MINGW_ANSI_STDIO=1 provides C99 compatible printf
and scanf routines, which avoids the need for workarounds for the
various failings of the Microsoft C runtime library.
2015-05-10 11:45:42 +01:00
Martin Whitaker 6a3edc63d5 Fix printf format for size_t values when using 64-bit MinGW.
The Microsoft C runtime does not support the %zu and %zd formats.
Previously these were replaced with %u and %d, but for 64-bit we
need to use %llu and %lld.
2015-05-08 20:20:14 +01:00
Larry Doolittle 3c38b2972d Add -Wstrict-prototypes to CFLAGS
... and patch vpi/sys_lxt.c so no new warnings are triggered.
2015-02-25 17:52:44 -08:00
Stephen Williams cdb1ea6264 Don't bother with cpp-precomp flag on OS/X. 2014-08-01 11:18:51 -07:00
Cary R df1d0a7b47 Enable signed compare warning in the C code since it is now clean. 2014-07-31 12:26:15 -07:00
Cary R 58ec35a6af All the unused warnings are fixed so stop blocking that warning 2014-07-10 19:12:07 -07:00
Cary R 9d99a64bf0 Remove warnings and -Wno-type-limits option since it is not always supported. 2014-07-09 11:04:43 -07:00
Larry Doolittle e221a8ced9 Rearrange compiler warning flags
Before this patch, WARNING_FLAGS applied to both C and C++,
and WARNING_FLAGS_CXX applied to C++ only.
This patch adds a WARNING_FLAGS_CC that applies to C only.
That change should be generally useful; in particular the C
code is almost ready for -Wstrict-prototypes, which does not
apply to C++.

-Wextra (or -W) used to only apply to C++ via WARNING_FLAGS_CXX.
This patch moves it to WARNING_FLAGS, to apply to both C and C++.
Unfortunately, that triggers a ton of warnings.

For now, cover most of the new warnings up by adding
-Wno-unused -Wno-sign-compare -Wno-type-limits
to WARNING_FLAGS_CC.  In the long run, I want to change the C coding
style, and take off these disable-warning flags.  But those changes
can dribble in as separate commits; this patch is big enough already.

Actually fix a couple missing-field-initializers in libveriuser/veriusertfs.c.
2014-07-09 09:04:17 -07:00
Cary R 54f4c1147b C99 is now required for C files. 2014-06-17 12:59:57 -07:00
Stephen Williams 959ac3229e Start a sizer backend. 2014-02-08 10:16:11 -08:00
Stephen Williams d2034a6458 Initial BLIF code generator.
Add the -tblif code generator target, and include some basic
useful behavior.
2013-08-01 17:28:03 -07:00
Cary R 83fff3adf7 Remove more CVS stuff
Remove the CVS information in the documentation and the remaining
tgt-* directories.
2012-08-16 15:15:26 -07:00
Cary R 4313fbbf1f Fix space errors in various files 2012-08-16 11:13:32 -07:00
Andrew Stevens 9b3d20239a Extend VPI and build to for SIMetrix cosimulation
Added: basic vpiPort VPI Objects for vpiModulkes
    vpiDirection, vpiPortIndex,   vpiName, vpiSize attributes

   Since ports do not exist as net-like entities (nets either side
   module instance boundaries are in effect connect directly in
   the language front-ends internal representation) the port information
   is effectively just meta-data passed through t-dll  interface and
   output as a additional annotation of module scopes in vvp.

Added: vpiLocalParam attribute for vpiParameter VPI objects

Added: support build for 32-bit target on 64-bit host (--with-m32
   option to configure.in and minor tweaks to Makefiles and systemc-vpi).
2012-06-07 08:00:02 -07:00
Stephen Williams cd76a504ac Merge branch 'master' of github.com:steveicarus/iverilog 2011-12-24 10:31:49 -05:00
Stephen Williams 9075326bb7 Introduce PCB code generator. 2011-12-20 14:16:54 -06:00
Cary R 76c835a00e Update configure and Makefiles for cross compiling.
There are still a couple issues with cross compiling, but this patch
addresses most of the issues.
2011-12-15 19:03:48 -08:00
Martin Whitaker b6cb065404 Workaround for MinGW non-standard strtod.
MinGW has reverted to using the Microsoft msvcrt0 implementation
of the strtod() function. This implementation doesn't accept "INF"
"NaN". MinGW does provide a C99 compliant implementation of this
function called __strtod(). We need to force the linker to replace
all references to strtod() with references to __strtod().
2011-10-26 18:42:42 -07:00
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