Commit Graph

10449 Commits

Author SHA1 Message Date
Cary R. 00325f3efb
Merge pull request #1348 from jotego/interface-ports
Support SystemVerilog interface-typed module ports
2026-05-16 15:33:56 -07:00
Cary R. b605f42a1e
Update copyright year in parse_misc.h 2026-05-16 15:19:40 -07:00
Cary R. 9f3f35e451
Update copyright year in netmisc.h 2026-05-16 15:19:02 -07:00
Cary R. 73cee3b3e0
Update copyright year in Module.h 2026-05-16 15:18:15 -07:00
Cary R. 9ff4a42171
Update copyright year in Module.cc 2026-05-16 15:17:52 -07:00
Cary R. 84dc4ec99f
Update copyright year in elab_net.cc 2026-05-16 15:16:47 -07:00
Cary R. 1751f4ed0b
Merge pull request #1361 from larsclausen/unpacked-lvalue-concat-error
Reject unpacked l-value concatenation operands
2026-05-16 14:37:36 -07:00
Lars-Peter Clausen 96cea271ba ivtest: Fix VVP regression test metadata
A few JSON regression test entries reference the wrong source or gold
files. There are also two regress-vvp list entries that reference each
other's JSON file.

Use the matching source and gold files for those entries.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-16 13:43:10 -07:00
Lars-Peter Clausen b8eac7fc19 ivtest: Fix source for sv_mixed_assign2 test
The sv_mixed_assign2 JSON entry accidentally references
sv_mixed_assign1.v. Point it at sv_mixed_assign2.v instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-16 12:51:43 -07:00
Lars-Peter Clausen f9ab26b3d9 Add regression tests for unpacked l-value concat errors
Check that class objects, dynamic arrays, queues, strings and static
unpacked arrays can not be used as l-value concatenation operands. Check
procedural and continuous assignment concatenations, including single
operand concatenations.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-15 20:48:19 -07:00
Lars-Peter Clausen 208078838e Reject unpacked l-value concatenation operands
L-value concatenation operands must be packed values. Using an unpacked
array, string, class object or other non-packed value as an operand can
reach later assignment code with an invalid l-value representation.

Check the operand type after l-value elaboration and report an
elaboration error instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-15 20:44:47 -07:00
Cary R. 73ae5bd1db
Merge pull request #1360 from larsclausen/vvp-case-cmp-e
tgt-vvp: Use `%cmp/e` instead of `%cmp/u` for `case` comparisons
2026-05-15 07:47:46 -07:00
Cary R. 5b62f32ad6
Update copyright year in vvp_process.c 2026-05-15 07:47:24 -07:00
Cary R. a6ba0eef5e
Merge pull request #1359 from larsclausen/remove-unused-parser-union-fields
parse.y: Remove unused fields from union
2026-05-14 22:35:07 -07:00
Lars-Peter Clausen d84f1b9843 tgt-vvp: Use `%cmp/e` instead of `%cmp/u` for `case` comparisons
`%cmp/e` and `%cmp/u` are very similar with `%cmp/e` not setting the lt
flag and being a bit faster due to it. For case comparisons the flag is not
needed so switch to `%cmp/e`. This speeds up simulation time designs which
make use of case comparisons.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-14 20:34:30 -07:00
Lars-Peter Clausen f1c71eff5c parse.y: Remove unused fields from union
The parser union still has a few fields that are not used by any
grammar rule. They do not have matching semantic type tags and no
action references them.

Remove the unused fields.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-14 20:18:28 -07:00
Cary R. 5fac9fae4d
Merge pull request #1358 from hwhsu1231-fork/edit-this-page
docs: add edit this page to sidebar
2026-05-13 10:01:53 -07:00
Haowei Hsu a042847b38
docs: add edit this page to sidebar 2026-05-13 22:12:30 +08:00
Cary R. 2f1987bded
Merge pull request #1357 from hwhsu1231-fork/add-github-url
docs: add github url to html theme options
2026-05-13 02:46:19 -07:00
Haowei Hsu 214324db8c
docs: add github url to html theme options
Include the GitHub repository URL in the HTML theme options
for better visibility and access to the project's source code.
2026-05-13 15:34:04 +08:00
Cary R 6b1878c1b5 Update to the latest actions to remove Node.js warnings 2026-05-12 21:53:53 -07:00
Cary R 1476f36ff3 Upgrade actions/checkout to version 5 to support proper nodeJS 2026-05-12 21:35:22 -07:00
Cary R. 89740e6f0e
Merge pull request #1346 from hwhsu1231-fork/venv-switch-shibuya-theme
docs: switch docs to shibuya theme and install via venv
2026-05-12 21:09:51 -07:00
Cary R. 2449ee2054
Merge pull request #1355 from larsclausen/super-member-access-error
Reject super access without a parent class
2026-05-12 21:08:27 -07:00
Lars-Peter Clausen e4afd6dc25 Add regression test for `super` access error
Check that access through `super` is rejected when the current class has no
parent class.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-12 20:43:38 -07:00
Lars-Peter Clausen cdb9bc2c21 Reject `super` access without a parent class
The `super` keyword refers to the parent class of the current class. If the
class has no parent the lookup still returned the current class handle and left
the `super` path component for l-value elaboration. This triggered the
`tail_path.empty()` assert.

