Commit Graph

3851 Commits

Author SHA1 Message Date
Cary R e18b64768e Add missing check target in some Makefile.in files.
This patch adds a check target to the Makefile.in files in the
tgt-null, tgt-stub and vpi directories.
2008-01-11 21:52:51 -08:00
Cary R 7157a68d08 Edge-control does not require conditional event
This patch allows the edge control to be used without a
conditional event.
2008-01-11 14:24:52 -08:00
Larry Doolittle e03fd9e6f2 fix leftover signed/unsigned comparisons
triggers warnings in gcc-3.3.5 and gcc-3.4.6 vintage compilers
2008-01-11 14:16:21 -08:00
Stephen Williams 731f1df70b Hook up input port part select properly.
The input part select that is used to match a module port to a short
vector connected to it was wired incorrectly.
2008-01-10 20:47:06 -08:00
Stephen Williams 9d0cdc8ae9 Hook up output port part select properly.
The output part select that is used to match a module port to a long
vector connected to it was wired incorrectly.
2008-01-10 18:20:21 -08:00
Stephen Williams f944d31353 Improved assertion on signal arrays.
Use ivl_expr_file() information to improve a signal assert message.
2008-01-09 14:24:30 -08:00
Stephen Williams 6cc8d0e536 Merge branch 'master' of ssh://steve-icarus@icarus.com/home/u/icarus/steve/git/verilog 2008-01-09 11:03:40 -08:00
Stephen Williams 3b89c1767c Merge branch 'pr1864110' 2008-01-08 18:56:12 -08:00
Stephen Williams 1f7957c612 Fix type handling of real-value system functions in nets
In nets, if system functions return a real value the function lookup
was getting the correct width, but was also setting the width to 0,
which confused down-stream net handling. Real-value system fuctions
have a width of 1. (1 real-valued scalar.)
2008-01-08 18:54:55 -08:00
Larry Doolittle eb5e7b792b Spelling fixes
Sorry, I can't help myself.  :-p
2008-01-08 17:26:55 -08:00
Stephen Williams 1db3c75ce6 Merge branch 'master' of ssh://steve-icarus@icarus.com/home/u/icarus/steve/git/verilog 2008-01-08 17:16:38 -08:00
Cary R c9e1e1b5cc Add missing include to sdf_lexor.lex
sdf_lexor.lex was missing the <string.h> include file which defines
strdup and strlen.
2008-01-07 19:07:11 -08:00
Cary R 61b6b8358d Speed up the conversion functions and add file/line info.
This patch modifies the conversion functions $rtoi, $itor,
$realtobits and $bitstoreal calltf routines to be more efficient.
This is done by caching the vpiHandle to the argument in the userdata
pointer. This eliminated the need to get the argument iterator, scan
and free the iterator.

It also updates the error messages to use the new file and line
number information that is available for system functions. It also
adds a check that verifies the functions are only called with one
argument and makes the errors fatal.
2008-01-07 18:59:52 -08:00
Cary R 4263f29044 Schedule sfunc invocations to avoid recursion and clean up.
This patch schedules the input value change to .sfuns calls to avoid
potential recursion problems. It also cleans up two put_value calls
that did unneeded loops when putting VectorVals and the width was
greaten than 32 bits.
2008-01-07 18:51:27 -08:00
Larry Doolittle d85683965d fix buggy SDF error message 2008-01-07 18:48:40 -08:00
Larry Doolittle f8d410e2d4 remove lint flagged by gcc-4.3
watch for possible behavior changes in
 elaborate.cc:3409
 vvp/vvp_net.cc:600
