Commit Graph

3199 Commits

Author SHA1 Message Date
Cary R 3dd2c74ebe V0.8: For scheduled put values save the string and free it after the put.
Users expect that vpi_put_value() will keep a copy of the string
that is passed to it. This patch implements this buy copying the
string and then freeing it after the actual put_value call.
2008-11-20 09:31:52 -08:00
Cary R d260052940 Fix MinGW suffix configuration.
In the driver-vpi file we need to use g for the suffix replacement
so that both libraries get changed.

Also added an end line to the config.h.in file.
2008-11-20 07:35:30 -08:00
Stephen Williams 146f64992c 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.

(cherry picked from commit 4bc90f7cfd)
2008-11-19 22:39:10 -08:00
Cary R 74e2343e52 V0.8: fix shifting of 0 or signed constant.
This patch matches the one from development. If just returns the
L-value if the shift is a NOP.
2008-11-16 11:07:58 -08:00
Cary R b4b9667def Fix signed divide for words that match the machine word.
There was an error when calculating the negative of a value that
was the same width as the native machine word. This patch is similar
to what was done in 0.9 to fix the problem there.
2008-11-16 11:05:04 -08:00
Cary R 5e401055e8 V0.8: do signed comparisons and fix verinum < and <=
This patch fixes the verinum < and <= operators to directly
compare the long result not the difference. Because of overflow
the difference can give an incorrect value. Using a long value
is technically wrong, but that will need to be a different
patch. It also fixes the eval_leeq_() routine to correctly build
the largest value in a signed comparison.
2008-08-23 09:30:37 -07:00
Cary R e89bce48ed Error message for missing system tasks/functions.
This patch adds an error message for the standard system
tasks and functions that are not currently implemented.
2008-08-23 09:23:49 -07:00
Cary R cf01d1a75f V0.8: Remork previous patch to use the correct method 2008-06-25 15:38:20 -07:00
Cary R 6df10a082b V0.8: fix memory leak in recent patch. 2008-06-25 12:52:04 -07:00
Cary R 22ad8c42bc V0.8: Copy file and line info during a macro expansion.
The file and line number information needs to be copied when
doing a macro expansion. This prevents a macro that expands to
an `ifdef of other construct that needs to push the stack
from core dumping because the file is NULL.
2008-06-25 11:26:02 -07:00
Cary R f418bea775 MinGW fixes (system return and vsnprintf)
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.
2008-05-22 20:20:29 -07:00
Stephen Williams 568e601212 Do not use "synthesize" to elaborate nets if not necessary.
The synthesize was causing memories to be exploded, whis was then causing
memory word addresses to turn into bit index statements, causing bugs.
So don't synthesize if we are not actually synthesizing.
2008-05-22 09:37:19 -07:00
Cary R b7e7d3cb04 User tasks have empty nex_output().
This patch matches what is done in the development branch and
fixes the reported bug.
2008-05-13 11:09:12 -07:00
Cary R 8a1543aaaf V0.8: pad user function port in synthesize().
This patch removes the assert in synthesize() for user functions and
replaces it with a pad to width.
2008-02-25 16:07:29 -08:00
Cary R c6ba9269bc Fix some problems in driver-vpi/main.c
Fixed a few problems in driver-vpi/main.c that were preventing
the Verilog-A math library from compiling.
2008-02-25 16:02:40 -08:00
Michael Witten 3af373667a [PATCH] Removed #include asm/page.h on GNU/Linux
vvp/main.cc was including asm/page.h on GNU/Linux
systems, though that file does not often exist and
is not necessary.

Signed-off-by: Michael Witten <mfwitten@mit.edu>
2008-02-04 13:20:57 -08:00
Stephen Williams d49e44594b Fix reported build errors with gcc 4.3
Add missing includes to cstring et al.
2008-01-21 18:04:30 -08:00
Cary R 4d3f592b5f V0.8 add check target to {tgt-*,vpi}/Makefile.in
Add missing Makefile check targets to the tgt-* and vpi directories.
2008-01-16 11:07:47 -08:00
Cary R d1e82d3d12 V0.8: ignore edge-control specifiers
Update the specify code in V0.8 to ignore edge-control specifiers.
2008-01-15 15:57:40 -08:00
Cary R d70ccb6895 V0.8: update driver-vpi/* to match iverilog-vpi.sh
This patch updates the MinGW C version of iverilog-vpi to match the
shell version. This allows the vpi tests in the test suite to be run.
2008-01-09 08:10:39 -08:00
Cary R e34647f79c V0.8: Add vvp flag that allows $stop to act like $finish.
This patch adds a new flag to vvp "-n" that can be used to make
$stop and hence <Control-C> act like $finish. This may be desired
when using vvp in a non-interactive environment.
2008-01-09 08:08:19 -08:00
Cary R 24b097ce89 V0.8 fix for shift/reduce warning
This patch fixes the oversight in the previous patch and eliminated
the shift/reduce warning. Apply it after the previous one.
2007-12-31 17:52:27 -08:00
Cary R 83ee7e7988 V0.8: allow NULL ports in task calls.
This is a direct back port from development that allows tasks to
be called with no ports. This fixes one failure in the test suite.
2007-12-31 17:52:09 -08:00
Cary R f33d477166 V0.8: allow vthr_vector to be converted to real.
This is a direct back port from development that allows vthread
vectors to be converted to real values. This is the first step
in fixing two more failures in the test suite.
2007-12-29 15:02:11 -08:00
Cary R 3f16d3402a V0.8: add `elsif add some conditional directive syntax checks.
This is a direct back port from the development branch. It adds
the `elsif directive and adds check that the conditional
directives are used correctly.
2007-12-29 14:54:29 -08:00
Cary R 304a63d8e3 Fix protect/endprotect
This patch makes stable match the development branch. `protect/`endprotect
are not required to be on their own line.
2007-12-29 14:49:13 -08:00
Cary R 23d56d8198 V0.8: fix a few more specify block problems.
This patch fixes a few more specify block problems in the stable
branch.
2007-12-29 14:44:13 -08:00
Cary R a8f68fe416 V0.8: ignore ifnone in specify block
In specify blocks ignore the ifnone command.
2007-12-29 14:37:48 -08:00
Cary R 5dc4202929 V0.8: Back port development patch for pr1716276
This is a straight back port of the development patch for the
problem reported in pr1716276. This was causing the test case
to core dump under stable.
2007-12-29 14:29:27 -08:00
Cary R 281b4edbab v0.8: Do not run the first time step if the compilation failed.
This patch fixes another minor problem introduced by the process
end of simulation events. Specifically if the compilation has
indicated we should not run do not even start the main event loop.
2007-12-10 16:26:06 -08:00
Cary R 3eb86a2376 Process end of simulation events.
This is copied from the development branch. It allows the processing
of events that happen at the simulation finish time.
2007-12-06 18:54:15 -08:00
Cary R 1fb93c0565 Fix call back free problem.
This is copied from the development branch. The issue is that calling
vpi_free_object should not really free a call back handle since it is
the real call back object and doing so will invalidate it. This will
likely end with a core dump.
2007-12-06 18:50:31 -08:00
Holger Waechtler bdb900b25f Fix compile error on some gcc versions 2007-12-03 14:27:53 -08:00
Cary R 28da79dcc3 V0.8: Add the enhancements in iverilog-vpi from devel
Back port all the enhancements to iverilog-vpi made in the
development branch to the stable branch.
2007-11-29 18:05:06 -08:00
Cary R bbd61823b9 Update vpi/etc. files to correctly use PLI_INT32
This patch fixes the various PLI code that was incorrectly
using int for PLI_INT32 for functions that are used with the
vpi_systf_data and cd_data data structures.
2007-11-29 18:01:51 -08:00
Stephen Williams 0f716d6dca Prepare for 0.8.6 release. 2007-11-26 10:55:13 -08:00
Cary R a44236f8cb v0_8: A leading underscore is valid for macro substitutions.
For text macro substitutions the lexor did not allow leading underscores.
This patch fixes that omission. All other places that text macros may be
used appear to be correct.
2007-11-16 15:48:25 -08:00
Cary R 4be2ccb3fa Add error message for pr1489570.
This patch does not add the functionality needed to fix pr1489570, but
it does give an error message that is a bit more descriptive of the
current limitation (cannot do division or modulus with wide value).
2007-11-14 13:52:19 -08:00
Cary R 9f4dc5411f v0_8: make patch for pr1792108 synth aware.
This patch makes the behavior selection for pr1792108 depend on the
synth* functors.
2007-11-14 13:38:43 -08:00
Stephen Williams 545d20eba5 Error message for inconnected primitive ports.
Error message (instead of a seg fault) when a primitive port
is left unconnected.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-10-31 11:41:04 -07:00
Stephen Williams b2159d1e64 Unary minus size assertion
Fix errors with unary subtraction producing logic gates with
inconsistent widths.

Signed-off-by: Stephen Williams <steve@wing.icarus.com>
2007-10-31 11:40:45 -07:00
Stephen Williams 4c8df2a370 No system functions in continuous assignments.
Do not support (in 0.8) system functions in continuous assignments.
Make a better error message.

Signed-off-by: Stephen Williams <steve@wing.icarus.com>
2007-10-31 11:40:35 -07:00
Stephen Williams eed0885dd0 Fix comparison of two negative numbers
Pairs of negative numbers that are equal do not set
the LT flag correctly at runtime.
2007-10-31 11:39:45 -07:00
Cary R 0fc10d0262 v0_8: fix @* to correctly handle non-input nets.
This is a slightly modified version of the patch from the development
branch. Specifically it only allows outputs in the sensitivity list for
non-synthesis back ends. The text from the development patch follows.

@* was only expanding to input nets. nex_input() for blocks was removing
any output net that was also an input. There was also a bug in how output
nets were removed. Only outputs currently defined were removed from the
input list.

always @(*) begin
  y = a;
  z = y;
end

would report "a" as an input. While

always @(*) begin
  z = y;
  y = a;
end

would report both "a" and "y" as inputs.

To fix this all nex_inputs now take a flag that when true (the default)
correctly removes any output from the input list. Both the above cases
will now return "a". If the flag is false outputs which are also inputs
will be included in the input list. This is what the @* elaboration code
uses to get the correct sensitivity list.
2007-10-30 17:49:35 -07:00
Cary R 1775c78aa9 v0_8: clear expression look aside for transient thread.
This is a back port of code from the development branch. The problem is
that for named blocks (which create a transient thread) the look aside
was not being cleared for the new thread. This resulted in an invalid
variable reference optimization.
2007-10-30 17:33:06 -07:00
Cary R 85652e24e0 v0_8: explicitly state the V0.8 cannot evaluate constant real expressions.
V0.8 does not have the code to evaluate constant real expressions. This
patch adds a line to the normal error message that says this explicitly.
2007-10-29 16:28:36 -07:00
Cary R eb4fc8fb7b Warn that bit based signals cannot be converted to real.
V0.8 does not have the code to covert bit based signals to a real value,
so print a more descriptive error message before quiting.
2007-10-29 16:24:55 -07:00
Cary R 043b7ae684 v0_8: warn about unused variable in for loop.
This patch back ports from the development branch a warning when
an undefined variable is used in a for loop.
2007-10-29 16:20:58 -07:00
Cary R 2946f30ffc v0_8: fix comparison in previous patch for pr1745132
If I had remembered to test the passing case I would have noticed
the comparison was wrong.
2007-10-29 16:15:07 -07:00
Cary R 5530aea6a3 v0_8: print an error message for an invalid bit selection.
This code may be used for more than just a bit select so the error message
is fairly generic. Though it should help in tracking down the real problem
(invalid Verilog code).
2007-10-29 16:14:49 -07:00