Commit Graph

343 Commits

Author SHA1 Message Date
Aliaksei Chapyzhenka 2b91d764b5
Added missing #include <memory> (#3392)
Fixes #3390
2022-04-23 20:11:46 +01:00
Wilson Snyder f5f4e15ce2 Fix filenames with dots overwriting debug .vpp files (#3373). 2022-04-10 10:33:16 -04: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
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
Xi Zhang 14d24213a8
Support LoongArch ISA multithreading (#3353) (#3354) 2022-03-17 09:04:47 -04:00
Wilson Snyder c61258c0d0 Commentary (#3351) 2022-03-14 09:10:03 -04:00
Drew Ranck 90fb2e5487
Fix ++/-- tree fix in case statements (#3346) (#3349). 2022-03-12 11:24:32 -05:00
Chuxuan Wang a9cb9bac21
Commentary in docs/guide/connecting.rst (#3345) 2022-03-09 03:57:55 -05:00
Wilson Snyder 321880f5a6 Add trace dumpvars() call for selective runtime tracing (#3322). 2022-03-05 15:44:32 -05:00
Larry Doolittle c2d18d8ae4
Commentary: More minor spelling fixes in docs/guide/*.rst (#3331) 2022-03-01 22:07:12 -05:00
Larry Doolittle 72a3c756ad
Commentary: Minor spelling fixes in docs/guide/*.rst (#3327) 2022-02-27 10:01:44 +00:00
Jamie Iles b6ca2a42f2
Fix FST traces to include vector range (#3296) (#3297) 2022-02-26 12:52:24 -05:00
Raynard Qiao 331c2244fc
Fixed signed number operation (#3294) (#3308) 2022-02-16 00:10:34 -05:00
Wilson Snyder 046896e60a Commentary 2022-02-09 21:56:22 -05:00
Guokai Chen 818aaa8b89
Fix macOS arm64 build by excluding x86 only cpuid header (#3285) (#3291)
Signed-off-by: Guokai Chen <chenguokai17@mails.ucas.ac.cn>
2022-01-23 09:15:09 -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
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
HungMingWu 78147ee8d7 Fix compile error at GCC11
Fixes #3273

Signed-off-by: HungMingWu <u9089000@gmail.com>
2022-01-08 10:40:51 +00:00
Wilson Snyder e6857df5c6 Internals: Rename Ast on non-node classes (#3262). No functional change.
This commit has the following replacements applied:

	s/\bAstUserInUseBase\b/VNUserInUseBase/g;
        s/\bAstAttrType\b/VAttrType/g;
        s/\bAstBasicDTypeKwd\b/VBasicDTypeKwd/g;
        s/\bAstDisplayType\b/VDisplayType/g;
        s/\bAstNDeleter\b/VNDeleter/g;
        s/\bAstNRelinker\b/VNRelinker/g;
        s/\bAstNVisitor\b/VNVisitor/g;
        s/\bAstPragmaType\b/VPragmaType/g;
        s/\bAstType\b/VNType/g;
        s/\bAstUser1InUse\b/VNUser1InUse/g;
        s/\bAstUser2InUse\b/VNUser2InUse/g;
        s/\bAstUser3InUse\b/VNUser3InUse/g;
        s/\bAstUser4InUse\b/VNUser4InUse/g;
        s/\bAstUser5InUse\b/VNUser5InUse/g;
        s/\bAstVarType\b/VVarType/g;
2022-01-02 14:03:20 -05:00
Wilson Snyder 84ee833ea7 Ignore --x-initial unique inside classes. 2022-01-02 12:26:10 -05:00
Wilson Snyder ca42be982c Copyright year update. 2022-01-01 08:26:40 -05:00
Adrien Le Masle c3f17ce2c4
Fix VL_STREAML_FAST_QQI with 64 bit left-hand-side (#3232) (#3235) 2021-12-09 17:30:04 -05:00
Wilson Snyder 04e0c7e4f1 Support tracing through --hierarchical/--lib-create libraries (#3200). 2021-11-27 17:07:27 -05:00
Michaël Lefebvre 9bda2cb4ad
Fix some SliceSels not being constants (#3186) (#3218). 2021-11-26 10:51:11 -05:00
Julie Schwartz a14394dbb5
Commentary: remove duplicate/wrong change-log entry (#3212) 2021-11-18 05:15:02 -05:00
Wilson Snyder 96b7831243 Commentary: C++14 moves to 2023. 2021-11-17 18:56:11 -05:00
Wilson Snyder cff9f8143e Commentary 2021-11-17 07:06:43 -05:00
Wilson Snyder 899de9a282 Add --lib-create, similar to --protect-lib but without protections (#3200). 2021-11-14 09:39:31 -05:00
Wilson Snyder 4b593f8eb3 Commentary 2021-11-14 09:01:03 -05:00
Wilson Snyder b95ee84343 Commentary 2021-11-13 10:41:00 -05:00
Teng Huang fdbf465eda
Fix array method names with parens (#3181) (#3183) 2021-10-26 12:20:45 -04:00
Wilson Snyder 4ef37d9411 Commentary 2021-10-25 19:53:41 -04:00
Wilson Snyder ef7759a522 Commentary re: WSL2 2021-10-19 20:34:13 -04:00
Zhanglei Wang 1c1c805b07
Fix internal error on bad widths (#3140) (#3145) 2021-09-28 07:28:02 -04:00
Wilson Snyder 9029da5ab8 Add profile-guided optmization of mtasks (#3150). 2021-09-26 22:51:11 -04:00
Wilson Snyder 8ab51dbf22 Verilator_gantt: remove ASCII graphics 2021-09-24 08:48:20 -04:00
Wilson Snyder c2819923c5 Verilator_gantt now shows the predicted mtask times, eval times, and additional statistics. 2021-09-23 22:59:36 -04:00
Keith Colbert 0defb61a18
Fix --waiver-output for multiline warnings (#2429) (#3141) 2021-09-22 07:42:59 -04:00
Wilson Snyder 0fc805202c Commentary (#3139) 2021-09-21 18:15:56 -04:00
Wilson Snyder 76681fd931 Commentary 2021-09-17 20:18:47 -04:00
Wilson Snyder 2418df7bb2 Commentary 2021-09-17 20:03:45 -04:00
Wilson Snyder 81fd3e4732 Commentary 2021-09-13 15:47:03 -04:00
Wilson Snyder 4b274a8d4d Convert verilator_gantt to python 2021-09-08 08:16:31 -04:00
Wilson Snyder 35eac0c457 Commentary: Fix profcfunc naming. 2021-09-05 11:33:20 -04:00
Iru Cai 4ed00c563c
Support displaying x and z in $display task (#3107) (#3109) 2021-09-02 08:10:52 -04:00
Daniel Bates a49bfe871c
Docs: Fix typo in coverage instructions (#3111) 2021-09-02 07:41:10 -04:00
Ivan Vnučec 8f527a0c6e
Commentary (#3102)
Actually you can see `https://github.com/verilator/verilator` URL in your browser.
2021-08-18 15:19:02 -04:00
Geza Lore cdeb6e792f Add --instr-count-dpi option, change default to 200
This replaces the former static AstNode::INSTR_COUNT_DPI, and makes it
user adjustable to fit the design.

Fixes #3068.
2021-07-25 16:40:12 +01:00
Steven Hugg 18b0f6387d
Add XML ccall, constpool, initarray, and if/while begins (#3080)
* EmitXml: Added <ccall>, <constpool>, <initarray>/<inititem>, wrapped children of <if> and <while> with <begin> elements to prevent ambiguity
* EmitXml: added signed="true" to signed basicdtypes
2021-07-24 21:06:06 -04:00
Wilson Snyder b90fce55f4 Includes: Refactor verilated.h and deprecate verilated_heavy.h (#2701). 2021-07-24 10:00:33 -04:00
Geza Lore 8073e8bb46 Fix typo 2021-07-11 16:52:02 +01:00
Wilson Snyder a8168d5d62 Commentary 2021-07-11 09:46:00 -04:00
Wilson Snyder e6b75f752b Commentary 2021-07-09 17:46:11 -04:00
Wilson Snyder 8e2ba6a003 Version bump 2021-07-07 20:43:07 -04:00
Wilson Snyder 3aa6332f25 Fix Codacy warnings. No functional change. 2021-07-07 19:42:49 -04:00
Wilson Snyder 36599133bf Add --prof-c to pass profiling to compiler (#3059). 2021-07-07 19:12:52 -04: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
Felix Yan 2cdf0aae72
Commentary: Correct a typo in configure.ac (#3045) 2021-06-28 23:18:14 -04:00
Geza Lore ec1c112791
Remove deprecated --inhibit-sim (#3035) 2021-06-21 12:38:42 -04:00
Geza Lore 9eafca5e28
Remove deprecated --no-relative-cfuncs (#3024) 2021-06-16 23:17:43 -04:00
Geza Lore c75a686081
Internals: Update to clang-format-11 (#3021) 2021-06-14 14:50:40 -04:00
Wilson Snyder 9d3e800311 Commentary 2021-06-13 12:03:53 -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
Geza Lore 0edf1f0c94
Add ccache-report target to standard Makefile (#3011)
Using the standard model Makefile, when in addition to an explicit
target, the target 'ccache-report' is also given, a summary of ccache
hits/misses during this invocation of 'make' will be prited at the end
of the build.
2021-06-07 00:56:30 +01:00
Wilson Snyder 1e89392e76 Add --expand-limit argument (#3005). 2021-06-06 10:27:01 -04:00
Martin Schmidt b0c1ac7ea2
Add support of --trace-structs parameter for CMake (#2986) 2021-06-06 09:27:44 -04:00
Miodrag Milanović fa063574d0
Fix Makefiles to support Windows EXEEXT usage (#3008). 2021-06-04 12:04:55 -04:00
Wilson Snyder fb561d925a Commentary (#2996) 2021-06-03 21:19:11 -04:00
Wilson Snyder 63782556ae Internals: Fix some pylint warnings 2021-05-21 20:47:53 -04:00
Wilson Snyder aba3883092 Commentary on MULTIDRIVEN (#2972). 2021-05-19 08:14:14 -04:00
Geza Lore 38cab569ed
Add --reloop-limit argument (#2960)
Add --reloop-limit argument
2021-05-15 18:04:40 +01:00
Wilson Snyder 88fed4bc2f Commentary on traces (#2925) 2021-05-13 18:57:39 -04:00
Ameya Vikram Singh a4ab3e12f6
Update latest C++ Standard Compilation flag (#2951)
For SystemC Project sets the CXX_STANDARD flag from SystemC CMake build config.
2021-05-13 14:26:53 -04:00
Jonathan Drolet 2bf248bf60
Add TRACE_THREADS to CMake (#2934) 2021-05-08 08:18:08 -04:00
Udi Finkelstein 422c076fec
Support ignoring "`pragma protect ..." (#2886)
This support code merely adds the capability to skip over the encrypted
parts. Many models have unencrypted module interfaces with ports, and
only encrypt the critical parts.
2021-04-26 18:16:24 -04:00
Graham Rushton 6660627558
Fix concat of long hashed names in traces etc (#2854) 2021-04-20 09:08:29 -04:00
Wilson Snyder c443e229ee Fix URL references. 2021-04-18 11:52:29 -04:00
David Metz f5ad5cf034
Fix dumping waveforms to multiple FST files (#2889) 2021-04-14 16:52:14 -04:00
Wilson Snyder f579e55706 Commentary 2021-04-13 20:19:08 -04:00
Wilson Snyder 4c2a9aac4c Docs: Fix make html rule 2021-04-13 09:01:22 -04:00
Wilson Snyder ac26d5889f Fix whitespace 2021-04-11 22:22:43 -04:00
Wilson Snyder 8fcf9da1ad Docs: Move html generation to single directory 2021-04-11 21:49:48 -04:00
Wilson Snyder 136468ca78 Docs: fix unicode arrows 2021-04-11 21:49:27 -04:00
Wilson Snyder 62b528c2e3 Fix duplicate figures in sphinx docs 2021-04-11 21:14:25 -04:00
Wilson Snyder ee875d0166 Fix edit-on-git in sphinx docs 2021-04-11 20:52:40 -04:00
github action 04ebba8667 Apply clang-format 2021-04-12 00:39:38 +00:00
Wilson Snyder a9bd112e0c Fix version number in doc guide 2021-04-11 20:38:37 -04:00
Wilson Snyder adce7ecf4b Documentation has been rewritten into a book format. 2021-04-11 18:55:06 -04:00
Wilson Snyder 7242ceb998 Remove old TODO 2021-04-06 18:07:28 -04:00
Wilson Snyder 961a2fef61 Some minor preliminary docs reorg 2021-04-04 22:05:44 -04:00
Udi Finkelstein 0ea5af40c5
Add PINNOTFOUND warning in place of "Pin not found" error (#2868) 2021-04-01 18:17:42 -04:00
Wilson Snyder 93eabb83b2 Cleanup some python warnings. No functional change. 2021-03-20 17:37:24 -04:00
Wilson Snyder ba1f53a070 Improve DEFPARAM warning text. 2021-03-14 20:37:50 -04:00
Wilson Snyder 50866e470a Commentary: Convert Changes to RST format 2021-03-14 14:12:58 -04:00
Wilson Snyder c99f01b7fe Converted Asciidoc documentation into reStructuredText (RST) format. 2021-03-12 13:52:47 -05:00
Drew Taussig 3651321679
Fix for MSVC++ compile error (#2831) (#2833) 2021-03-11 13:30:23 -05:00
Wilson Snyder caa9c99837 Commentary 2021-03-07 08:28:13 -05:00
David Turner e81abdb616
Fix slice-assign overflow bug (#2803) (#2811) 2021-03-01 18:20:56 -05:00
Wilson Snyder 48986ccdeb Remove VL_TIME_I, rarely/never used and too little precision. 2021-02-21 21:56:43 -05:00
Andreas Kuster 99c02419c0
Commentary - contributors. (#2801) 2021-02-21 08:22:52 -05:00
Àlex Torregrosa e77e4e1fe6
Improve struct scopes when dumping structs to VCD (#2776) 2021-02-03 14:40:21 -05:00
Morten Borup Petersen 843ae2955e
Commentary on incorrectly specified debug level (#2777)
As seen at https://github.com/verilator/verilator/blob/master/src/V3Options.cpp#L1202
setting --debug enables a debug level of 3.
2021-02-03 14:38:34 -05:00
Samuel Riedel 483516ce4e
Fix build to execute vlcovgen with python3. (#2773) 2021-01-28 15:01:33 -05:00
Pierre-Henri Horrein 3c849d7ce0
Generate SELRANGE instead of errors for potentially unreachable code (#2625) (#2754)
When using a "if" statement inside an always block, part of the code may
be unreachable. This can be used to avoid errors, but it generated an
error, this commit demotes this to a warning. Partly fixes #2625.
2021-01-15 07:31:48 -05:00
Paul Wright 769c0fa318
Fix to ignore coverage on real ports (#2741) (#2745) 2021-01-10 12:40:03 -05:00
Wilson Snyder bd602d0e2d Copyright year update 2021-01-01 10:29:54 -05:00
Wilson Snyder b8b9170f9d Remove Unix::Processors dependency 2020-12-23 16:07:14 -05:00
Nandu Raj 1124829500
Fix $urandom_range maximum value (#2723) 2020-12-22 07:52:38 -05:00
HyungKi Jeong 36f41e08a5
Fix to allow inheriting 'VerilatedVcdFile' class. (#2720) 2020-12-20 12:18:09 -05:00
Wilson Snyder 457e926168 Use yapf3 and add to CI 2020-12-18 22:54:06 -05:00
Unai Martinez-Corral 9a32158b5e
CI: Cleanup ci/coverage to use a matrix to define coverage jobs (#2682)
* contributors: add Unai Martinez-Corral

* ci/coverage: use a matrix to define coverage jobs
2020-12-10 11:15:30 -05:00
Wilson Snyder b15dd3f898 Commentary 2020-12-10 09:06:01 -05:00
Wilson Snyder af0e535015 Internals: Remove Xnor node type.
Convert to Not(Xor(x)) up front, to help code coverage and optimize out extra nots sooner.
2020-12-10 00:04:10 -05:00
Wilson Snyder 80564a8f89 Remove vgen test to avoid Bit::Vector for testing. 2020-12-02 20:06:07 -05:00
Wilson Snyder cf09a9b6d2 Commentary 2020-11-24 18:45:36 -05:00
Krzysztof Bieganski 7c4259bc0a
Support static methods and typedefs in classes (#2615) 2020-11-06 19:51:21 -05:00
Kaleb Barrett 1c2384cb3d
Fix iteration over mutating list bug in VPI impl (#2588)
Previously, in any given VPI callback, if the callback body registered
the same callback, that registering would be processed in the currently
executing call to the call*Cbs function. In the worse case, this could
lead to an infinite loop.
2020-11-06 17:56:15 -05:00
Jean Berniolles 77ac9bfcc6
Fix WIFEXITED missing from MinGW/MSYS2 (#2609)
* WIFEXITED missing from MinGW/MSYS2, added defines

* Found source of the WIFEXITED macro in the binutils-gdb repo. Now with less pointer manipulation.
2020-10-27 13:33:25 -04:00
Marlon James 34b8ed4cf0
Return bool from callValueCbs() (#2589) (#2605)
* Return bool from callValueCbs()

Returns true if any registered callback was called, else false.

* Add test for callCbs() and callValueCbs()
2020-10-26 21:55:27 -04:00
Markus Krause 0a9ae154be
introduce define for FST tracing (#2592)
This is to allow C++ verilator toplevel to support
multiple modes of waveform tracing
VM_TRACE_FST can be used inside a #if VM_TRACE
section to switch between classic .vcd tracing and the
more compact .fst format supported by GTKWAVE
2020-10-10 21:17:39 -04:00
Rafal Kapuscik 7be343fd7c Support 'this' (#2585). 2020-10-08 07:54:01 -04:00
Wilson Snyder fb2d78520f Internals: Remove redundant initial clears. No functional change intended. 2020-10-07 19:43:08 -04:00
Wilson Snyder f8ab30d127 Commentary (#2575) 2020-09-28 08:45:50 -04:00
Victor Besyakov 222ca4b009 Tests: Add t_stream_integer_type (#2547) (#2548) (#2573) 2020-09-27 19:25:53 -04:00
James Pallister e3a1954e20
Fix hierarchical references used inside a function (#2267) (#2572) 2020-09-27 10:10:44 -04:00
Wilson Snyder 4266c789ce Commentary 2020-09-07 09:20:17 -04:00
Rupert Swarbrick aa39d020d8
Fix build with Bison 3.7 and newer (#2505) 2020-08-18 12:12:52 -04:00
Wilson Snyder ea9b65fe6d Hardcode VM_C11 as always need C++11 now 2020-08-16 15:10:43 -04:00
Edgar E. Iglesias 5d98035170
Fix sc names (#2500)
cint.mainInt(nodep) walks the tree and populates m_ctorVarsVec.
Reuse EmitCImp cint for the slow mainImp() emition steps to make sure
we emit constructor calls to setup SystemC sc_module names.
2020-08-13 08:23:02 -04:00
Josh Redford a18d8cbe86 Test for arrayed interfaces (#2469). 2020-07-15 17:58:59 -04:00
Piotr Binkowski a02c420064
Internals: separate AST class for program (#2467) 2020-07-15 07:39:58 -04:00
Marshal Qiao 25bbbbd37b Update Contributors (#2465) 2020-07-14 06:36:01 -04:00
Fan Shupei 04c96694e6
Add $writememb support (#2450) 2020-07-01 17:32:15 -04:00
Harald Heckmann 958654909f
Added perl-doc to optional apt packages (#2445) 2020-06-28 11:00:57 -04:00
Geza Lore 8d367dc8a3 Fix github links in documentation (#2443) 2020-06-24 11:09:49 +01:00
Geza Lore 23e4a0f784 Improve documentation 2020-06-20 05:17:46 +01:00
Conor McCullough f40f0464e2 Fix replaceMulShift optimization (#2413) 2020-06-11 07:42:25 -04:00
Wilson Snyder 5658cd3394 Commentary 2020-06-08 20:11:29 -04:00
Geza Lore 656c460605 Add --dump-tree-addrids developer option 2020-05-31 20:21:55 +01:00
Michael Killough 047852eb08
Fix OpenBSD make in tests. (#2388) 2020-05-31 09:03:51 -04:00
Wilson Snyder 35fc8b7259 Debug: Show column numbers in .tree files 2020-05-30 10:08:30 -04:00
Wilson Snyder 8ddafb4d9f Update contributors (from email) 2020-05-28 21:35:38 -04:00
Maciej Sobkowski 9d48ff7745
Support pre/postifx incrementation/decrementation in array index (#2223) 2020-05-28 18:08:15 -04:00
Wilson Snyder 373c9090d3 Update contributors (from email) 2020-05-26 19:12:19 -04:00
Wilson Snyder 7187b82d1d Update contributors (from email). 2020-05-25 13:36:24 -04:00