Report an error during symbol lookup instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-12 20:43:38 -07:00
Cary R. a8eda65859
Merge pull request #1353 from rhabacker/simplify-doc-rules
vvp,tgt-fpga: cleanup doc related rules
2026-05-12 05:27:44 -07:00
Ralf Habacker 33584ec6f1 tgt-fpga: cleanup doc related rules
With this commit, the file “iverilog-fgpa.pdf” is now
also installed in the directory where all the other
PDF files are located.
2026-05-12 10:35:02 +02:00
Ralf Habacker 46a329f16f vvp: cleanup doc related rules 2026-05-12 10:31:19 +02:00
Cary R. 49ee58c356
Merge pull request #1352 from larsclausen/named-event-edge-errors
Report error for `edge` event controls on named events
2026-05-11 22:30:49 -07:00
Cary R 5b51ed9aa5 Fix building and dependency for verion_base.h 2026-05-11 22:16:00 -07:00
Lars-Peter Clausen ba3f46722c Add regression tests for edge controls on named event errors
Check that the compiler reports an error for `posedge`, `negedge` and `edge`
event controls on named events. Edge controls can not be used with named
events.

There is already an existing test that checks both `posedge` and `negedge`.
Split it into separate tests so that each invalid event control is checked
independently.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-11 21:10:35 -07:00
Lars-Peter Clausen 265272a962 Report error for `edge` event controls on named events
Using an edge control with a named event is invalid. The existing elaboration
code already reports an error for `posedge` and `negedge`, but the `edge` case
falls through to the default path and triggers an assert.

Handle `PEEvent::EDGE` like the other edge-control cases and report the same
kind of error instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-11 21:10:32 -07:00
Jose Tejada 56afcb6e75 fix(interface): allow forward interface port types 2026-05-11 22:25:32 +02:00
Haowei Hsu a52bef20ed
docs: switch docs to shibuya theme and install via venv
- change documentation theme from `alabaster` to `shibuya`
- add pinned Documentation requirements for `sphinx` and `shibuya`
- update workflows to create `.venv` and install with `requirements.txt`
- ignore common virtual environment directories (`.conda` and `.venv`)
2026-05-11 20:48:58 +08:00
Cary R. f696064af1
Merge pull request #1351 from rhabacker/fixup-for-1331
Makefile.in: 'version_base.h' must not be deleted when running `make …
2026-05-11 04:51:42 -07:00
Ralf Habacker 1ea5f72496 Makefile.in: 'version_base.h' must not be deleted when running `make clean`
Since this file, just like 'config.h', is generated by autoconf,
it should only be deleted in the `distclean` target.

Also since the project does not currently use automake, manual
maintenance of the timestamp file for 'version_base.h' is required.

Fixup for commit 10b5f70e7 from #1331
2026-05-11 13:16:08 +02:00
Jose Tejada 377881b723 fix(interface): address port array review feedback 2026-05-11 07:44:43 +02:00
Cary R. bcc3a66657
Merge pull request #1350 from larsclausen/array-index-real-error
Reject `real` array indices
2026-05-10 22:40:23 -07:00
Lars-Peter Clausen ea57b6dd9a Add regression test for real array index error
Check that using a real valued expression as an array index is rejected
during elaboration.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-10 22:26:48 -07:00
Lars-Peter Clausen ba74c7b5ad Reject `real` array indices
Array indices must be integral expressions. Using a real valued expression
as an unpacked array index currently reaches the vvp real expression code
and triggers an assert.

Packed bit and part select indices already report an elaboration error for
real expressions since commit 2249d224de ("Bit/part selects cannot have
real index expressions"). Do the same for unpacked array indices.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-10 22:26:44 -07:00
Cary R. fb6dfebcec
Merge pull request #1349 from larsclausen/new-array-init-cleanup
elab: Use common new array initializer elaboration
2026-05-10 15:24:56 -07:00
Cary R 13d5155e88 Docopt is no longer used in the Python test script 2026-05-10 15:19:09 -07:00
Lars-Peter Clausen fde4ef85c1 elab: Use common new array initializer elaboration
here are two separate paths `PENewArray::elaborate_expr()`, one for
assignment patterns and one for everything else.

But since since commit 5ca058bfb ("Add support for darray initialisation
from another darray"). The two paths have been effectively the same.

Both call `elaborate_expr()` on the init values with the same parameters.
The only difference is the regular path casts the type to `netarray_t`, but
that doesn't really do anything since it gets passed to a function that
takes a `ivl_type_t`, so is immediately cast back to the base type.

The comment on the regular path is also outdated since it still refers to
the tpre 5ca058bfb code.

Remove the branching and route it through the same path.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-05-10 14:59:44 -07:00
Cary R. 8c7f3452c5
Merge pull request #1347 from larsclausen/enum-const-width-cleanup
elab: Remove redundant enum parameter width handling
2026-05-10 14:49:33 -07:00
Cary R 5240790480 Fix/update latest cppcheck issues 2026-05-10 14:47:40 -07:00
Jose Tejada 417ab54445 feat(interface): support interface port arrays 2026-05-10 17:30:54 +02:00
Jose Tejada 2228e31a6a refactor(interface): share port resolution paths 2026-05-10 17:08:35 +02:00
Jose Tejada 39072cd452 feat(interface): broaden interface port binding 2026-05-10 16:34:21 +02:00
Jose Tejada c963809709 feat(sv): support interface-typed module ports 2026-05-10 14:45:33 +02:00