Commit Graph

5459 Commits

Author SHA1 Message Date
Cary R 4ee4d735c3 Use WIN32 instead of CYGWIN in tgt-null
(cherry picked from commit 99eac44ad1)
2010-03-25 12:49:21 -07:00
Cary R 6da47b1eba Perform bit <-> real conversions for module inputs.
This patch makes the compiler perform either bit to real or
real to bit conversion when needed on module input signals.
(cherry picked from commit 8e69764834)
2010-03-25 12:46:14 -07:00
Cary R baa3352ef1 vpi_get_value should return an appropriate value during compiletf.
The vpi_get_value() function should not crash when called during
the compiletf phase. This patch fixes this by returning 'bx for
any vectors in thread space. It also fixes some other minor things
that my test code uncovered. Most of the other objects work as
expected.
(cherry picked from commit bc7a5a9725)
2010-03-25 12:42:39 -07:00
Cary R 059068f070 Ignore zero replication constants.
This patch enhances elaboration to drop/ignore zero replication
count constants. Not doing this was causing problems later in
the compiler. We still pass non-constant expressions since
both user and system functions must be run for their possible
side effects. Constants can never have a side effect so just
dropping them is acceptable.
(cherry picked from commit 9a94d55738)
2010-03-22 18:11:58 -07:00
Cary R 53c206f2c5 Fix space issues.
(cherry picked from commit 2a463f00b3)
2010-03-22 18:10:50 -07:00
Cary R 19858807fe Add scope information for named blocks (begin/fork).
This patch adds the appropriate scope changes to get the scope
information correct for named blocks.
(cherry picked from commit 440cbba1d6)
2010-03-22 18:07:54 -07:00
Cary R 1c03cdafaf Fix trailing garbage in previous patch .
(cherry picked from commit 9cbb9251b4)
2010-03-16 15:51:52 -07:00
Cary R e3b16d72a3 NB-assign needs to convert reals at the l-value width.
This patch mimics what was done for normal assignments to get the
width correct for nonblocking assignments when converting a real
r-value to a l-value vector.
(cherry picked from commit d5c10af4f4)
2010-03-16 15:51:38 -07:00
Cary R 86fad34813 Make taking an edge of a named event an error.
A named event does not have an edge so taking a posedge or negedge
is illegal. This patch adds an error message for this. Before the
edge was being ignored for named events, but this is incompatible
with other tools.
(cherry picked from commit 4af24b6b9e)
2010-03-16 15:48:34 -07:00
Stephen Williams 73a9880417 Fix broken $() substitution in command files.
(cherry picked from commit 8d65d0735a)
2010-03-16 15:24:26 -07:00
Cary R 5680dec04c Add missing strtoul argument
The previous patch missed this some how. I don't know how it compiled
correctly before!
(cherry picked from commit 08d0337e50)
2010-03-08 14:58:30 -08:00
Cary R d14c3449e4 Ignore bit selects in SDF INTERCONNECT lines.
Icarus does not support interconnect delays so INTERCONNECT is
currently ignored. The SDF parser does not currently support a
bit select as a port_instance. Since we are already ignoring
the INTERCONNECT I added support for bit selects there. This
is probably the most common place to find them.
2010-03-08 14:57:07 -08:00
Stephen Williams 526b114d18 Minor fixes to README.txt file.
(cherry picked from commit b48b833dab)
2010-03-05 16:03:23 -08:00
Martin Whitaker 1e09352f11 Fix for pr2943394 (v0.9 branch).
This patch fixes the behaviour when a variable or net is released
when it is not currently forced.
2010-02-10 17:23:42 -08:00
Martin Whitaker 7363e4326d Fix for LXT/LXT2 output using MinGW.
When using MinGW, routines registered via atexit() inside a
DLL are only called when the DLL is detached. If not detached
manually, DLLs are automatically detached *after* all remaining
open files are closed. This meant that by the time the LXT or
LXT2 close_dumpfile routine was called, the dump file handle
was no longer valid, so any remaining output was lost. This
patch fixes the problem by manually detaching the VPI modules.
(cherry picked from commit 4818db887e)
2010-02-10 17:21:14 -08:00
Stephen Williams 90144cfb3c Merge branch 'v0_9-branch' of ssh://steve-icarus@icarus.com/~steve-icarus/git/verilog into v0_9-branch 2010-02-03 09:00:13 -08:00
Cary R 971576589e Fix some MinGW compile warnings.
This patch fixes some compile warnings found using the latest
MinGW compiler.
2010-02-02 21:00:56 -08:00
Alan M. Feldstein 65744da19c Use appropriate makefile dependencies option for Sun Studio 12 C++ compiler. 2010-02-02 20:56:03 -08:00
Alan M. Feldstein dec724b8f3 Not all C++ compilers recognize (or need) -Wall. 2010-02-02 20:50:21 -08:00
Alan M. Feldstein 24355dae67 Not all C compilers recognize (or need) -Wall. 2010-02-02 20:49:50 -08:00
Cary R c337b0ef0c Fix an obscure memory leak and fix formatting.
This patch fixes an obscure memory leak and make the formatting
of these two routines match the rest of the code in the file.
(cherry picked from commit 7866e92761)
2010-01-25 14:56:25 -08:00
Martin Whitaker 8fc049eefd Fix for pr2922063.
When handling the $signed/$unsigned system functions, the compiler
was applying the new signed/unsigned property to the NetExpr object
representing the input argument. This caused the input argument to
be evaluated incorrectly. This patch fixes this by applying the new
property to the NetExpr object created to pad the result to the
required size.

