Commit Graph

314 Commits

Author SHA1 Message Date
Wilson Snyder 97b21b3849 Parse 1800-2023 2024-03-02 10:15:19 -05:00
Wilson Snyder 91dd3c5fac Support 1800-2023 keywords. 2024-03-02 10:15:19 -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 e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Quentin Corradi 26e3785963
Fix PLI/DPI user defined system task/function grammar (#4587) (#4588)
According to 1800-2017 36.3, 1800-2017 A.9.3, 1364-2005 20.2 and 1364-2005 A.9.3, user defined system task and function identifiers can use the same character set for the second character as all the following characters.
2023-10-21 02:43:49 -04:00
Wilson Snyder 3914176bc4 Internals: Remove unused IGNORED to fix MSVC warning. No functional change intended. 2023-10-18 06:06:00 -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 9f75068059 Cleanup some error messages to properly quote 2023-09-23 08:52:50 -04:00
Wilson Snyder 7f49b6c102 Parse 'let' as unsupported 2023-04-16 17:23:16 -04:00
Wilson Snyder 36da6a3563 Fix parsing #1_2 delays 2023-03-15 21:22:28 -04:00
Wilson Snyder 39a5bce8a6 Parse covergroup, still unsupported. 2023-03-12 14:11:11 -04:00
Wilson Snyder 5489ec6eff Parse 'first_match', and still unsupported. 2023-03-11 11:08:37 -05:00
Wilson Snyder 5c5c758718 Parse 'wait_order' and test, still unsupported. 2023-03-11 10:47:08 -05:00
Wilson Snyder 81e8388c3f Parse 'expect', still unsupported. 2023-03-10 21:48:56 -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 329a933efd Internals: Parse nettype as unsupported 2023-03-04 10:50:28 -05:00
Wilson Snyder dd917d50eb Internals: Parse interconnect then say unsupported 2023-03-02 20:02:14 -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 daa545774e Parse randsequence as UNSUPPORTED. 2023-02-11 13:03:10 -05:00
Wilson Snyder 5aa4f46101 Internals: Add some std::. No functional change intended. 2023-02-10 20:32:39 -05:00
Joseph Nwabueze c8be50d40b
Add /*verilator public[flat|flat_rd|flat_rw| ]*/ metacomments (#3894) 2023-02-03 08:47:55 -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
Wilson Snyder b24d7c83d3 Copyright year update 2023-01-01 10:18:39 -05:00
Krzysztof Bieganski bb44d4e4f2
Support clocking blocks (#3674) 2022-12-23 07:34:49 -05:00
Wilson Snyder ea1b141d13 Support probablity distribution functions. 2022-12-04 17:30:51 -05:00
Wilson Snyder 749aab0a56 Support triple-quote blocks. 2022-11-17 20:38:01 -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
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