Commit Graph

9848 Commits

Author SHA1 Message Date
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
mole99 37119b1504 Remove some unnecessary output 2023-08-23 12:56:11 +02:00
mole99 db068aa137 Correctly dump the delayed signal for output ports 2023-08-23 12:56:11 +02:00
mole99 423f88cce9 Fix annotation for special cases 2023-08-23 12:56:11 +02:00
mole99 6d3e2bf344 Improve SDF interconnect support, add -ginterconnect flag 2023-08-23 12:56:11 +02:00
mole99 adb40e7572 Annotate simple designs 2023-08-23 12:56:10 +02:00
mole99 3fe59b0c16 Add vpi_handle_multi to vpi_modules 2023-08-23 12:56:10 +02:00
mole99 cf19acd8ee Update vpip_routines_s 2023-08-23 12:56:10 +02:00
mole99 f6e4b6d381 Add vpi_handle_multi to libvpi 2023-08-23 12:56:10 +02:00
mole99 7beadb92f8 Framework of the INTERCONNECT implementation 2023-08-23 12:56:10 +02:00
mole99 78f8976c85 Parse port and index 2023-08-23 12:56:10 +02:00
Cary R 77f7609b67 Fix formatting of link routine 2023-08-22 20:41:30 -07:00
Cary R 2d41a43ae1 Spelling fixes 2023-08-22 20:41:17 -07:00
Cary R 70243b8163
Merge pull request #989 from mole99/fix-modpaths
Always evaluate `vvp_fun_modpath_src` first
2023-08-22 19:41:03 -07:00
Cary R e1f5dbcf17
Merge pull request #992 from larsclausen/tf-named-ports
Add support for binding function/task arguments by name
2023-08-20 20:39:51 -07:00
Lars-Peter Clausen 250c456f94 Add regression tests for binding task/function arguments by name
Check that binding task and function arguments by name works as expected.
Also check that is works for the various variations of invoking a class
constructor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-08-20 08:20:54 -07:00
Lars-Peter Clausen f6a51bc9db Add support for binding function/task arguments by name
In addition to providing positional arguments for task and functions
SystemVerilog allows to bind arguments by name. This is similar to how
module ports can be bound by name.

```
task t(int a, int b); ... endtask
...
t(.b(1), .a(2));
```

Extend the parser and elaboration stage to be able to handle this. During
elaboration the named argument list is transformed into a purely positional
list so that later stages like synthesis do not have to care about the
names.

For system functions and tasks all arguments must be unnamed, otherwise an
error will be reported.

In addition to functions and tasks arguments can also be bound by name for
the various different ways of invoking a class constructor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-08-20 08:20:54 -07:00
Lars-Peter Clausen 102d85c4e5 Attach line information to named items
Attach line information to named items. This allows to provide better
location information for messages involving named items. The location of
item itself can't always be used, since the item itself might be empty.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-08-19 10:12:00 -07:00
Lars-Peter Clausen 4036c77416 parser: Consolidate named expression parsing
There are a few different places in the parser that all parse named
expressions in the same way. Consolidate them into a single rule.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-08-19 10:12:00 -07:00