In testing this fix, it was also discovered that the width of the
input argument expression was not being calculated correctly. This
patch also fixes this issue.
(cherry picked from commit 14b2037ce4)
2010-01-25 14:49:11 -08:00
Nick Gasson 2be20d49ed Fix build with gcc-4.5
New version of GCC does not like the X::X() construct.
(cherry picked from commit b855b0368d)
2010-01-25 14:47:04 -08:00
Cary R 03411aba85 realloc() to the correct string.
Someone had mistyped the destination of the realloc. It should
have been the original string not the input buffer.
(cherry picked from commit 6eb5f593f0)
2010-01-25 14:44:38 -08:00
Martin Whitaker 70d2f7e353 Fix for pr2929913 (v0.9 backport).
After changing an array word, vvp propagates the change to every port
attached to the array. The code did not properly handle the case of
an array port declared in an automatic scope with an associated array
declared in a static scope.
2010-01-25 14:41:54 -08:00
Cary R c03aed2b17 Fix some constant bit/part select bugs and add warnings.
This patch fixes a few bugs in constant bit/part selects and
adds optional warnings for out of bound or undefined selects.
(cherry picked from commit 5a0363ebd3)
2010-01-25 14:37:10 -08:00
Cary R 2d1b8e4c81 Add +timescale to the command file.
This patch adds a +timescale command to the command file
syntax that can be used to set the default time scale of
the simulation.
2010-01-25 14:32:59 -08:00
Cary R 9afa95dff7 A signal select is signed if the select not the signal is signed.
The padding for a signal select was using the signal to determine
if the padding should be singed or not. In reality this should be
unsigned padding unless the select was enclosed in a $signed().
(cherry picked from commit 458258d554)
2010-01-09 11:43:43 -08:00
Cary R 2718f85222 vpi_get_vlog_info should return the version information.
This patch fixes vpi_get_vlog_info to return the VERSION.
(cherry picked from commit ea4bae7c33)
2010-01-09 11:40:15 -08:00
Stephen Williams a08de693d4 Step to the 0.9.2 release.
Advance version stamps.
2009-12-30 08:45:06 -08:00
Stephen Williams 37837f3904 Fix references to version_base.h in Makefiles.
(cherry picked from commit d2dd0daa3c)
2009-12-28 09:50:34 -08:00
Cary R daa01a05d8 A constant real number is not unsized.
We can have unsized bit values, but reals always have a size.
(cherry picked from commit ebac088511)
2009-12-28 09:34:57 -08:00
Cary R 9cd7a22dbe Having lround() does not mean llround() is available.
We need to check for both lround() and llround() for at
least Cygwin.
(cherry picked from commit a1e2bfc93c)
2009-12-25 18:16:52 -05:00
Martin Whitaker f733030b41 Add warning about casting large integer values to reals.
The compiler and vvp runtime don't correctly handle casts to reals
when the source value is more than 63 bits in magnitude. This is
fixed in devel, but can't be backported to v0.9 because it adds new
vvp instructions. This patch causes the compiler to output a warning
about potentiall incorrect results.
2009-12-25 17:53:08 -05:00
Martin Whitaker 99f7d1197c Make vvp thread word storage consistently 64 bits (backport to v0.9).
The vvp thread word storage had previously been changed to always store
64-bit values, but some instructions still only operate on native long
values. This patch ensures all instructions that modify thread words
support 64-bit values.
2009-12-25 17:51:56 -05:00
Cary R 7817e479a4 V0.9 - Add suffix support for windows (both MinGW and Cygwin).
dlltool which is used by both MinGW and Cygwin to create dynamic
libraries must have the name of the executable it creates the
library/information from exactly match the installed executable
name. If we have a suffix then it must be used. This patch adds
that to the build process for vvp since it can be installed with
a suffix. It also modifies the check routines since you must run
vvp with a suffix if the library it links to was built for a
suffixed executable.
2009-12-25 11:53:36 -05:00
Cary R 0c97cabe18 Use the correct line information in crop_to_width()
This was using its own information instead of the input nets information.
2009-12-25 11:37:50 -05:00
Cary R e56c142dff Reuse the number of input information.
This was already assigned to a variable so lets use that instead of
geting it again.
2009-12-25 11:37:35 -05:00
Cary R 7e06a87b8e Properly extend/crop a user function argument in a continuous assignment.
When passing an argument to a user function in a continuous assignment
we need to sign extend the value if it is signed and too short. We need
to crop an argument if it is too long.
2009-12-25 11:37:16 -05:00
Cary R 0c3eef4c41 Function arg. expressions need to use the expr. width and arg. width.
When evaluating a function argument expression we need to use either
the expression width or the argument width which ever is larger. This
matches the way normal assignments work. We then only take the bits
needed at the end.
2009-12-25 11:33:12 -05:00
Cary R 3b22be5507 A ternary can be signed.
If the two branches of a ternary are signed then the result will
also be signed.
2009-12-25 11:28:03 -05:00
Nick Gasson 287b19f22d VHDL: fix spurious resize seen in pr2911213
Another case when ivl_scope_sig list was used instead of
ivl_scope_param.
2009-12-25 11:26:46 -05:00
Cary R 8de7fc6161 Add suffix support to MinGW.
This patch adds suffix support to the relative path that MinGW
calculates in both the iverilog and vvp executables.
2009-12-25 11:22:25 -05:00
Cary R 663ab34ae7 V0.9 Add casts/etc. in vvp directory to remove Cygwin compile warnings. 2009-12-15 07:29:06 -08:00
Cary R b5c819051b Fix out of bounds select warning text in man page.
(cherry picked from commit 8144283b0d)
2009-12-15 07:26:12 -08:00
Cary R fdbc212349 Fixe .cast documentation.
(cherry picked from commit a228d53cc2)
2009-12-15 07:24:42 -08:00
Nick Gasson d35d542b9e VHDL: ensure with-select statement choices completely cover input space
Newer versions of GHDL seem to be stricter when checking this than
older versions. ModelSim still accepts an incomplete with-select,
however.

This patch makes the output 'U' if none of the conditions match.
(cherry picked from commit 9c568d8f47)
2009-12-15 07:22:26 -08:00
Cary R 8139551908 Add CFLAGS to vvp/Makefile.in
We do have one C program in the vvp directory so add CFLAGS to
the Makefile. This patch also modifies the two local programs
tables and version to use -Wall.
(cherry picked from commit 1a25b3deda)
2009-12-12 08:36:02 -08:00
Nick Gasson 021ae6c08f VHDL: emit function parameters in correct order
The function draw_scope was extracting the input/output parameters
just by looking at the (unordered) list of signals in the function
scope rather than using the ivl_scope_ports list.
(cherry picked from commit a9c85cf5b6)
2009-12-12 08:34:47 -08:00
Cary R b8b1bc4a36 Add some casts in libveriuser to remove warnings.
The Cygwin compiler is a bit picky. This patch adds some casts
to remove compilation warnings. In the past I have had warnings
off because of problems with the STL, but for C directories
like this it makes sense to enable the warnings. It also does
not recognize that an assert(0) or assert(false) ends a routine
so it complains about no return at end of function or variables
not being defined.
(cherry picked from commit 6ae1f64c3c)
2009-12-12 08:31:31 -08:00