2008-01-07 18:39:10 -08:00
Cary R a16f5bc709 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-07 18:36:48 -08:00
Cary R d95c77a58a 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-07 18:23:18 -08:00
Stephen Williams ca50991eeb Merge branch 'master' of ssh://steve-icarus@icarus.com/home/u/icarus/steve/git/verilog 2008-01-07 16:26:17 -08:00
Stephen Williams 36bbf6ef5a Handle real-valued unary in general
Handle the unary minus with general sub-expressions.
2008-01-06 20:54:33 -08:00
Stephen Williams 9d55597b26 Elaborate net of real-value constant
Handle the special case of a unary minus net with the operand
that is a real-valued constant.
2008-01-06 19:59:31 -08:00
Stephen Williams bafd705478 Allow negative values for realtime net constants.
The lexor didn't allow for negative values for realtime net
constants. The minus sign was not accepted as a character in
the identifier string.
2008-01-06 18:57:16 -08:00
Larry Doolittle 8ea3b6b0b8 header includes for gcc-4.3 compatibility
minimal changes required to build without error
tested with gcc-4.3 (Debian 4.3-20071130-1) 4.3.0 20071130 (experimental)
2008-01-04 16:14:44 -08:00
Larry Doolittle e6ea5cd409 More lint removal
tgt-vvp/eval_expr.c  uninitialized variables
vpi/sys_display.c  uninitialized variables
vvp/vpi_priv.cc  deprecated string constant usage
vvp/vpi_vthr_vector.cc  deprecated string constant usage

