Ryszard Rozak
bac98df46b
Support named properties ( #3667 )
2022-11-01 18:53:47 -04:00
Wilson Snyder
ecfa385f13
Test/cleanup endtable without table
2022-10-22 12:30:44 -04:00
Wilson Snyder
495d52d30f
Test and fix extra end_keywords
2022-10-22 12:17:56 -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
27031ed688
Merge branch 'master' into develop-v5
2022-09-15 10:28:35 +01:00
Wilson Snyder
d85b909054
Internals: Use std:: for mem and str functions.
2022-09-14 21:10:19 -04:00
Ryszard Rozak
a3c58d7b70
Support IEEE constant signal strengths ( #3601 ).
2022-09-14 07:39:27 -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
Wilson Snyder
71dedccbbe
Support compile time trace signal selection with tracing_on/off ( #3323 ).
2022-05-12 22:28:08 -04:00
Wilson Snyder
21e05c43dd
Removed the deprecated lint_off flag -msg; use -rule instead.
2022-01-17 16:04:06 -05:00
Geza Lore
f8c0169e82
Implement 'forceable' attribute
...
Using the 'forceable' directive in a configuration file, or the /*
verilator forceable */ metacomment on a variable declaration will
generate additional public signals that allow the specified signals to
be forced/released from the C++ code.
2022-01-16 15:31:37 +00:00
Wilson Snyder
ca42be982c
Copyright year update.
2022-01-01 08:26:40 -05:00
Wilson Snyder
04e0c7e4f1
Support tracing through --hierarchical/--lib-create libraries ( #3200 ).
2021-11-27 17:07:27 -05:00
Wilson Snyder
9029da5ab8
Add profile-guided optmization of mtasks ( #3150 ).
2021-09-26 22:51:11 -04:00
Wilson Snyder
43ecaec9a0
Internal C++11 flex cleanups. No functional change intended.
2021-07-24 12:49:07 -04:00
Wilson Snyder
bdceb08963
Internals: Fix off-by-one #line.
2021-07-10 07:11:34 -04:00
Wilson Snyder
bd602d0e2d
Copyright year update
2021-01-01 10:29:54 -05:00
Wilson Snyder
0abf18f618
Fix supporting begin_keywords 1364-2001-noconfig
2020-12-16 18:40:45 -05:00
Wilson Snyder
665e8edaff
Support $monitor and $strobe.
2020-11-29 11:31:38 -05:00
Wilson Snyder
6dfce882a1
Support $exit as alias of $finish
2020-11-10 22:49:48 -05:00
Wilson Snyder
069eb97eca
SystemC 2.3.0 or newer (SYSTEMC_VERSION >= 20111121) is now required.
2020-08-29 10:45:47 -04:00
Wilson Snyder
1dce6b2500
Support $stable
2020-08-23 11:34:19 -04:00
Wilson Snyder
f4a72946eb
Support $urandom, $urandom_range without stability.
2020-08-23 08:42:50 -04:00
Yutetsu TAKATSUKASA
953a442827
Support hierarchical verilation using protect lib ( #2206 )
2020-08-15 09:43:53 -04:00
Peter Monsson
4a5e4b04f3
Support $rose and $fell. ( #2148 ) ( #2501 )
2020-08-14 07:37:10 -04:00
Peter Monsson
1280070abb
Support $stable ( #2488 )
2020-07-28 18:26:24 -04:00
Fan Shupei
04c96694e6
Add $writememb support ( #2450 )
2020-07-01 17:32:15 -04:00
Wilson Snyder
6de78d58fa
Add new UNSUPPORTED error code to replace most previous Unsupported: messages.
2020-06-09 19:20:16 -04:00
Wilson Snyder
b469feb44b
Fix some syntax error context by splitting internal parse and lex filelines
2020-06-07 13:45:50 -04:00
Wilson Snyder
466fd56d18
Move XML verilator tag handling into parser.
2020-06-07 13:09:18 -04:00
Wilson Snyder
1aaf3f3424
Internals: Rename parser functions called by lexer. No functional change intended.
2020-06-07 12:18:23 -04:00
Wilson Snyder
b5e4917405
Internals: Pass unconnected drive in parser token stream.
2020-06-07 12:08:12 -04:00
Wilson Snyder
140671300c
Internals: Pass parser celldefine state through FileLine. No functional change intended.
2020-06-07 11:58:53 -04:00
Wilson Snyder
820a4dbbdd
Internals: Pass fileline directly. No functional change intended.
2020-06-07 10:53:21 -04:00
Wilson Snyder
53d8ccd149
Internals: Move yyerror to parser. No functional change intended.
2020-06-07 10:31:42 -04:00
Wilson Snyder
418b36ea71
Internals: Pass fileline directly and avoid yyerror
2020-06-07 10:17:50 -04:00
Wilson Snyder
575c565e77
Internals: Refactor to decouple LinkDot from ParseImp. No functional change intended.
2020-06-07 08:23:01 -04:00
Wilson Snyder
01255082a6
Internals: Refactor to decouple LinkDot from ParseImp. No functional change intended.
2020-06-07 08:21:22 -04:00
Wilson Snyder
ae701e014d
Support --bbox-unsup parsing of for with multiple increments
2020-06-06 13:55:15 -04:00
Wilson Snyder
4862916f39
Support --bbox-unsup parsing of 'constraint', 'dist', 'solve'
2020-06-06 12:08:36 -04:00
Wilson Snyder
870ec27b73
Support --bbox-unsup parsing of 'randomize'
2020-06-06 11:22:48 -04:00
Wilson Snyder
a21947d887
Support --bbox-unsup parsing of 'with'
2020-06-06 11:11:23 -04:00
Wilson Snyder
1eaec2aa8a
Support --bbox-unsup of $cast
2020-06-06 09:30:11 -04:00
Wilson Snyder
da01810d98
Internals: Add UNSUP tokens from VParseBison and sort lists. No functional change.
2020-06-06 09:09:26 -04:00
Wilson Snyder
d15e3d93c4
Internals: Reindent and move parser code. No functional change.
2020-06-06 08:44:44 -04:00
Geza Lore
95534fa5c5
Remove unused headers ( #2389 )
2020-05-31 20:21:07 +01:00
Geza Lore
9712ceedd7
Internals: Remove empty statements. No functional change intended.
...
Remove stray semicolons, mostly by capturing them in macros accurately.
This removes a ton on lint warnings from CLion.
2020-05-30 19:13:18 +01:00
Wilson Snyder
fbc814b54a
Internal code coverage fixes
2020-05-29 19:35:54 -04:00
Wilson Snyder
57621a93ad
Internals: Move PLI errors into linker, and better test.
2020-05-23 11:55:34 -04:00
Wilson Snyder
3cb3b6c400
clang-format verilog.l. No functional change.
2020-05-21 19:46:21 -04:00
Wilson Snyder
c9e8a1cb4d
Commentary
2020-05-20 20:31:57 -04:00
Yossi Nivin
f9a0cf0cff
Support $countbits ( #2287 )
2020-05-10 14:27:22 -04:00
Wilson Snyder
72bd91c7f1
Support $isunbounded and parameter $. ( #2104 )
2020-05-07 21:12:58 -04:00
Wilson Snyder
8f64e4a76f
Support $root, #2150 .
2020-05-02 08:29:20 -04:00
Wilson Snyder
5e575f5906
Fix line numbers in tables.
2020-04-24 19:34:26 -04:00
Wilson Snyder
d4f7f5297a
Support IEEE time units and time precisions, #234 . ( #2253 )
...
Includes `timescale, $printtimescale, $timeformat.
VL_TIME_MULTIPLIER, VL_TIME_PRECISION, VL_TIME_UNIT have been removed
and the time precision must now match the SystemC time precision.
To get closer behavior to older versions, use e.g. --timescale-override
"1ps/1ps".
2020-04-15 19:39:03 -04:00
Wilson Snyder
15b40a97d9
Support `unconnected_drive
2020-04-09 23:26:03 -04:00
Wilson Snyder
a494ad5ec7
Support $ferror, #1638 .
2020-04-05 11:22:05 -04:00
Marco Widmer
7f9aa057bf
Support split_var in vit files ( #2219 )
2020-04-03 08:08:23 -04:00
Wilson Snyder
1ce360ed5b
Add SPDX license identifiers. No functional change.
2020-03-21 11:24:24 -04:00
Wilson Snyder
75ecad591a
Implement $displayb/o/h, $writeb/o/h, etc, Closes #1637 .
2020-03-05 21:49:25 -05:00
Wilson Snyder
30a33a6104
Add support for and , #2126 .
2020-03-01 21:39:23 -05:00
Wilson Snyder
4878fe3a1f
Add split_var metacomment to assist UNOPTFLAT fixes, #2066 .
2020-02-28 19:15:08 -05:00
Wilson Snyder
2576c136f6
Fix `pragma pedantic check to work with -E.
2020-02-01 22:03:18 -05:00
Wilson Snyder
2d195ebae5
Cleanup IEEE references.
2020-01-30 20:23:57 -05:00
Wilson Snyder
619214b48f
Support $sampled.
2020-01-26 13:38:15 -05:00
Wilson Snyder
68fa82fb14
Support $typename, and use to cleanup error messages.
2020-01-26 13:21:25 -05:00
Stefan Wallentowitz
fad465abf1
Add lint_off -match waivers ( #2102 )
...
* Add more directives to configuration files
Allow to set the same directives in configuration files that can also
be set by comment attributes (such as /* verilator public */ etc).
* Add support for lint messsage waivers
Add configuration file switch '-match' for lint_off. It takes a string
with wildcards allowed and warnings will be matched against it (if
rule and file also match). If it matches, the warning is waived.
Fixes #1649 and #1514
Closes #2072
2020-01-12 10:03:17 +01:00
Wilson Snyder
f23fe8fd84
Update copyright year.
2020-01-06 18:05:53 -05:00
Stefan Wallentowitz
b7665a88db
Rename msg to rule in configuration files ( #2080 )
...
Rename the -msg switch to -rule in configuration files as it is more
clear.
resolves #2068
2019-12-30 19:15:43 +01:00
Wilson Snyder
bacbb4cafd
Parse join_any/join_none still as unsupported.
2019-12-23 15:19:22 -05:00
Wilson Snyder
2cbfe99ad5
Parse all class constructs, as still unsupported.
2019-12-23 15:03:04 -05:00
Wilson Snyder
f514049c04
Add cleaner error on version control conflicts in sources.
2019-12-16 21:54:20 -05:00
Wilson Snyder
460e0541f3
Add error when `resetall inside module
2019-12-14 22:04:58 -05:00
Wilson Snyder
2a1c57ada6
With -Wpedentic, warn about bad `pragma
2019-12-14 10:13:38 -05:00
Wilson Snyder
39950d16d0
Ignore `uselib to end-of-line, bug1634.
2019-12-12 20:57:48 -05:00
Wilson Snyder
df192f2b61
Support / with warning.
2019-11-23 09:16:06 -05:00
Wilson Snyder
f134ac4f2f
Black box some additional unsupported constructs.
2019-11-17 09:01:41 -05:00
Wilson Snyder
c36d9a68f5
Support $ungetc.
2019-11-16 12:55:10 -05:00
Wilson Snyder
8c5aa21a11
Support $rewind.
2019-11-16 12:21:35 -05:00
Wilson Snyder
47b5e36e60
Add -Wpedantic for compliance testing.
2019-11-16 11:59:21 -05:00
Wilson Snyder
b1c14e485a
Fix capital S signed numbers.
2019-11-16 09:39:41 -05:00
Wilson Snyder
5811ec07e6
Update URLs to https://verilator.org
2019-11-07 22:33:59 -05:00
Wilson Snyder
a1405dac8e
Fix misc bad-syntax crashes, bug1532.
2019-09-30 18:50:27 -04:00
Wilson Snyder
314cd92129
Support $fseek, $ftell, $frewind, bug1496.
2019-09-03 21:28:15 -04:00
Wilson Snyder
97561bf064
When showing an error, show source code.
2019-07-14 21:42:03 -04:00
Wilson Snyder
173efbc829
Offer suggestions on bad identifier errors.
2019-07-14 10:08:53 -04:00
Wilson Snyder
83cf1882de
Quote reserved word messages, and related internal cleanups.
2019-07-11 20:49:35 -04:00
Wilson Snyder
13a20c5ee9
Internals: Fix inserted tabs.
2019-07-11 07:05:33 -04:00
Wilson Snyder
58dfe9d071
Internals: Detab and fix spacing style issues. No functional change.
...
When diff, recommend using "git diff --ignore-all-space"
When merging, recommend using "git merge -Xignore-all-space"
2019-07-11 06:57:49 -04:00
Wilson Snyder
94ed817897
Fix debug over-verbosity.
2019-06-12 19:11:26 -04:00
Wilson Snyder
dd8d5ef687
Internals: Move code out of verilog.l. No functional change.
2019-06-11 21:03:03 -04:00
Wilson Snyder
cfb05cd70a
Whitespace cleanup. No functional change.
2019-06-11 20:20:04 -04:00
Wilson Snyder
f6f8073058
Support logical equivalence operator <->.
2019-06-01 19:40:06 -04:00
Wilson Snyder
902ba752a3
Move many unsupported errors from lex to parser so can --bbox-unsup ignore them.
2019-05-31 21:05:50 -04:00
Wilson Snyder
a58e7d94ec
Error continuation lines no longer have %Error prefix.
2019-05-30 20:30:59 -04:00
Wilson Snyder
b83b606267
Internals: Detab and fix spacing style issues. No functional change.
...
When diff, recommend using "git diff --ignore-all-space"
When merging, recommend using "git merge -Xignore-all-space"
2019-05-19 16:13:13 -04:00
Wilson Snyder
7777d10e9b
Tests: Check for and remove trailing newlines
2019-05-13 19:47:52 -04:00
Wilson Snyder
7bf3366041
Support .
2019-03-07 20:56:53 -05:00