Commit Graph

10116 Commits

Author SHA1 Message Date
Cary R 77d7f0b8f7
Merge pull request #1011 from DeflateAwning/readme-1
Update project URL, other tiny README fixes
2023-10-24 08:05:18 -07:00
DeflateAwning 95217830b4 Update URL http://iverilog.icarus.com/ -> https://steveicarus.github.io/iverilog/ 2023-10-15 19:29:40 -06:00
DeflateAwning 950d72c77d Tiny README fixes 2023-10-15 19:29:04 -06:00
Cary R a9ef00676f
Merge pull request #1008 from larsclausen/2state-net-array
vvp: Add parser rule for unsigned 2-state net arrays
2023-10-15 10:49:47 -07:00
Lars-Peter Clausen b7ef0b5d88 Add regression test for continuous assignment to 2-state arrays
Check that continuous assignments to both signed and unsigned 2-state
arrays are supported.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-10-15 10:07:24 -07:00
Lars-Peter Clausen 52a8b31ac3 vvp: Add parser rule for unsigned 2-state net arrays
vvp is missing a parser rule for unsigned 2-state net arrays. E.g.

```
  bit a[0:1];
  assign a[0] = 1'b0;
```

will synthesize fine, but when running it with vvp cause a syntax error.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-10-15 10:03:10 -07:00
Cary R c498d53d0d
Merge pull request #1006 from larsclausen/queue-darray-2state-oob
Return '0 for out-of-bounds access on 2-state queues and dynamic arrays.
2023-10-10 04:36:48 -07:00
Lars-Peter Clausen 3e58507e87 Enable regression tests for out-of-bounds on 2-state queues and dynamic arrays
Now that out-of-bounds access on 2-state queues and dynamic arrays yields
the right value move the tests from the "Not Implemented" list to the list
of tests that get run.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-10-01 09:09:31 -07:00
Lars-Peter Clausen 85bf2d11fa tgt-vvp: Cast reads from 2-state dynamic arrays/queues
vvp does not track whether the values stored in a dynamic array or queue
are 2-state or 4-state. Internally the data is always stored as 4-state.

To make sure that the read value is actually 2-state do a cast for 2-state
reads.

E.g. performing an out-of-bounds access on a 2-state dynamic array or queue
will yield a undefined value.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-10-01 09:09:31 -07:00
Lars-Peter Clausen 560800489d tests: sv_queue_vec: Change base type to 4-state
The sv_queue_vec test uses queues of 2-state vectors, but also checks if
certain operations on the queue yield 'X.

2-state queues should never yield 'X and the test only passes because of a
bug. In preparation for fixing the bug change the test to use a 4-state
base type instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-10-01 09:09:31 -07:00
Cary R d22bb3d250
Merge pull request #1003 from larsclausen/2state-array-init-prop
vvp: Fix initial value propagation for 2-state non-automatic arrays
2023-09-25 01:02:41 -07:00
Lars-Peter Clausen 6e81891de0 Add regression test for 2-state array initial value propagation
Check that the initial value that gets propagated for 2-state arrays is '0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-09-23 06:19:09 -07:00
Lars-Peter Clausen 0eb01fff1e vvp: Fix initial value propagation for 2-state non-automatic arrays
For 2-state non-automatic arrays currently real 0.0 value is propagated as
the initial value. This will cause an assert at the downstream receivers
which expect a vector.

Make sure that the vector value 0 is propagated instead for 2-state
vectors.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-09-23 05:40:13 -07:00
Cary R 778b6d937e
Merge pull request #998 from esola-thomas/esola-thomas/Enhance_README
README file enhancements
2023-09-11 21:03:17 -07:00
Ernesto Sola-Thomas 93f916a67e Add table of contents and drop downs 2023-09-11 20:49:24 -04:00
Cary R 36a8a99177
Merge pull request #997 from larsclausen/netrange-cleanup
Small cleanups around netrange_t
2023-09-10 22:13:04 -07:00
Lars-Peter Clausen 484846ab3e NetNet: Pass unpacked dimensions as `std::vector` instead of `std::list`
Most places in the code use a std::vector for array dimensions.
The only exception is the constructor of NetNet, which uses
a `std::list` to pass the unpacked dimensions. But to store the
unpacked dimensions it also uses a `std::vector`.

There does not seem to be a good reason why the constructor
has to take a `std::list`, so switch it also to `std::vector`.

This allows to simplify the code and remove some special handling
for `std::list<netrange_t>`.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-09-09 05:51:17 -07:00
Lars-Peter Clausen 763907b0e5 Add a typedef for `std::vector<netrange_t>`
`std::vector<netrange_t>` is used for signal array dimensions. As such it is
used in quite a few places.

Add a typedef that can be used as a shorthand to refer to it. This helps to
keep lines where this is used from growing to overly long.