the last entry invokes vpip_name_string() and uses const char *
in the same way as the other 9 callers in vvp/*.cc, the only
difference is that the argument is static instead of computed.
2008-01-04 16:12:33 -08:00
Larry Doolittle 6c5773c0e3 Synchronize lxt_write.c and lxt2_write.c with Tony Bybell
cvs -z3 -d:pserver:anonymous@gtkwave.cvs.sourceforge.net:/cvsroot/gtkwave co -P gtkwave3
delete CVS logs embedded in files
had to add #define wave_alloca alloca to lxt2_write.h

differences remain relative to upstream .h files:
 whitespace
 value chosen for LXT*_WR_SYMPRIME

Regarding the latter, Tony writes "Don't worry about the .h file.
The only difference is a considerably larger initial hash size.
If this isn't a problem with Icarus now, it certainly doesn't
need to be bumped up."
2008-01-04 16:04:18 -08:00
Larry Doolittle 25ad1c174a Clean up compiler warnings
stupid changes to shut up the compiler
tested with gcc-4.2.2
2008-01-04 15:57:09 -08:00
Larry Doolittle 17cc661336 Squelch useless flex-induced warning messages
tested in a gcc-4.2.2 flex-2.5.33 environment
2008-01-04 15:54:03 -08:00
Cary R e01e7b1280 Add arith/mult.r and arith/sum.r
This patch adds the missing real multiplication and summation operators
and the code to generate them when needed.
2008-01-04 15:41:01 -08:00
Stephen Williams 4100ff71ef Data type handling of module ports.
Fix data type handling of module ports. When ports are declared
as ports and given data types in different statements, the parser
incorrectly (and silently) dropped the intended data type for the
default LOGIC type.
2008-01-03 20:13:56 -08:00
Larry Doolittle 59b2d23c64 chip away at compile-time warnings
1 x format string (real bug)
2 x uninitialized variable (potential bugs),
1 x parentheses around assignment used as truth value (shut up compiler)
2008-01-03 14:44:48 -08:00
Cary R 21730ab228 Fix definition missing in include file and missing UINT64_FMT.
This fixes the missing include file definitions and fixes three
cases that needed to us UINT64_FMT.
2008-01-03 14:14:54 -08:00
Cary R 07c6e51a58 Rework ivl_file_table_* interface and fix most vvp/examples.
Rework the ivl_file_table_* interface to be more generic and easier
to use. Also all the vvp examples except for memory.vvp have been
fixed to run correctly with the current vvp. Someone with a bit more
experience will need to fix memory.vvp.
2008-01-03 14:13:22 -08:00
Cary R c866be421e Add vpiFile and vpiLineNo to .sfunc (system function in cont. assign)
This patch add the vpiFile and vpiLineNo properties to system
functions that are called from continuous assignments.
2008-01-01 17:33:08 -08:00
Cary R 77061faa5c Add vpiFile and vpiLineNo for system functions.
Add the vpiFile and vpiLineNo properties to system functions.
Most other objects have stubs that return "N/A"/0. Interactive
functions (called from the debugger) use <interactive> for the
file name.
2008-01-01 17:27:03 -08:00
Cary R 9fd7c008f3 Create/remove default include directory.
The default include directory is created at install time and removed
if possible when uninstalling.
2008-01-01 17:16:08 -08:00
Stephen Williams 6476be462e Pass defines into library files.
Use the precompiled defines file support of the ivlpp preprocessor
to pass defines made in the main program to processed library modules.
In other words, a `define in the Verilog source will be visible to
library modules.
2007-12-30 21:26:25 -08:00
Stephen Williams a3c1fb8c8a Supoprt precompiled defines
Core preprocessor support for writing out and reading precompiled
defines. The preprocessor can read initial precompiled defines from
any number of specified source files, and can write all the defines
into a specified output file.
2007-12-30 18:47:32 -08:00
Cary R ef1739dbec Add better error reporting for port declarations.
Add an error message for NULL port declarations and for a ';'
that could be left over from building a port declaration from
an old style declaration.
2007-12-29 17:55:53 -08:00
Stephen Williams fea1febf54 Generate explicit locals in the vvp target.
With this change, local symbols are not emitted in the vvp target,
but are marked as local. When thus marked, the vvp run time does not
offfer any VPI access and the signals (net or var) are effectively
invisible.
2007-12-27 18:34:12 -07:00
Stephen Williams 931d08a9fc Add local_flag syntax to .net and .var statements. 2007-12-27 17:56:32 -07:00
Stephen Williams 58d3d2f265 Better track signals marked local. 2007-12-27 16:47:01 -07:00
Stephen Williams 9235ec665b Correct bit widths and pad of certain part selects
Zero-based part selects are a special case that is handled with
optimized code. Properly handle the part select width to get the
desired padding.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-12-26 11:22:33 -05:00
Cary R 1e2d8bc55a Fix real function PLI 1 code.
The code to handle real functions using the PLI 1 interface was
missing some functionality. This patch fixes that and fixes a
bug in the veriuser.h include file.
2007-12-23 19:29:33 -05:00
Cary R 77f8d3225c Fix core dump in recent vpi_get_str code changes.
The recent changes to vpi_get_str had a minor problem that was
causing a core dump when trying to get the vpiFullName of an
arrayed signal. Basically vpi_get_str is not reentrant so the
name must be duplicated. It must also be duplicated to work with
the free in the code (do not free a result_buf).
2007-12-23 19:26:37 -05:00
Stephen Williams 8a6626dcaa Standard implicit include directory
Add support for a default, standard, implicit include directory
in the base directory for the ivl installation, where standardized
Verilog header files may be placed.
2007-12-23 19:20:45 -05:00
Stephen Williams 08752453b4 File line information for expressions
Add ivl_target support for file and line numbers of expressions.
2007-12-22 17:19:45 -05:00
Stephen Williams 1db19b8703 Make statement file lineno available to targets.
Make the Verilog file/lineno of statements available to loadable
code generators. Make sure the information is properly set for
system task calls.
2007-12-22 09:31:24 -05:00
Stephen Williams 7975e14b5c LineInfo uses perm_string for path.
Rework the handling of file names to use a perm_string heap to hold
the file names, instead of the custom file name heap in the lexor.
Also rename the get_line to get_fileline to reflect its real duties.
This latter chage touched a lot of files.
2007-12-20 12:31:01 -05:00
Stephen Williams dff59f8ad8 Merge branch 'master' of steve-icarus@icarus.com:git/verilog 2007-12-18 16:48:11 -08:00
Larry Doolittle 9772068bbc vpi_get_str improvements
Gets rid of a few warning: deprecated conversion from string
constant to 'char*', follows IEEE 1364-2001C 27.10 in more cases,
and fixes at least one real bug (look at the previous use of
strdup/strcat in real_var_get_str() and signal_get_str()).
2007-12-18 15:11:50 -08:00