Commit Graph

7964 Commits

Author SHA1 Message Date
Stephen Williams a20bac6a66 support parameters declared with atom2 types. 2012-01-16 11:04:02 -08:00
Stephen Williams b3ef8171e2 Short circuit propagation of part selects when possible
Full vector assigns are able to short circuit the propagation of
the value if it finds that there are no value changes. This patch
supports that behavior in writes to parts as well. Put this change
to use in logic devices as well.
2012-01-14 11:01:54 -08:00
Stephen Williams e1c0fa5feb Merge branch 'master' of github.com:steveicarus/iverilog 2012-01-10 18:23:33 -08:00
Stephen Williams 6662a3f78a Better VPI reference to part of array word.
Create the &APV<> token in vvp that create a VPI handle for a
part of an array word. This works better with things like $monitor.
2012-01-10 18:22:52 -08:00
Cary R ea065a674d Use the identifier to get the correct line information
Using the closing ')' was not giving the correct line number.
2012-01-09 19:14:02 -08:00
Stephen Williams 498bfcd24b Trivial optimizer cleanup. 2012-01-07 10:23:07 -08:00
Martin Whitaker e485ac9981 Fix for pr3465541.
vvp_net_t::send_vec8_pv() needs to call the output filter if one is
present, and vvp_wire_vec4::filter_vec8() needs to support part selects.
2012-01-07 09:19:38 -08:00
Cary R d5b5fbd274 vlog95: Don't emit the \n, \t, \" or \\ values as octal constants.
1364-1995 Verilog allows the \n, \t, \" or \\ string escape sequences
so use them when emitting a string.
2012-01-06 19:34:28 -08:00
Cary R 8563218cd2 Register Icarus vpi debug routine as a system function. 2012-01-05 19:22:19 -08:00
Cary R 62b7c52329 Fix a few cppcheck issues and update some suppressions 2012-01-05 18:55:00 -08:00
Cary R fc7e7640ed Remove some MinGW32-w64 compile warnings. 2012-01-05 17:26:08 -08:00
Cary R 9c99bce054 Update lex/yacc builds to be consistent and to support parallel builds
Not all the lex/yacc (flex/bison) targets were using a consistent syntax.
This patch fixes that and explicitly serializes the *.c/*.cc and *.h build.
Not doing this was causing problem when using make -j. The issue appears to
be that if two targets are specified for a rule (e.g. file.cc file.h: file.y)
make does not realize they are both built by the same call so the rule is
executed twice. Once for the .cc target and once for the .h target. This is
not a problem for a serial build. To work around this only use the .c/.cc
file in the main target and then make the .h file depend on the .c/.cc file
as a sub-target.
2012-01-04 18:21:40 -08:00
Cary R f22b42c2cd Update tgt-pcb Makefile to handle/clean up config header
This change matches what is in other header files.
2012-01-03 16:35:03 -08:00
Cary R 7f4246a916 Fix tgt-fpga Makefile target 2012-01-03 16:14:10 -08:00
Cary R dab982f39b vlog95: Major rework of nexus emitting code, etc.
Rework the nexus emitting code to correctly translate most I/O ports.
Fix a few other expression issues uncovered when port translation was
done correctly. Ignore and warn that the SV ++/-- operators and enum
types are not translatable. More updates of the nexus debug code.
2012-01-02 11:29:42 -08:00
Cary R a433fa3fcd Update the Makefiles to use more override able values.
Update the various Makefiles to use override able constants.
2012-01-02 10:27:38 -08:00
Cary R ba4137d1e8 Keep the width information for all the tran gates.
Update the compiler to keep the actual width information for all the
tran gates.
2012-01-02 10:25:46 -08:00
Cary R 142f661737 Fix the compiler to keep the original file/line information.
For a parameter we want to keep the base definition file/line information
not the file/line information for the override.
2012-01-02 10:23:08 -08:00
Stephen Williams 5451a4830f Basic support in tgt-pcb for reading footprint files.
When a black-box item requests a specific footprint, we need to
read a file (<footprint>.fp) that contains the actual details
about that footprint. Support parse of that file and use the
loaded Element to generate the footprint for the item.
2011-12-26 23:05:52 -08:00
Cary R 965c77525c A C++ function passed to C should be declared extern "C" 2011-12-24 11:23:19 -08:00
Cary R 4b96b63166 Fix more tgt-pcb compile problems.
On some systems having both %.o: %.c and %.o: %.cc rules confused the
make system. This is directory only has C++ code so remove the %o: %.c
rule. Also the C++ compiler should be used to link C++ object code.
2011-12-24 10:03:15 -08:00
Cary R 37017334af Fix build issues in tgt-pcb
On Ubunto 10.10 (32 bit) tgt-pcb would not build because there were
include file issues. This patch fixes those and uses the C++ include
version where appropriate.
2011-12-24 09:32:19 -08:00
Stephen Williams a95d64b7de Add a pcb-s.conf file compatible with the -S flag. 2011-12-24 10:39:41 -05:00
Stephen Williams cd76a504ac Merge branch 'master' of github.com:steveicarus/iverilog 2011-12-24 10:31:49 -05:00
Stephen Williams a57ce2a709 Add ability to write out Elements in a PCB file.
The main .pcb file contains elements, and basic PCB status.
Write out a .pcb file with stub Elements for each of the devices
in the design.

Rearrange the way the files are reported to the code generator
so that we can sensibly express where the output files are.
2011-12-23 17:06:55 -05:00
Stephen Williams 9075326bb7 Introduce PCB code generator. 2011-12-20 14:16:54 -06:00
Stephen Williams 9ba6ab49ac Fix compressed assign to memory word.
This is a pretty trivial fix for the code generation of compressed
assign to a memory word. We generated incorect code for the stash
of the calculated word index, causing the assign of the result to
not work properly.
2011-12-18 17:56:41 -08:00
Cary R 0553250997 Use the correct space in the a.out file.
We use four spaces before most opcodes in the a.out file.
2011-12-18 16:45:42 -08:00
Cary R aedbda5a75 Identifiers need to be deleted with delete[]
This patch fixes a mismatch in the delete style.
2011-12-18 16:45:08 -08:00
Cary R ed13de131d Use mkdir() instead of _mkdir() for MinGW
MinGW-w64 requires the use of mkdir() and MinGW-w32 appears to support
both so use mkdir() to allow compilation to work with both versions.
2011-12-18 11:43:35 -08:00
Cary R d8bdea11c5 To reduce error divide by an integer vs multiple by a fraction.
This same change was done in the vpi directory. This patch fixes the
issues in the libveriuser directory. This fixed a fail in the vpi
timescale test under MinGW.
2011-12-16 19:04:11 -08:00
Cary R 5d150c3151 Update and localize HOST compile information. 2011-12-16 09:15:01 -08:00
Cary R 0dc9ed2b5d Remove one MinGW compile warning. 2011-12-15 19:03:55 -08: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
Cary R 8df745a281 Remove SV include file and vhdlpp with make uninstall 2011-12-14 18:39:27 -08:00
Cary R d198a57d99 The _vpiNexusId property must return zero when undefined
This was created by a user contributed patch. It resulted in all objects
that cannot have aliases being aliased.
2011-12-14 18:39:16 -08:00
Martin Whitaker 831b6d3ad6 Fix for crash when real value assigned to signed type parameter.
A declaration of the form "parameter signed a = 1.0" causes a
compiler crash. The standard is somewhat contradictory on what
type "a" should have, but testing with other compilers shows a
majority in favour of it being a real value.
2011-12-13 15:04:10 -08:00
Cary R 670efb38d9 Document that vpiFullName is supported in the generic routine. 2011-12-06 11:35:37 -08:00
Cary R 15a3f8ef2a For now treat vpiFullName the same as vpiName for a signal.
This needs to be fixed, but for now this prevents a seg. fault in
the VCD dumpers, etc.
2011-12-06 10:17:41 -08:00
Martin Whitaker 37be84483c Add support for parameter declarations with type but no range.
The standard allows a parameter (or localparam) declaration of the
form "parameter signed my_param = ...". The parser currently rejects
this. A small adjustment is also required in the parameter evaluation
code to correctly apply the type.
2011-12-06 09:42:29 -08:00
Cary R 95e25ad40f Apply a slightly modified user patch. 2011-12-05 19:54:50 -08:00
Cary R 46af6667dd Update line numbers in cppcheck suppression file.
A recent update shifted the lines that we are trying to suppress.
2011-12-01 10:37:32 -08:00
Stephen Williams 540e0ab2d1 Fix lexor parse of keywords declaration that includes '.'. 2011-11-29 15:17:34 -08:00
Stephen Williams eeca366092 Handle part selects in l-values of compressed assignments. 2011-11-28 16:41:50 -08:00
Stephen Williams 7a812fbe39 Rework vvp code generator for compressed assignments
Now we have a code generator that can handle compressed assignments
as they have been re-imagined in elaboration. There are some cases
that are not yet supported, we'll patch them up in due course.
2011-11-28 15:29:53 -08:00
Stephen Williams 3dabb2970d Get compressed assignment opcodes through to the ivl_target API. 2011-11-27 16:46:02 -08:00
Stephen Williams 21732a58c9 Merge branch 'master' into compressed-assign 2011-11-27 12:08:01 -08:00
Stephen Williams bb4f074bde Prepare for snapshot 2011-11-27 2011-11-27 11:42:02 -08:00
Stephen Williams cc9bbff78d Rework parse of compression assignments. 2011-11-27 11:16:39 -08:00
Stephen Williams 5e9e309be8 Revert "Assume module output primitive arguments as variables by default"
This reverts commit 537b8cba34.
Whatever problem that report was trying to address was addressed
wrongly by the reverted patch.
2011-11-25 17:18:27 -08:00