The new type is called `netranges_t`.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-09-09 05:50:40 -07:00
Lars-Peter Clausen d6d95c7c49 Use non-array `NetNet` constructor where appropriate
There are two `NetNet` constructors, one for arrays and one for non-arrays.
There are a few places where the array constructor is used for non-arrays,
but with an empty unpacked dimensions list. Switch this over to using the
non-array constructor.

This slightly reduces boiler-plate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-09-09 05:50:25 -07:00
Lars-Peter Clausen bdbe74252c Use `netrange_width()` helper where appropriate
The `netrange_width()` helper function computes the total width of a set of
ranges. There are a few places where this is currently open-coded and
`netrange_width()` can be used. This removes a bit of duplicated code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-09-09 05:50:25 -07:00
Lars-Peter Clausen 4269388878 `netrange_width()`: Add a base_width parameter
There are sometimes cases where calculating the total width of a
`vector<netrange_t>` has to take into account an existing base width. E.g.
when chaining multiple `vector<netrange_t>`. Add support to the
`netrange_width()` function to be able to handle this case.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-09-09 05:49:46 -07:00
Lars-Peter Clausen 4b66d40d62 Remove unused `calculate_count()` function
The templatized version of `calculate_count()` that is used on a data type
is not used. Remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-09-09 05:49:23 -07:00
Cary R f50cc35d2f Fix space issues 2023-09-04 14:15:11 -07:00
Cary R 807058e3a4 Add check for pragma name in ivlpp 2023-09-04 14:00:41 -07:00
Cary R 76a65d5958 Add error message for bad line directives to ivlpp 2023-09-04 14:00:41 -07:00
Cary R 7ce068fbdb
Merge pull request #994 from mole99/sdf-interconnect-vector
SDF: Interconnection delays for input/output vectors
2023-09-04 07:02:28 -07:00
mole99 d7c6d7ce76 Fix memory leak and add vpi_release_handle() 2023-09-04 15:20:31 +02:00
mole99 18f6dcb6ba Fix formatting in sdf_parse.y 2023-09-04 14:27:46 +02:00
mole99 d70ad015f2 Cleanup 2023-09-04 14:07:48 +02:00
mole99 b8ae6b1686 Fix port bit index 2023-09-04 11:31:35 +02:00
Cary R d03d4b3145 Update to the latest fstapi.c file 2023-09-04 00:21:30 -07:00
Cary R b497d362a7 Cleanup space issues 2023-09-04 00:21:23 -07:00
mole99 f9d658caeb Add more debug information 2023-09-04 09:20:19 +02:00
mole99 023c5f2754 Add testcase with input and output vectors 2023-09-04 09:20:19 +02:00
mole99 a1440ced86 Add support for annotation of input and output vectors 2023-09-04 09:20:19 +02:00
Cary R 7e62a1b848 Update the gold file for br1005 2023-09-03 21:46:15 -07:00
Cary R b12977d61a A macro can only have `" and add `\`" for pragma comments
We want to support `" and `\`" when a pragma comment is part of a macro
definition, but this cannot be part of a normal pragma comment.
2023-09-03 21:34:31 -07:00
Cary R d938654c36
Merge pull request #993 from ithinuel/escape-in-attribute
add double quote escapes from pragma comments.
2023-09-03 21:14:10 -07:00
Cary R e92caa05db br_gh979 cannot be converted to vlog95 2023-09-03 18:54:18 -07:00
Cary R 1cc6fe835b Update ufunc/e documentation 2023-09-03 18:45:54 -07:00
Cary R f229dfcb2b Fix the trigger for user functions with no args 2023-09-03 18:41:38 -07:00
Cary R c6fe0106cb Change empty function port list message 2023-09-03 18:41:06 -07:00
Cary R 64cfd681af
Merge pull request #980 from sifferman/argumentless-functions-fix
Argumentless functions fix
2023-09-03 17:31:10 -07:00
Cary R 369c01a765 Update action and specify python version in msys2 2023-09-02 10:44:21 -07:00
Cary R 8e0fa024d0
Merge pull request #973 from mole99/sdf-interconnect
Implement SDF INTERCONNECT
2023-09-02 09:08:22 -07:00
mole99 0c95493794 Add has_index flag to interconnect_port_s 2023-09-02 15:57:04 +02:00
mole99 665295ba00 Also enable -gspecify for interconnect tests 2023-08-30 15:13:18 +02:00
Wilfried Chauveau 873c2fecd4
add double quote escapes from pragma comments. 2023-08-29 22:37:14 +01:00
mole99 11c944f5e9 Cleanup 2023-08-29 09:54:39 +02:00
mole99 306e4cfa6b Add three tests to exercise interconnection delays in designs 2023-08-23 12:56:11 +02:00