Wilson Snyder
530817191e
Support non-ANSI interface port declarations ( #3439 ).
2022-05-25 00:50:50 -04:00
Geza Lore
1282548a1c
Only consider definitions in t_flag_csplit
2022-05-20 18:02:00 +01:00
Krzysztof Bieganski
9edccfdffa
Initial support for intra-assignment timing controls, net delays ( #3427 )
...
This is a pre-PR to #3363 .
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-05-17 19:19:44 +01:00
Geza Lore
1a056f6db9
Fix invalid conditional merging when starting at 'c = c ? a : b'
...
Fixes #3409 .
2022-05-17 18:36:40 +01:00
Krzysztof Bieganski
0a91ddf38a
Tests: Better grep check in t_foreach ( #3435 )
...
This is a pre-PR to #3363 .
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-05-17 09:20:59 -04:00
Krzysztof Bieganski
67bb2c640e
Tests: Rename t_timing_clkgen to t_timing_clkgen1 ( #3430 )
...
This is a pre-PR to #3363 , which will introduce more clock gen tests.
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-05-17 09:19:51 -04:00
Krzysztof Bieganski
ecaa07a72a
Rename AstTimingControl to AstEventControl ( #3425 )
...
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-05-16 20:44:41 +01:00
Wilson Snyder
c3c46967dc
Tests: Appease sanitizer ( #3121 ).
2022-05-15 11:50:52 -04:00
Wilson Snyder
5aa12e9b51
Add assert when VerilatedContext is mis-deleted ( #3121 ).
2022-05-15 10:51:03 -04:00
Wilson Snyder
3c4131d45d
Fix 'with' operator with type casting ( #3387 ).
2022-05-15 09:53:48 -04:00
Wilson Snyder
ae8d8ee1ac
Fix crash with misuse of display.
2022-05-15 09:29:45 -04:00
Wilson Snyder
38438b3373
Internals: Cleanup some defaults. No functional change.
2022-05-12 23:30:39 -04:00
Wilson Snyder
71dedccbbe
Support compile time trace signal selection with tracing_on/off ( #3323 ).
2022-05-12 22:28:08 -04:00
Kamil Rakoczy
9378259779
Fix UNOPTFLAT warning from initial static var ( #3406 )
...
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2022-05-06 10:24:03 +02:00
Wilson Snyder
3d762282b9
Fix hang with large case statement optimization ( #3405 ).
2022-05-05 07:02:52 -04:00
Wilson Snyder
915ceb2d04
Tests: Untabify tests. No functional change.
2022-05-01 10:10:00 -04:00
Geza Lore
49c90ecbce
Issue consistent INITIALDLY/COMBDLY/BLKSEQ warnings
...
Some cases of warnings about the use of blocking and non-blocking
assignments in combinational vs sequential processes were suppressed in
a way that is inconsistent with the *actual* current execution model of
Verilator. Turning these back on to, well, warn the user that these might
cause unexpected results. V5 will clean these up, but until then err on
the side of caution.
Fixes #864 .
2022-04-29 17:05:44 +01:00
Kamil Rakoczy
5de1c619c8
Fix foreach segmentation fault ( #3400 ).
2022-04-28 06:11:31 -04:00
Yoda Lee
a6d678d41d
Fix hang in generate symbol references ( #3391 ) ( #3398 )
2022-04-27 18:40:36 -04:00
Geza Lore
62337bb6ac
Future proofing some tests. No functional change.
2022-04-23 15:12:52 +01:00
Geza Lore
0b74e9b354
Ensure topological ordering of module list.
...
At the end of V3Param, fix up the module list to be topologically
sorted. We need to do this at the end as a later instantiation of a
recursive module might instantiate an earlier specialization, which we
cannot know until we processed everything. The rest of the compiler
depends on the module list being topologically sorted.
Fixes #3393
2022-04-23 13:25:27 +01:00
Geza Lore
5f0e1fae7f
Simplify and clarify reporting of enclosing instance
...
Rename AstNodeModule::hierName -> someInstanceName and explain that this
is only used for user messages.
Rename AstNode::locationStr -> instanceStr and simplify implementation.
In particular, do not report an instance if we can't find a reasonable
guess.
2022-04-22 23:38:23 +01:00
Wilson Snyder
7bfc1a00a7
Fix tracing interfaces inside interfaces ( #3309 ).
2022-04-14 09:14:44 -04:00
Geza Lore
c79ea88576
Fix incorrect localization when encountering non-leaf functions.
...
Fixes #3286 .
2022-04-09 20:30:39 +01:00
Wilson Snyder
33105f017c
Commentary
2022-03-30 20:17:59 -04:00
Wilson Snyder
e02f97854c
Deprecate 'vluint64_t' and similar types ( #3255 ).
2022-03-27 15:27:40 -04:00
Wilson Snyder
960d0de361
Tests: Cleanup vluint_t/vlsint_t in tests, part of ( #3255 )
2022-03-27 15:03:25 -04:00
Wilson Snyder
31ce1fdfd3
Tests: Check legacy part of ( #3255 )
2022-03-27 14:50:49 -04:00
Wilson Snyder
9821381059
Tests: new t_lint_latch_5 test ( #2997 ).
2022-03-27 14:42:36 -04:00
Geza Lore
b1b5b5dfe2
Improve run-time profiling
...
The --prof-threads option has been split into two independent options:
1. --prof-exec, for collecting verilator_gantt and other execution
related profiling data, and
2. --prof-pgo, for collecting data needed for PGO
The implementation of execution profiling is extricated from
VlThreadPool and is now a separate class VlExecutionProfiler. This means
--prof-exec can now be used for single-threaded models (though it does
not measure a lot of things just yet). For consistency VerilatedProfiler
is renamed VlPgoProfiler. Both VlExecutionProfiler and VlPgoProfiler are
in verilated_profiler.{h/cpp}, but can be used completely independently.
Also re-worked the execution profile format so it now only emits events
without holding onto any temporaries. This is in preparation for some
future optimizations that would be hindered by the introduction of function
locals via AstText.
Also removed the Barrier event. Clearing the profile buffers is not
notably more expensive as the profiling records are trivially
destructible.
2022-03-27 15:57:30 +02:00
Geza Lore
c7440b250f
Validate integer run-time arguments
2022-03-26 22:58:47 +00:00
Wilson Snyder
38b2845e2a
Tests: Fix whitespace test and resulting fallout.
2022-03-26 15:41:32 -04:00
Drew Ranck
90fb2e5487
Fix ++/-- tree fix in case statements ( #3346 ) ( #3349 ).
2022-03-12 11:24:32 -05:00
Wilson Snyder
b5ce7d5982
Add VERILATOR_VERSION_INTEGER for determining API ( #3343 ).
2022-03-12 11:17:39 -05:00
Wilson Snyder
ef87d057fc
Fix $fscanf etc to return -1 on EOF ( #3113 ).
2022-03-07 17:43:33 -05:00
Yutetsu TAKATSUKASA
e29132377e
Fix driver.pl when expected value is 0 ( #3339 )
...
* Tests: use defined() to accept $expvalue==0
* Tests: Update expected stats of t_cast_huge in --vltmt mode
2022-03-06 14:43:28 +09:00
Yutetsu TAKATSUKASA
999751c422
Count non-empty always blocks in V3Split ( #3337 )
...
"Optimizations, Split always" in stats now means the number of newly added always.
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2022-03-06 12:56:34 +09:00
Wilson Snyder
22656d6fdd
Fix Vdeeptemp error with --threads and --compiler clang ( #3338 ).
2022-03-05 20:17:36 -05:00
Wilson Snyder
ef0c5fd772
Fix unnamedblk error on foreach ( #3321 ).
2022-03-05 17:05:22 -05:00
Wilson Snyder
90c61c79d6
Fix unnamedblk error on foreach ( #3321 ).
2022-03-05 17:04:52 -05:00
Wilson Snyder
4ba3bff87f
Fix class stringification on wide arrays ( #3312 ).
2022-03-05 16:32:30 -05:00
Wilson Snyder
c3dd6f5344
Fix public function arguments that are arrayed ( #3316 ).
2022-03-05 16:19:53 -05:00
Wilson Snyder
321880f5a6
Add trace dumpvars() call for selective runtime tracing ( #3322 ).
2022-03-05 15:44:32 -05:00
Geza Lore
3737d209f6
Keep recursive module list topologically ( #3324 ).
...
Fixes (#3324 ).
2022-03-05 15:04:13 +00:00
Todd Strader
29c4b0a141
Fix cast to array types ( #3333 )
2022-03-03 07:48:04 -05:00
Jamie Iles
b6ca2a42f2
Fix FST traces to include vector range ( #3296 ) ( #3297 )
2022-02-26 12:52:24 -05:00
Wilson Snyder
e52a4ac74f
Fix $readmem file not found to be warning not error ( #3310 ).
2022-02-19 10:04:12 -05:00
Geza Lore
decfa6bd7a
V3Order: Use unique ordinals per function name
...
This helps diffing generated code after reordering output, otherwise no
functional change.
2022-02-16 18:36:40 +00:00
github action
77fe7c426e
Apply 'make format'
2022-02-16 05:11:38 +00:00
Raynard Qiao
331c2244fc
Fixed signed number operation ( #3294 ) ( #3308 )
2022-02-16 00:10:34 -05:00
Wilson Snyder
77e68acf54
Suppress WIDTH warning on negate using carry bit ( #2395 ). [Peter Monsson]
2022-02-13 15:27:31 -05:00
Wilson Snyder
7a355d448a
Fix skipping public enum values with four-state values ( #3303 ).
2022-02-10 19:27:28 -05:00
Wilson Snyder
434c3c3ef3
Removed the deprecated "fl" attribute in XML output; use "loc" attribute instead.
2022-01-17 16:22:07 -05:00
Wilson Snyder
21e05c43dd
Removed the deprecated lint_off flag -msg; use -rule instead.
2022-01-17 16:04:06 -05:00
Wilson Snyder
48a098b041
Tests: Fix some force/release coverage holes.
2022-01-16 16:53: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
Geza Lore
539c9d4c63
Merge alternate 'force'/'release' implementation
...
- Add more tests, including for tracing.
- Apply some cleaner, more generic abstractions in the implementation.
- Use clearer AstRelease which is not an assignment.
2022-01-16 15:31:37 +00:00
Geza Lore
b4d8220cbb
Deprecate --cdc ( #3279 )
2022-01-16 15:30:44 +00:00
Wilson Snyder
5eded789aa
Fix test
2022-01-09 19:29:30 -05:00
Wilson Snyder
441ecfedc9
Internals: Make all .h files compilable
2022-01-08 11:18:23 -05:00
Yutetsu TAKATSUKASA
4e5f30858b
Fix #3258 of internal error with inout port ( #3268 )
...
* Tests: Modify t_tri_inout to reproduce #3258
* Set direction of __en accorting to its main signal direction
* Update Changes
2022-01-05 08:37:20 +09:00
Wilson Snyder
b989ac6db5
Internals: Support linking recursive function calls (but not later stages)
2022-01-03 18:50:41 -05:00
Wilson Snyder
4d1f4bbf49
Backout last commit; is unstable.
2022-01-03 13:04:47 -05:00
Wilson Snyder
e9ad665d32
Internals: Support linking recursive function calls (but not later stages)
2022-01-03 12:25:50 -05:00
Wilson Snyder
78052f87bd
Tests: Update recursive function tests
2022-01-03 12:02:53 -05:00
Wilson Snyder
2e2b82c052
Support class static members ( #2233 ).
2022-01-02 15:09:07 -05:00
Wilson Snyder
028737cde8
Tests: Add unsupported t_class_static_member tests.
2022-01-02 09:43:26 -05:00
Wilson Snyder
bf972963f4
Misc internal and test work towards enum type checks ( #726 ).
2022-01-01 22:16:58 -05:00
Wilson Snyder
e4c5eb5e69
Fix spurious UNUSED by ignoring inout pin connections ( #3242 ).
2022-01-01 18:37:34 -05:00
Wilson Snyder
2e8cc22c54
Copyright year update.
2022-01-01 18:34:15 -05:00
Wilson Snyder
655910d486
Fix associative array first method as statement ( #3228 ).
2022-01-01 17:10:26 -05:00
Wilson Snyder
d679d50eca
Fix $random not updating seed ( #3238 ). [Julie Schwartz]
2022-01-01 16:43:06 -05:00
Wilson Snyder
65de118e51
Internals: Factor common V3Width function.
2022-01-01 16:15:53 -05:00
Wilson Snyder
4cd56b1fb9
Use C++11 standard types for MacOS portability ( #3254 ) ( #3257 ).
2022-01-01 16:04:20 -05:00
Wilson Snyder
f3945e7c02
Tests: Add t_class_param_pkg test.
2022-01-01 14:30:41 -05:00
Wilson Snyder
5ef982b4b5
Fix internal error on reference to typedef'ed class
2022-01-01 13:48:53 -05:00
Wilson Snyder
f96d336b97
Internals: Pre-elaboration progress towards class parameters.
2022-01-01 12:50:43 -05:00
Wilson Snyder
0c3ffa1841
Support force/release ( #2491 ) ( #2593 ).
2022-01-01 12:24:19 -05:00
Wilson Snyder
ca42be982c
Copyright year update.
2022-01-01 08:26:40 -05:00
Wilson Snyder
8952aa59ff
Tests: Add force/release tests.
2021-12-31 15:17:16 -05:00
Wilson Snyder
2966f03042
Tests: Enumerations supported
2021-12-31 15:10:29 -05:00
Yutetsu TAKATSUKASA
0658a7654f
Add tests of tracing SystemC model verilated with --hierarchical ( #3252 )
...
* Tests: Add t_hier_block_sc_trace(fst|vcd) that tests tracing hierarchical block on SystemC.
* Add a check that elaboration is done before a trace file is opened.
* Add a check that elaboration is done before trace() is called to verilated SystemC model.
* Tests: call sc_core::sc_start(sc_core::SC_ZERO_TIME) before opening a trace file
* Tests: Fix t_trace_two_sc to call sc_start before opening trace
* Use vl_fatal as suggested in PR review.
2021-12-23 08:41:11 +09:00
Wilson Snyder
7526151670
Fix bad ending address on $readmem ( #3205 ).
2021-12-21 19:55:04 -05:00
Wilson Snyder
560b59f97f
Use C++11 standard types for MacOS portability ( #3254 ).
2021-12-21 13:18:05 -05:00
Geza Lore
1de2de4bde
Fix splitting of large _eval and related functions
...
Fix bug that only used to measure size of first statement in functions
to determine if splitting was necessary. Measure whole function instead.
2021-12-20 11:24:11 +00:00
Geza Lore
ff425369ac
Reduce .rodata footprint of trace initialization ( #3250 )
...
Trace initialization (tracep->decl* functions) used to explicitly pass
the complete hierarchical names of signals as string constants. This
contains a lot of redundancy (path prefixes), does not scale well with
large designs and resulted in .rodata sections (the string constants) in
ELF executables being extremely large.
This patch changes the API of trace initialization that allows pushing
and popping name prefixes as we walk the hierarchy tree, which are
prepended to declared signal names at run-time during trace
initialization. This in turn allows us to emit repeat path/name
components only once, effectively removing all duplicate path prefixes.
On SweRV EH1 this reduces the .rodata section in a --trace build by 94%.
Additionally, trace declarations are now emitted in lexical order by
hierarchical signal names, and the top level trace initialization
function respects --output-split-ctrace.
2021-12-19 15:15:07 +00:00
Yutetsu TAKATSUKASA
30ccccdb67
Support FST tracing in hierarchical verilation ( #3251 )
...
* Rename t_hier_block_trace -> t_hier_block_trace_vcd
* Add t_hir_block_trace_fst test
* Support FST dump with hierarchical verilation
2021-12-18 16:57:28 +09:00
Wilson Snyder
f775feb7f0
Fix foreach on dotted reference.
2021-12-12 20:43:15 -05:00
Wilson Snyder
aa8423ba46
Tests: Add t_class_param_mod.pl
2021-12-12 19:49:06 -05:00
Wilson Snyder
d753f36ebc
Internals: Add missing broken assertions & cloneTrees
2021-12-12 18:10:52 -05:00
Wilson Snyder
55976dbc25
Tests: Add t_class_param_nconst_bad test.
2021-12-12 15:26:29 -05:00
Wilson Snyder
6b0601fd54
Support lower dimension looping in foreach loops ( #3172 ).
2021-12-11 20:39:58 -05:00
Wilson Snyder
740fee660e
Fix associative array foreach loop ( #3229 ).
2021-12-11 18:38:23 -05:00
Wilson Snyder
984ee624ed
Fix break under foreach loop ( #3230 ).
...
Internals: Move Foreach handling into V3Width.
2021-12-11 15:06:33 -05:00
Adrien Le Masle
00ef0519f5
Fix top level parameter overwrite when a package has same parameter ( #3241 ) ( #3247 )
2021-12-11 14:55:59 -05:00
Wilson Snyder
59d170c6f8
Support up to 64 bit enums for .next/.prev/.name ( #3244 ).
2021-12-11 11:29:01 -05:00
Wilson Snyder
9a722ccf62
Internals: Cleanup of InitArray stuff. No functional change intended.
2021-12-11 11:22:04 -05:00
Wilson Snyder
748fa4cb80
Fix coredump after huge enum warning.
2021-12-10 23:08:03 -05:00
Wilson Snyder
694cf371f9
Tests: Always failing tests
2021-12-10 21:22:23 -05:00
Wilson Snyder
8696e38e6f
Primary inputs and outputs (VL_INW/VL_OUTW) now use VlWide type ( #3236 ).
2021-12-09 19:41:33 -05:00