Commit Graph

7149 Commits

Author SHA1 Message Date
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
Cary R ee2d0c70fc Make wreal an extra keyword in Icarus.
Most people doing real modeling don't want to bring in the whole
Verilog-AMS infrastructure to use wreal nets. This patch adds the
wreal keyword to the xtypes generation so that wreal is available
by default.
2011-11-25 15:54:00 -08:00
Cary R b37d806ee1 Add preliminary support for wreal in Verilog-AMS mode.
This patch adds wreal support when in Verilog-AMS mode. It doesn't add
everything that is shown in the Verilog-A standard.

It adds the following:

  Declaring a wreal net.
  Declaring a wreal net with an initialization.
  Declaring a wreal input/output using ANSI syntax.
  Declaring a wreal input/output using the old style.

Declaring wreal inout ports are also allowed and parsed, but the
compiler does not know how to handle this. There are other deviations
from what is shown in the Verilog-A standard, but this should get most
of the syntax people actually use.
2011-11-23 19:12:34 -08:00
Cary R 92ad41d65b Treat an empty @* as something that will never trigger.
An @* with no sensitivities should be treated as something that will
never trigger vs something that will run continuously. This patch makes
this change and adds a warning when an @* has no sensitivities since
this is almost certainly a coding bug.
2011-11-23 17:33:35 -08:00
Cary R 9fbeb78d5f Add support for a named block to only have variable definitions.
It is legal for a named block to contain variable definitions and
no statements. This patch fixes this for both style of blocks. It
also organizes the block parsing code to be a bit more clear, adds
an error case for fork/join and changes on check for size() > 0 for
the more efficient ! empty().
2011-11-22 20:34:11 -08:00
Cary R cc5efa45ba Fix two bugs and use the more efficient !empty() vs size() > 0
These two bugs were found with a recent cppcheck addition. It also
changes one occurrence of size() > 0 for the more efficient ! empty().
2011-11-22 19:44:55 -08:00
Cary R 4c6a5bbd89 Update PSpecPath to take the polarity and full_flag when constructed
To avoid a variables not initialized in the construct this patch modifies
the PSpecPath class to take the polarity and full_flag as arguments to
the constructor.
2011-11-22 19:39:26 -08:00
Cary R 5b1e2c8c6c Update the cppcheck suppression file in the vpp directory.
Recent code changes moved the line that was being suppressed to a
different line. This patch updates the suppression file to match the
current code.
2011-11-22 19:30:53 -08:00
Stephen Williams 7e9d41da11 Add the -mvpi_debug VPI module.
This is a place to store interesting debug tools for VPI.
For starters, there is $vpi_tree function.
2011-11-20 15:08:23 -08:00
Stephen Williams 5758798923 Improve version tag from git.
The --always flag to git describe is harmless in the normal case,
and helpful in some special cases. Also add the --dirty flag to
get extra interesting details.
2011-11-19 09:04:21 -08:00
Cary R f880b78b2b For wire and/or nets we need all the net resolution to be and/or.
If a wired and/or net has more than four connections all the other
resolution branches must also be wired and/or. All other nets can
just be tri since tri0/tri1 only needs the final resolution to be
an active pull up/down.
2011-11-19 08:44:19 -08:00
Cary R 36d298a2b6 Assert that sync/async set/clear are not supported for a DFF primitive.
Since synthesis is not currently supported we do not support/generate
sync/async set or clear control inputs. This is further complicated by
the fact that the VVP DFF primitive is not fully implemented.
2011-11-17 14:33:00 -08:00
Cary R bcb963a235 Fix Cygwin compile problem (replace abs() call with ?:
This patch fixes a compile problem in Cygwin where there are two
definitions for abs() that do not match so the C++ code doesn't know
which one to call. To avoid the whole mess replace the call to abs()
with the appropriate ?: construct.
2011-11-17 14:30:33 -08:00
Cary R 4fe7561e74 Report that a vectored full connection only supports a single src/dst
In a specify block a full connection is defined to only support a single
source and destination path. This patch adds an error message when this
is found, except we skip the error if all the paths are a single bit
wide. This exemption was added to match the functionality found in
NC-Verilog and presumably Verilog-XL.

A message was also added in place of an assert if the source signals was
not found in the current scope.
2011-11-10 17:55:50 -08:00
Cary R 24b6264318 Remove wide input valgrind warnings.
Both UDPs and system functions use the wide input functor. This patch
modified the code generator to create a local net declaration for the
output net if we have either a delay or modpath connecting the output
to the true output. This is needed so that the wide input can be
cleaned up correctly.

Local real nets were also added to the local net pool when testing with
valgrind. This allows them to be cleaned up at the end.
2011-11-10 17:53:08 -08:00
Cary R f415c744ad Cleanup unneeded vectors in a delay after initialization.
For a delay we do not know exactly what type we will be propagating
until the initialization event has happened. Because of this we
allocate both a vec4 and a vec8 value. Once the initialization event
has happened we can free the unneeded element(s).
2011-11-10 17:49:51 -08:00