Commit Graph

1594 Commits

Author SHA1 Message Date
Wilson Snyder
941f96c913 Commentary 2021-07-07 17:59:22 -04:00
Geza Lore
2ebed755e6 V3Simulate: Avoid copying while managing free list.
V3Simulate reuses allocated AstConst nodes for efficiency, however this
used to be implemented in a way that required a deep copy of a
std::unorderd_map<_, std::deque<_>>, which was quite inefficient when it
grew large. The free list is now managed without any copying. This takes
the V3Table pass from taking 12s to 0.2s on SweRV EH1.
2021-07-05 17:07:33 +01:00
Geza Lore
af27702188 Fix type parameter resolution with hash collision.
We incorrectly treated two different struct types the same when passed
as an actual parameter to a `parameter type` parameter in an instance,
if the actual parameter expression both hash to the same value and the
structs have the same struct name. This is now corrected.

Fixes #3055.
2021-07-01 16:52:29 +01:00
Geza Lore
708abe0dd1 Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.

Please see the updated documentation for the model interface changes.
2021-06-30 16:35:40 +01:00
Geza Lore
ec1c112791
Remove deprecated --inhibit-sim (#3035) 2021-06-21 12:38:42 -04:00
Wilson Snyder
c11cd18491 In XML, show pinIndex information (#2877). 2021-06-19 13:41:41 -04:00
Wilson Snyder
8d737271ca Allow configure override of AR program (#2999). 2021-06-19 10:00:31 -04:00
Geza Lore
e5e5bc0fa3 Localize variables used in multiple functions
Teach V3Localize how to localize variables that are used in multiple
functions, if in all functions where they are used, they are always
written in whole before being consumed. This allows a lot more variables
to be localized (+20k variables on OpenTitan - when building without
--trace), and can cause significant performance improvement (OpenTitan
simulates 8.5% - build single threaded and withuot --trace).
2021-06-18 16:22:51 +01:00
Geza Lore
9eafca5e28
Remove deprecated --no-relative-cfuncs (#3024) 2021-06-16 23:17:43 -04:00
Wilson Snyder
13ddd0bc1c Fix error on unsupported recursive functions (#2957). 2021-06-13 12:38:31 -04:00
Geza Lore
c207e98306
Implement a distinct constant pool (#3013)
What previously used to be per module static constants created in
V3Table and V3Prelim are now merged globally within the whole model and
emitted as part of a separate constant pool. Members of the constant
pool are global variables which are declared lazily when used (similar to
loose methods).
2021-06-13 15:05:55 +01:00
Geza Lore
60d5f0e86b
Emit model implementation as loose methods. (#3006)
This patch introduces the concept of 'loose' methods, which semantically
are methods, but are declared as global functions, and are passed an
explicit 'self' pointer. This enables these methods to be declared
outside the class, only when they are needed, therefore removing the
header dependency. The bulk of the emitted model implementation now uses
loose methods.
2021-06-13 14:33:11 +01:00
Wilson Snyder
f0f68f42d1 devel release 2021-06-12 13:05:33 -04:00
Wilson Snyder
e3341e9a7c Verison bump 2021-06-12 12:36:03 -04:00
Wilson Snyder
b976b8dac9 Fix slowdown in elaboration (#2911). 2021-06-06 22:09:30 -04:00
Wilson Snyder
31bb73e3de Fix MCD close also closing stdout (#2931). 2021-06-06 19:32:48 -04:00
Wilson Snyder
1e89392e76 Add --expand-limit argument (#3005). 2021-06-06 10:27:01 -04:00
Wilson Snyder
9f5eb8f66e Commentary 2021-06-03 21:15:42 -04:00
Wilson Snyder
2143bcfad5 Fix constant function calls with uninit value (#2995). 2021-05-31 22:46:41 -04:00
Geza Lore
e1f9fffb42
Fix --protect-ids when using SV classes (#2994)
A few names were incorrectly mangled, which made --protect-ids produce
invalid output when certain SV class constructs were uses. Now fixed and
added a few extra tests to catch this.
2021-05-31 13:40:22 +01:00
Geza Lore
a44d2b2570 Move unreleased changes in right place in Changelog 2021-05-20 11:30:44 +01:00
Geza Lore
9699192de8
Don't merge bit select assignments in C code (#2971) 2021-05-18 14:28:48 -04:00
Geza Lore
38cab569ed
Add --reloop-limit argument (#2960)
Add --reloop-limit argument
2021-05-15 18:04:40 +01:00
Geza Lore
1422c23434
Split procedures to better respect --output-split-cfuncs (#2942)
CFuncs only used to be split at procedure (always/initial/final block),
which on occasion can still yield huge output files if they have large
procedures. This patch make CFuncs split at statement boundaries within
procedures. This has the potential to help a lot, but still does not
help if there are huge statements within procedures.
2021-05-11 07:44:07 -04:00
Geza Lore
f6c0108c86
Optimize large lookup tables to static data (#2926)
Implements #2925
2021-05-08 20:04:56 +01:00
Wilson Snyder
e68788d914 Fix initialization of assoc in assoc array (#2914). 2021-05-03 19:37:04 -04:00
Wilson Snyder
490f9f757d devel release 2021-05-03 19:37:04 -04:00
Wilson Snyder
15f7741eaf Version bump 2021-04-24 10:34:05 -04:00
Wilson Snyder
15802dadf1 Commentary 2021-04-24 09:23:53 -04:00
Wilson Snyder
dd0c2cac9b Fix V3Premit infinite loop on always read-and-write (#2898). 2021-04-21 09:21:06 -04:00
Wilson Snyder
2e9e4ae110 Add an URL on warnings to point to the manual's description. 2021-04-18 10:17:05 -04:00
Wilson Snyder
39d9ecfe51 Fix cmake version number (#2881) 2021-04-13 09:10:29 -04:00
Wilson Snyder
adce7ecf4b Documentation has been rewritten into a book format. 2021-04-11 18:55:06 -04:00
Wilson Snyder
e2c11cceb8 Fix select of with index variable (#2880). 2021-04-08 19:35:03 -04:00
Wilson Snyder
5658d7238d Commentary 2021-04-03 13:11:26 -04:00
Wilson Snyder
c62546c761 Add --coverage-max-width (#2853). 2021-03-29 18:54:51 -04:00
Wilson Snyder
e0808bcd15 Commentary 2021-03-26 23:05:04 -04:00
Wilson Snyder
4155de721b Fix Cygwin example compile issues (#2856). 2021-03-26 23:01:58 -04:00
Wilson Snyder
7ea014dab5 Fix false WIDTHCONCAT on casted constant (#2849). 2021-03-23 19:49:57 -04:00
Wilson Snyder
b6c393e9f0 Add VerilatedCovContext::forcePerInstance (#2793). 2021-03-19 22:24:00 -04:00
Wilson Snyder
96f9f8558b Mark --no-relative-cfuncs as scheduled for deprecation. 2021-03-17 18:59:45 -04:00
Wilson Snyder
c20bced485 Fix --output-split with class extends (#2839). 2021-03-17 18:25:54 -04:00
Wilson Snyder
dfab80fab1 Fix false TIMESCALEMOD on generate-ignored instances (#2838). 2021-03-16 22:52:29 -04:00
Wilson Snyder
26c0fa0a6a Fix --timescale-override not suppressing TIMESCALEMOD (#2838). 2021-03-16 22:42:28 -04:00
Wilson Snyder
12eb4e85ac Changed TIMESCALEMOD from error into a warning. (#2838) 2021-03-16 21:58:15 -04:00
Wilson Snyder
f79e59b226 Commentary 2021-03-16 21:17:55 -04:00
Wilson Snyder
8350c381c2 Add EOFNEWLINE warning when missing a newline at EOF. 2021-03-14 21:23:48 -04:00
Wilson Snyder
50866e470a Commentary: Convert Changes to RST format 2021-03-14 14:12:58 -04:00
Wilson Snyder
e6b19d557e Fix false $dumpfile warning on model save (#2834). 2021-03-14 09:08:17 -04:00
Wilson Snyder
6a189a1f81 Fix exceeding command-line ar limit (#2834). 2021-03-13 15:09:10 -05:00