Wilson Snyder
22687a6901
Internals: Use C++14 quoted literal std::string
2024-01-28 21:00:20 -05:00
Wilson Snyder
d6f8ccd20b
Add `unroll_disable` and `unroll_full` loop control metacomments ( #3260 ).
2024-01-26 07:49:07 -05:00
Wilson Snyder
2989e54eaa
Add unsupported warning on property iff ( #4848 )
2024-01-21 16:18:48 -05:00
Anthony Donlon
55d1b87b34
Support parsing anonymous primitive instantiations ( #4809 )
2024-01-07 10:59:56 -05:00
Wilson Snyder
e76f29e5ba
Copyright year update
2024-01-01 03:19:59 -05:00
Krzysztof Bieganski
ea2084392f
Support --timing triggers for virtual interfaces ( #4673 )
2023-12-04 22:11:07 -05:00
Krzysztof Bieganski
b820e1b587
Support `iff` in sensitivity list ( #1482 ) ( #4626 )
...
Adds a new field to `AstSenItem` that stores the `iff` condition which is then handled by `SenExprBuilder`.
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-11-29 19:10:32 +01:00
Wilson Snyder
99dbd23f1b
Support passing constraints to --xml-only output (still otherwise unsupported) ( #4683 )
2023-11-11 20:20:37 -05:00
Wilson Snyder
f3ae4b8786
Fix spelling
2023-11-10 23:25:53 -05:00
Ryszard Rozak
a764c70b4a
Fix handling of static keyword in methods ( #4649 )
2023-10-31 08:15:54 -04:00
Krzysztof Boroński
a87fb57656
Allow assigning events ( #4403 )
...
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-10-26 16:38:47 +02:00
Geza Lore
d330100542
Create implicit nets for inputs of gate primitives.
...
Prior to this we failed to create implicit nets for inputs of gate
primitives, which is required by the standard (IEEE 1800-2017 6.10).
Note: outputs were covered due to being modeled as the LHS of
assignments, which do create implicit nets.
2023-10-21 22:45:26 +01:00
Wilson Snyder
4cc42133b5
Internals: Rename some parser rules. No functional change.
2023-10-19 20:13:27 -04:00
Wilson Snyder
622f0c047c
Fix reporting `line at wrong spot. Rework some internal fileline parsing functions.
2023-10-08 20:38:45 -04:00
Wilson Snyder
7f38414276
Internals: Rename addIgnoreMatch. No functional change.
2023-10-08 01:02:23 -04:00
Wilson Snyder
106664b942
Internals: Fix long lines. No functional change.
2023-10-05 20:07:53 -04:00
Wilson Snyder
ad343f8260
Add warning on interface instantiation without parens ( #4094 ).
2023-09-26 22:15:48 -04:00
Anthony Donlon
229ce1aecf
Fix handling input file path separator ( #4515 ) ( #4516 )
2023-09-26 15:42:15 -04:00
Anthony Donlon
60e9827ffe
Support converting parameters inside modules to localparams ( #4511 )
2023-09-25 11:39:04 -04:00
Anthony Donlon
750b5be5d3
Remove support for parameterized UDPs ( #4518 )
2023-09-25 10:40:44 -04:00
Mariusz Glebocki
28bd7e5b19
Rework multithreading handling to separate by code units that use/never use it. ( #4228 )
2023-09-24 22:12:23 -04:00
Wilson Snyder
9f75068059
Cleanup some error messages to properly quote
2023-09-23 08:52:50 -04:00
Wilson Snyder
761adf1cf0
Internals: Add cloneTreePure to prepare for side effect check.
...
Use cloneTreePure when what is being cloned must be side-effect free.
Use cloneTree when safe to contain side effects (e.g. cloning module).
2023-09-16 22:50:54 -04:00
Wilson Snyder
d840c612d4
Fix IGNOREDRETURN to not warn on void-cast static function calls.
2023-09-15 19:01:11 -04:00
Anthony Donlon
3dde57d539
Fix lint of case statements with enum and wildcard bits ( #4464 ) ( #4487 )
2023-09-14 07:22:49 -04:00
Krzysztof Boroński
70b11f91b4
Support block_item_declaration in forks ( #4455 )
2023-09-08 16:40:14 +02:00
Wilson Snyder
014301587f
Unsupported instead of syntax error on parameter var initial values
2023-09-08 08:37:17 -04:00
Ryszard Rozak
91227d26bb
Internals: Rename pure to dpiPure. No functional change. ( #4461 )
2023-09-08 08:51:19 +02:00
Wilson Snyder
11b5dae88d
Support let
2023-09-07 21:45:51 -04:00
Wilson Snyder
048c9f3fe2
Support extra commas before $display
2023-08-30 17:31:11 -04:00
Wilson Snyder
ca6ab584d0
Internals: Remove cloneTreeNull. No functional change intended.
2023-08-29 20:29:11 -04:00
Wilson Snyder
967a8530dd
Fix errors on some $past cases ( #4425 )
2023-08-22 01:49:06 -04:00
Krzysztof Bieganski
9caa79a7ea
Internals: Remove the name field from `AstVarRef` ( #4395 )
2023-08-03 02:52:52 -04:00
Wilson Snyder
06521f6cf1
Tests: Fix some missing coverage, and cleanup some error messages
2023-07-27 06:53:43 -04:00
Anthony Donlon
959387b69f
Support property declaration with empty parentheses ( #4313 ) ( #4317 )
2023-07-26 05:18:21 -04:00
Wilson Snyder
cff37f0775
Add GENUNNAMED lint warning.
...
Also fix generate-for blocks with empty statements getting lost.
2023-07-01 08:31:53 -04:00
Ryszard Rozak
09e856d2f3
Fix deleting unused parameterized classes ( #4150 )
2023-04-28 07:20:25 -04:00
Wilson Snyder
7f49b6c102
Parse 'let' as unsupported
2023-04-16 17:23:16 -04:00
Wilson Snyder
bf5cbb512e
Add UNSUPPORTED on dotted disable instead of syntax error
2023-04-09 10:11:47 -04:00
Wilson Snyder
d4bb58630e
Support 'for' initialization with comma
2023-04-09 09:56:39 -04:00
Wilson Snyder
8caf9be3e6
Internals: Favor {} constructor syntax. No functional change intended.
2023-04-06 21:04:26 -04:00
Wilson Snyder
05660d1118
Add CONSTRAINTIGN warning when constraint ignored. Likewise ignore constraint_mode, rand_mode.
2023-04-05 21:27:37 -04:00
Wilson Snyder
947402bc57
Fix interface generate begin ( #4065 ).
2023-03-26 08:49:38 -04:00
Ryszard Rozak
f439a7927f
Fix parameters in a class body to be localparam ( #4061 )
2023-03-23 10:20:35 +01:00
Wilson Snyder
45690faea7
Parse defparam = as unsupported
2023-03-15 21:04:10 -04:00
Wilson Snyder
56de6f1a9f
Fix min/typ/max internal error
2023-03-14 20:40:58 -04:00
Wilson Snyder
ea4cc4e076
Parse nettype with package, still unsupported
2023-03-14 19:52:01 -04:00
Wilson Snyder
39a5bce8a6
Parse covergroup, still unsupported.
2023-03-12 14:11:11 -04:00
Wilson Snyder
1debd0405b
Support complicated IEEE 'for' assignments.
2023-03-12 10:46:40 -04:00
Wilson Snyder
1f1d9312d2
Parse event 'iff', still unsupported.
2023-03-11 22:39:59 -05:00
Wilson Snyder
259201b352
Support $fopen as an expression
2023-03-11 18:11:01 -05:00
Wilson Snyder
bb45bd048e
Commentary
2023-03-11 11:27:40 -05:00
Wilson Snyder
5489ec6eff
Parse 'first_match', and still unsupported.
2023-03-11 11:08:37 -05:00
Wilson Snyder
e55e81bcd0
Parse sequence 'local input', still unsupported.
2023-03-11 10:53:10 -05:00
Wilson Snyder
5c5c758718
Parse 'wait_order' and test, still unsupported.
2023-03-11 10:47:08 -05:00
Wilson Snyder
b87669039e
Commentary
2023-03-10 22:25:47 -05:00
Wilson Snyder
60a6ed2a20
Support assert property statement-else-statement
2023-03-10 22:13:17 -05:00
Wilson Snyder
81e8388c3f
Parse 'expect', still unsupported.
2023-03-10 21:48:56 -05:00
Wilson Snyder
4532680e5f
Internals: Cleanup assert/assume. No functional change.
2023-03-10 21:17:54 -05:00
Wilson Snyder
725ec088ea
Parse 'sequence' declarations, property case/if, still unsupported.
2023-03-06 05:12:09 -05:00
Wilson Snyder
87c3de5aab
Parse 'matches', still unsupported.
2023-03-05 23:58:54 -05:00
Wilson Snyder
6d7c04a3de
Parse cycle delays and boolean abbrev, still unsupported.
2023-03-05 23:22:41 -05:00
Wilson Snyder
d0f5ce0cc4
Parse intersect/throughout/within, still unsupported.
2023-03-05 19:57:09 -05:00
Wilson Snyder
cb89ef9885
Parse more property expression syntax, as still unsupported
2023-03-05 19:42:21 -05:00
Wilson Snyder
90360d40fd
Change property expression handling towards eventual more general expressions.
2023-03-05 18:52:55 -05:00
Wilson Snyder
15dcd326f8
Internals: Parse weak/strong but do not lex
2023-03-05 18:30:43 -05:00
Wilson Snyder
ae1eb56695
Internals: Parser commentary
2023-03-05 17:59:17 -05:00
Wilson Snyder
a47fd07585
Internals: Standard grammar for property_expression |-> |=>.
2023-03-05 16:59:24 -05:00
Wilson Snyder
19bc257002
Internals: UNSUPPORTED commentary
2023-03-05 16:45:07 -05:00
Wilson Snyder
329a933efd
Internals: Parse nettype as unsupported
2023-03-04 10:50:28 -05:00
Wilson Snyder
e21198cb2d
Add warning on missing class reference #()
2023-03-03 21:06:52 -05:00
Wilson Snyder
dd917d50eb
Internals: Parse interconnect then say unsupported
2023-03-02 20:02:14 -05:00
Wilson Snyder
8a5804fc3a
Tests: Add tagged union test
2023-03-02 08:11:11 -05:00
Wilson Snyder
3df29085c8
Fix end label fileline reporting.
2023-03-02 07:50:16 -05:00
Wilson Snyder
976af0068b
Support parsing min:typ:max parameters
2023-03-01 23:11:48 -05:00
Wilson Snyder
326a60d307
Add error on mixing .name and by-port instantiations.
2023-03-01 21:19:21 -05:00
Ryszard Rozak
47a7e75841
Fix subsequent parameter declarations ( #3969 )
2023-02-22 11:26:25 +01:00
Wilson Snyder
c82a098f2e
Internals: Parse class extends ::
2023-02-14 21:23:55 -05:00
Wilson Snyder
393b7714c4
Convert some mis-syntax errors to UNSUPPORTED
2023-02-14 20:48:52 -05:00
Wilson Snyder
43d8de4f80
Support property var decls.
2023-02-14 20:44:14 -05:00
Wilson Snyder
94ef1b76d0
Fix error text on packed struct init.
2023-02-13 20:58:49 -05:00
Wilson Snyder
5064ec2806
Support type case and type equality comparisons.
2023-02-12 20:09:10 -05:00
Wilson Snyder
d9c4d9316f
Parse checkers as UNSUPPORTED.
2023-02-11 14:31:28 -05:00
Wilson Snyder
e9441cff50
Parse external constraints as UNSUPPORTED.
2023-02-11 13:29:52 -05:00
Wilson Snyder
daa545774e
Parse randsequence as UNSUPPORTED.
2023-02-11 13:03:10 -05:00
Wilson Snyder
eb5aad94f1
Support to packed array
2023-02-05 10:18:03 -05:00
github action
00f0027c80
Apply 'make format'
2023-02-03 13:48:46 +00:00
Joseph Nwabueze
c8be50d40b
Add /*verilator public[flat|flat_rd|flat_rw| ]*/ metacomments ( #3894 )
2023-02-03 08:47:55 -05:00
Wilson Snyder
4208db7811
Support multiple-output buf/not gate primitives
2023-01-28 23:20:48 -05:00
Wilson Snyder
248bd173d3
Support interface classes and class implements.
2023-01-28 18:06:37 -05:00
Wilson Snyder
8d2be855f5
Internals: Parsing and tests for class interfaces
2023-01-28 16:30:47 -05:00
Wilson Snyder
ba8700f99d
Support $changed_gclk, $fell_gclk, $rose_gclk, $stable_gclk
2023-01-28 14:05:26 -05:00
Wilson Snyder
f20997a2f0
Support global clocking and $global_clock.
2023-01-28 12:31:52 -05:00
Ryszard Rozak
b56e7f6910
Support static function variables ( #3830 )
2023-01-23 08:35:10 -05:00
github action
6cd26edb64
Apply 'make format'
2023-01-18 16:48:16 +00:00
Gökçe Aydos
956fd89b87
Support import/export lists in modport ( #3886 )
2023-01-18 11:46:51 -05:00
Wilson Snyder
1d2293b783
Fix some indents of warnMore
2023-01-05 17:59:51 -05:00
Wilson Snyder
b24d7c83d3
Copyright year update
2023-01-01 10:18:39 -05:00
Wilson Snyder
fde380868a
Fix misc memory leaks
2022-12-29 13:59:24 -05:00
Larry Doolittle
80a144797d
Commentary: Fix more spelling ( #3828 )
2022-12-26 10:30:41 +01:00
Wilson Snyder
c0499da28b
Spelling fixes
2022-12-23 11:32:38 -05:00
Krzysztof Bieganski
bb44d4e4f2
Support clocking blocks ( #3674 )
2022-12-23 07:34:49 -05:00
Aleksander Kiryk
c2b09e35f8
Support unpacked structs ( #3802 )
2022-12-20 19:22:42 -05:00
Wilson Snyder
a0e7930036
docs: Fix spelling
2022-12-09 22:39:41 -05:00
Wilson Snyder
ea1b141d13
Support probablity distribution functions.
2022-12-04 17:30:51 -05:00
Wilson Snyder
42e4e18ec8
Support multiple $dumpvar identifiers
2022-11-30 18:13:57 -05:00
Krzysztof Bieganski
68e1b473e2
Support `std::semaphore` and typed `std::mailbox` ( #3708 )
...
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-11-28 16:53:55 +01:00
Wilson Snyder
f4be3d5d2b
Fix empty string literals converting to string types ( #3774 ).
2022-11-27 13:28:57 -05:00
Wilson Snyder
0af02563ca
Internals: Fix verilog.y style
2022-11-21 20:22:13 -05:00
Wilson Snyder
b82ce5743b
Internals: Fix verilog.y style
2022-11-21 08:30:40 -05:00
Wilson Snyder
d3c1f4353e
Fix float parameters without parens
2022-11-21 06:48:13 -05:00
Wilson Snyder
2eed4452ad
Internals: Fix constructor style.
2022-11-20 20:13:55 -05:00
Geza Lore
3abb65d732
Strengthen AstNode types to AstNodeExpr
...
Declare every AstNode children and variables as AstNodeExpr where we
statically know this is the appropriate sub-type.
2022-11-20 19:31:28 +00:00
Wilson Snyder
aacb38b776
Support assignment expressions.
2022-11-19 15:23:37 -05:00
Wilson Snyder
e8a1e4745c
Support $stacktrace
2022-11-17 19:12:54 -05:00
Wilson Snyder
3c77c7bb92
Support and
2022-11-16 21:10:54 -05:00
Wilson Snyder
818347f99b
Internals: Fix some unnecessary member paddings. No functional change intended.
2022-11-13 09:26:46 -05:00
Wilson Snyder
4f50073feb
Internals: Fix constructor style.
2022-11-12 19:51:03 -05:00
Wilson Snyder
a427860825
Support randcase.
2022-11-11 21:53:05 -05:00
Ryszard Rozak
a29d9469da
Fix jump handling in do while loops ( #3731 )
2022-11-08 20:01:08 -05:00
Geza Lore
65e08f4dbf
Make all expressions derive from AstNodeExpr ( #3721 ).
...
Apart from the representational changes below, this patch renames
AstNodeMath to AstNodeExpr, and AstCMath to AstCExpr.
Now every expression (i.e.: those AstNodes that represent a [possibly
void] value, with value being interpreted in a very general sense) has
AstNodeExpr as a super class. This necessitates the introduction of an
AstStmtExpr, which represents an expression in statement position, e.g :
'foo();' would be represented as AstStmtExpr(AstCCall(foo)). In exchange
we can get rid of isStatement() in AstNodeStmt, which now really always
represent a statement
Peak memory consumption and verilation speed are not measurably changed.
Partial step towards #3420
2022-11-03 16:02:16 +00:00
Ryszard Rozak
bac98df46b
Support named properties ( #3667 )
2022-11-01 18:53:47 -04:00
Wilson Snyder
79682e6072
Support empty generate_regions ( #3695 ). [mpb27]
2022-10-20 22:04:50 -04:00
Arkadiusz Kozdra
0e4da3b0bf
Support virtual interfaces ( #3654 )
2022-10-20 06:31:00 -04:00
Krzysztof Bieganski
22243d1e49
Support class type params without defaults ( #3693 )
2022-10-19 21:59:26 -04:00
Topa Topino
46c5764383
Split UNUSED warning into genvar, param, and signal warnings ( #3607 )
2022-10-17 19:51:13 -04:00
Krzysztof Bieganski
8a347248f5
Use `AstDelay` nodes for intra-assignment delays ( #3672 )
...
Also fix messy implementation of net delays.
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-10-14 09:35:26 +02:00
Krzysztof Bieganski
9c2ead90d5
Add custom memory management for verilated classes ( #3595 )
...
This change introduces a custom reference-counting pointer class that
allows creating such pointers from 'this'. This lets us keep the
receiver object around even if all references to it outside of a class
method no longer exist. Useful for coroutine methods, which may outlive
all external references to the object.
The deletion of objects is deferred until the next time slot. This is to
make clearing the triggered flag on named events in classes safe
(otherwise freed memory could be accessed).
2022-09-28 18:54:18 -04:00
Wilson Snyder
c6bce636ee
Merge branch 'master' into develop-v5
2022-09-27 22:19:04 -04:00
Wilson Snyder
75a70bee6d
Update to clang-format-14 on Ubuntu22.04
2022-09-27 21:47:45 -04:00
Geza Lore
95145038b4
Generate AstNode accessors via astgen
...
Introduce the @astgen directives parsed by astgen, currently used for
the generation child node (operand) accessors. Please see the updated
internal documentation for details.
2022-09-21 14:05:27 +01:00
Geza Lore
ce03293128
Generate AstNode accessors via astgen
...
Introduce the @astgen directives parsed by astgen, currently used for
the generation child node (operand) accessors. Please see the updated
internal documentation for details.
2022-09-21 13:56:03 +01:00
Geza Lore
7bc7b5372e
Merge branch 'master' into develop-v5
2022-09-17 16:12:28 +01:00
Geza Lore
7d88e63bab
astgen: generate type specific addNext, remove astNextNull
...
Generate type specific static overloads of Ast<Node>::addNext, which
return the correct sub-type of the 'this' they were invoked on.
Also remove AstNode::addNextNull, which is now only used in the parser,
implement in verilog.y directly as a template function.
2022-09-17 15:05:22 +01:00
Wilson Snyder
11b0d36ba2
Merge cleanups from 'develop-v5'. No functional change
2022-09-17 08:17:22 -04:00
Geza Lore
af305bf280
Merge branch 'master' into develop-v5
2022-09-16 16:24:36 +01:00
Wilson Snyder
2dc85a5acd
Internals: enum constructor cleanups. No functional change intended.
2022-09-15 19:58:10 -04:00
Geza Lore
27031ed688
Merge branch 'master' into develop-v5
2022-09-15 10:28:35 +01:00
Ryszard Rozak
a3c58d7b70
Support IEEE constant signal strengths ( #3601 ).
2022-09-14 07:39:27 -04:00
Geza Lore
fd6275a62b
Merge branch 'master' into develop-v5
2022-09-05 17:03:43 +01:00
Krzysztof Bieganski
6b6790fc50
Preserve return type of `AstNode::addNext` via templating ( #3597 )
...
No functional change intended.
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-09-05 16:56:57 +01:00
Geza Lore
2ecda74471
Merge branch 'master' into develop-v5
2022-08-31 10:45:18 +01:00
Aleksander Kiryk
2136afde6b
Support negated properties ( #3572 )
2022-08-30 06:33:42 -04:00
Aleksander Kiryk
24ec84851a
Support $sampled ( #3569 )
2022-08-29 08:39:41 -04:00
Krzysztof Bieganski
39af5d020e
Timing support ( #3363 )
...
Adds timing support to Verilator. It makes it possible to use delays,
event controls within processes (not just at the start), wait
statements, and forks.
Building a design with those constructs requires a compiler that
supports C++20 coroutines (GCC 10, Clang 5).
The basic idea is to have processes and tasks with delays/event controls
implemented as C++20 coroutines. This allows us to suspend and resume
them at any time.
There are five main runtime classes responsible for managing suspended
coroutines:
* `VlCoroutineHandle`, a wrapper over C++20's `std::coroutine_handle`
with move semantics and automatic cleanup.
* `VlDelayScheduler`, for coroutines suspended by delays. It resumes
them at a proper simulation time.
* `VlTriggerScheduler`, for coroutines suspended by event controls. It
resumes them if its corresponding trigger was set.
* `VlForkSync`, used for syncing `fork..join` and `fork..join_any`
blocks.
* `VlCoroutine`, the return type of all verilated coroutines. It allows
for suspending a stack of coroutines (normally, C++ coroutines are
stackless).
There is a new visitor in `V3Timing.cpp` which:
* scales delays according to the timescale,
* simplifies intra-assignment timing controls and net delays into
regular timing controls and assignments,
* simplifies wait statements into loops with event controls,
* marks processes and tasks with timing controls in them as
suspendable,
* creates delay, trigger scheduler, and fork sync variables,
* transforms timing controls and fork joins into C++ awaits
There are new functions in `V3SchedTiming.cpp` (used by `V3Sched.cpp`)
that integrate static scheduling with timing. This involves providing
external domains for variables, so that the necessary combinational
logic gets triggered after coroutine resumption, as well as statements
that need to be injected into the design eval function to perform this
resumption at the correct time.
There is also a function that transforms forked processes into separate
functions.
See the comments in `verilated_timing.h`, `verilated_timing.cpp`,
`V3Timing.cpp`, and `V3SchedTiming.cpp`, as well as the internals
documentation for more details.
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-08-22 13:26:32 +01:00
Krzysztof Bieganski
10cf492946
Add support for expressions in event controls ( #3550 )
...
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-08-19 20:18:38 +02:00
Geza Lore
1404319b28
Merge branch 'master' into develop-v5
2022-08-19 13:39:44 +01:00
Mostafa Gamal
df5f95a5bd
Fix nested default assignment for struct pattern ( #3511 ) ( #3524 )
2022-08-12 06:55:07 -04:00
Wilson Snyder
cbe1b8e266
Fix segfault exporting non-existant package ( #3535 ).
2022-08-08 17:53:50 -04:00
Geza Lore
ad2fbfe62d
Merge branch 'master' into develop-v5
2022-07-29 12:04:24 +01:00