Commit Graph

253 Commits

Author SHA1 Message Date
Geza Lore a1cd7d1f3a
Add 'make venv' target (#6775)
Fixes #6775
2025-12-14 11:18:32 +00:00
Wilson Snyder 24117bc599 Internals: Add format-bash make rule (not in automatic format) 2025-11-22 12:30:29 -05:00
Wilson Snyder 3ab21332c9 Internals: Add some missing Python files to lint 2025-11-22 12:22:39 -05:00
Wilson Snyder 86004fb582 Internals: Group the format makefile rules. No rule change. 2025-11-21 20:02:46 -05:00
Wilson Snyder 1d9c5c2c6b Fix determining Verilator revision when within git submodules without tags. 2025-11-03 18:36:20 -05:00
Wilson Snyder 2b8c9a1cff Internals: Remove mis-merged duplicate Makefile targets 2025-11-01 14:19:29 -04:00
Wilson Snyder cd8af21915 Add lint-py type checking using mypy 2025-11-01 14:15:39 -04:00
Wilson Snyder 782fe1daf2 Internals: Add more python strict typing. No functional change intended 2025-11-01 14:14:56 -04:00
Wilson Snyder 5847b105a5 Internals: Run format-make 2025-11-01 14:12:47 -04:00
Wilson Snyder 330b2589ed Internals: Run format-yaml 2025-11-01 14:11:47 -04:00
Wilson Snyder eae1e5bdf2 Internals/Tests: Cleanup some missing dev coverage items 2025-10-11 20:58:03 -04:00
Wilson Snyder 6e8bd3da19 Internals/Tests: Cleanup some missing dev coverage items 2025-10-11 12:54:55 -04:00
Wilson Snyder 802ba0c2bf Internals: Add assert to dev coverage exclusion 2025-10-09 22:33:04 -04:00
Geza Lore e63d486422 Internals: Fix coverage exclusion 2025-10-09 16:58:06 +01:00
Geza Lore 97707bdc72
CI: Run coverage job on 'pr: dev-coverage' label in PRs (#6527) 2025-10-07 17:03:13 +01:00
Geza Lore 540e042221 CI: Add ability to generate patch coverage reports 2025-10-04 17:53:18 +01:00
Geza Lore ce0a05691b
Internals: Improve coverage flow (#6526)
See addes "Code coverage" section in docs/internals.rst
2025-10-03 17:18:24 +01:00
Wilson Snyder ac2859bf24
Internals: Upgrade to clang-format-18 (#6333) 2025-08-25 20:47:48 -04:00
Wilson Snyder 997d5ecdf1 Internals: Cleanup cppcheck c casts. No functional change intended. 2025-08-21 20:06:43 -04:00
Geza Lore 92d47ca23a
Internals: Add separate cppcheck targets for whole components (#6318)
cppcheck provides best results when analysing the whole program. It also
has a builtin `-j` option to run on multiple threads.

Replace existing cppcheck-* targets with cppcheck-verilator,
cppcheck-runtime, cppcheck-example and cppcheck-vlc that checks each of
those components as a whole. Each of these runs on the maximum available
logical processors on the host by default, as reported by `nproc`, but
can be manually overridden with `make CPPCHECK_JOBS=<number>` instead.

The `make cppcheck` target runs the 4 cppcheck-* targets listed above
sequentially (but each of them uses the specified CPPCHECK_JOBS threads)
2025-08-20 13:49:59 -04:00
Wilson Snyder f71b8e6195 Internals: Fix up include/ cppcheck issues (#6311) 2025-08-19 21:36:52 -04:00
Geza Lore a0edd4e907
Internals: Improve cppcheck flow and fix up issues (#6311)
Added cppcheck-suppressions.txt in the repo root. You can add new
patterns in there instead of having to parse the XML output.

Also configure to add the -D__GNUC__ preprocessor macro, which makes it
understand UASSERT (it understands the 'noreturn' function attribute).

Added some case by case specific suppressions and fixed up other code,
especially in V3Ast*h and V3Dfg*.h, including code generated by astgen
that had some no-ops that irks cppcheck.

One thing it does not seem to like is `const` class members with default
initializers in the class. It will assume that's always the value, even
if overridden in the constructor. We had few so removed them.

With that a lot of files in `src/` are now clean or only have a handful
of issues. Therefore, I have also deleted cppcheck_filtered, and made it
produce human readable output straight to the terminal.

Regarding cleaning up the reported nits, I kind of got bored after
V3[A-E] so pausing here. Apologies for the merge conflicts.

Tested with cppcheck 2.13.0
2025-08-19 22:02:10 +01:00
Wilson Snyder 94b043d6c9 Internals: Print versions with `make format` 2025-07-16 17:25:22 -04:00
Wilson Snyder b914cda1c7 Internals: cppcheck cleanups. No functional change. 2025-06-28 12:29:41 -04:00
Wilson Snyder 993f65f3b4 Internals/CI: Format cmakefiles using mbake 2025-06-26 17:36:56 -04:00
Wilson Snyder 6cd0948c8c Internals: Standardize Makefile indents. No functional change intended. 2025-06-25 21:10:46 -04:00
Wilson Snyder 51545b36ca Internals: Add format-make rule and standardize Makefile indents. No functional change intended. 2025-06-24 17:58:55 -04:00
Wilson Snyder d0424862f9 Commentary: Changes update 2025-05-10 13:22:26 -04:00
Wilson Snyder 3ecd58460f Internals: Apply make format-json format-yaml. No functional change. 2025-04-16 07:34:57 -04:00
Wilson Snyder 0a860f151c Cleanup some missed `make clean` files 2025-03-30 11:02:05 -04:00
Wilson Snyder 19258ee18a Commentary 2025-01-03 10:00:56 -05:00
أحمد المحمودي 578d8d8391
Fix man pages whatis section (#5710) 2025-01-03 09:58:33 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Wilson Snyder 611567c385 Internals: add make format-c/format-py. No functional change. 2024-12-01 10:26:01 -05:00
Wilson Snyder e223228ec0 Fix installation of waiver file (#5607) 2024-11-12 22:41:05 -05:00
Geza Lore 55661e7f71
Install public executables into bindir instead of pkgdatadir (#5140) (#5544)
Instead of installing redirect scripts in to bindir, and real
executables in to pkgdatadir/bin, we now put the real executables into
bindir, and add redirect scripts into pkgdatadir/bin. (That is, we
redirect in the opposite direction as before).

This enables the same relocatable and testable installations as before
without putting architecture specific binaries into pkgdatadir, so
hopefully we now conform to the Linux Filesystem Hierarchy Standard.

This requires a small fixup in the installed `verilator` script to
hardcode the relative path between bindir and pkgdatadir.

Fixes #5140
2024-10-18 10:06:28 +01:00
Wilson Snyder a4085f3a06 Internals: Standardize format of CMake files with gersemi. No functional change intended. 2024-09-24 20:43:19 -04:00
Wilson Snyder 99a29acca0 CI: One-time yamlfix cleanups. No functional change intended. 2024-09-15 14:37:09 -04:00
Wilson Snyder 48a607cc78 Internals: Cleanup Makefile.in to commented sections. No functional change intended. 2024-09-15 13:55:43 -04:00
Wilson Snyder 3525484730 Commentary 2024-09-10 19:04:55 -04:00
Wilson Snyder 07bb8c701d
Convert test driver to Python (#5427) 2024-09-08 13:00:03 -04:00
Wilson Snyder d40f7f5167 Tests: Fix lint-py (last commit) 2024-08-27 05:31:40 -04:00
Wilson Snyder 17b70788df Internals: Run yapf3 in parallel 2024-08-26 21:53:36 -04:00
Wilson Snyder d3e07b6ad9 Internals: Always use parallel for make -j 4 clang-format yapf format-pl-exec
make[1]: Entering directory '/svaha/wsnyder/SandBox/homecvs/v4/verilator'
yapf3 -i bin/verilator_ccache_report bin/verilator_difftree bin/verilator_gantt bin/verilator_includer bin/verilator_profcfunc examples/json_py/vl_file_copy examples/json_py/vl_hier_graph docs/guide/conf.py docs/bin/vl_sphinx_extract docs/bin/vl_sphinx_fix src/astgen src/bisonpre src/config_rev src/cppcheck_filtered src/flexfix src/vlcovgen src/.gdbinit.py test_regress/t/*.pf nodist/clang_check_attributes nodist/code_coverage nodist/dot_importer nodist/fuzzer/actual_fail nodist/fuzzer/generate_dictionary nodist/install_test nodist/log_changes  nodist/code_coverage.dat
chmod a+x test_regress/t/*.pl
clang-format-14 -i ./include/verilated.cpp ./include/verilated_cov.cpp ./include/verilated_dpi.cpp ./include/verilated_fst_c.cpp ./include/verilated_fst_sc.cpp ./include/verilated_probdist.cpp ./include/verilated_profiler.cpp ./include/verilated_random.cpp ./include/verilated_save.cpp ./include/verilated_threads.cpp ./include/verilated_timing.cpp ./include/verilated_vcd_c.cpp ./include/verilated_vcd_sc.cpp ./include/verilated_vpi.cpp ./examples/make_hello_c/sim_main.cpp ./examples/make_hello_sc/sc_main.cpp ./examples/make_protect_lib/sim_main.cpp ./examples/make_tracing_c/sim_main.cpp ./examples/make_tracing_sc/sc_main.cpp ./src/VlcMain.cpp ./src/VlcTop.cpp ./src/V3Active.cpp ./src/V3ActiveTop.cpp ./src/V3Assert.cpp ./src/V3AssertPre.cpp ./src/V3Ast.cpp ./src/V3AstNodes.cpp ./src/V3Begin.cpp ./src/V3Branch.cpp ./src/V3Broken.cpp ./src/V3CCtors.cpp ./src/V3CUse.cpp ./src/V3Case.cpp ./src/V3Cast.cpp ./src/V3Class.cpp ./src/V3Clean.cpp ./src/V3Clock.cpp ./src/V3Combine.cpp ./src/V3Common.cpp ./src/V3Config.cpp ./src/V3Const.cpp ./src/V3Coverage.cpp ./src/V3CoverageJoin.cpp ./src/V3Dead.cpp ./src/V3Delayed.cpp ./src/V3Depth.cpp ./src/V3DepthBlock.cpp ./src/V3Descope.cpp ./src/V3Dfg.cpp ./src/V3DfgAstToDfg.cpp ./src/V3DfgCache.cpp ./src/V3DfgDecomposition.cpp ./src/V3DfgDfgToAst.cpp ./src/V3DfgOptimizer.cpp ./src/V3DfgPasses.cpp ./src/V3DfgPeephole.cpp ./src/V3DfgRegularize.cpp ./src/V3DupFinder.cpp ./src/Verilator.cpp ./src/V3EmitCBase.cpp ./src/V3EmitCConstPool.cpp ./src/V3EmitCFunc.cpp ./src/V3EmitCHeaders.cpp ./src/V3EmitCImp.cpp ./src/V3EmitCInlines.cpp ./src/V3EmitCMain.cpp ./src/V3EmitCMake.cpp ./src/V3EmitCModel.cpp ./src/V3EmitCPch.cpp ./src/V3EmitCSyms.cpp ./src/V3EmitMk.cpp ./src/V3EmitV.cpp ./src/V3EmitXml.cpp ./src/V3Error.cpp ./src/V3ExecGraph.cpp ./src/V3Expand.cpp ./src/V3File.cpp ./src/V3FileLine.cpp ./src/V3Force.cpp ./src/V3Fork.cpp ./src/V3Gate.cpp ./src/V3Global.cpp ./src/V3Graph.cpp ./src/V3GraphAcyc.cpp ./src/V3GraphAlg.cpp ./src/V3GraphPathChecker.cpp ./src/V3GraphTest.cpp ./src/V3Hash.cpp ./src/V3Hasher.cpp ./src/V3HierBlock.cpp ./src/V3Inline.cpp ./src/V3Inst.cpp ./src/V3InstrCount.cpp ./src/V3Interface.cpp ./src/V3Param.cpp ./src/V3ParseGrammar.cpp ./src/V3ParseImp.cpp ./src/V3ParseLex.cpp ./src/V3PreProc.cpp ./src/V3PreShell.cpp ./src/V3Premit.cpp ./src/V3ProtectLib.cpp ./src/V3Randomize.cpp ./src/V3Reloop.cpp ./src/V3Sampled.cpp ./src/V3Sched.cpp ./src/V3SchedAcyclic.cpp ./src/V3SchedPartition.cpp ./src/V3SchedReplicate.cpp ./src/V3SchedTiming.cpp ./src/V3SchedVirtIface.cpp ./src/V3Scope.cpp ./src/V3Scoreboard.cpp ./src/V3Slice.cpp ./src/V3Split.cpp ./src/V3SplitAs.cpp ./src/V3SplitVar.cpp ./src/V3StackCount.cpp ./src/V3Stats.cpp ./src/V3StatsReport.cpp ./src/V3String.cpp ./src/V3Subst.cpp ./src/V3TSP.cpp ./src/V3Table.cpp ./src/V3Task.cpp ./src/V3ThreadPool.cpp ./src/V3Timing.cpp ./src/V3Trace.cpp ./src/V3TraceDecl.cpp ./src/V3Tristate.cpp ./src/V3Undriven.cpp ./src/V3Unknown.cpp ./src/V3Unroll.cpp ./src/V3VariableOrder.cpp ./src/V3Waiver.cpp ./src/V3Width.cpp ./src/V3WidthCommit.cpp ./src/V3WidthSel.cpp ./src/V3Life.cpp ./src/V3LifePost.cpp ./src/V3LinkCells.cpp ./src/V3LinkDot.cpp ./src/V3LinkInc.cpp ./src/V3LinkJump.cpp ./src/V3LinkLValue.cpp ./src/V3LinkLevel.cpp ./src/V3LinkParse.cpp ./src/V3LinkResolve.cpp ./src/V3Localize.cpp ./src/V3MergeCond.cpp ./src/V3Name.cpp ./src/V3Number.cpp ./src/V3OptionParser.cpp ./src/V3Options.cpp ./src/V3Order.cpp ./src/V3OrderGraphBuilder.cpp ./src/V3OrderMoveGraph.cpp ./src/V3OrderParallel.cpp ./src/V3OrderProcessDomains.cpp ./src/V3OrderSerial.cpp ./src/V3Os.cpp ./src/V3Param.cpp ./src/V3ParseGrammar.cpp ./src/V3ParseImp.cpp ./src/V3ParseLex.cpp ./src/V3PreProc.cpp ./src/V3PreShell.cpp ./src/V3Premit.cpp ./src/V3ProtectLib.cpp ./src/V3Randomize.cpp ./src/V3Reloop.cpp ./src/V3Sampled.cpp ./src/V3Sched.cpp ./src/V3SchedAcyclic.cpp ./src/V3SchedPartition.cpp ./src/V3SchedReplicate.cpp ./src/V3SchedTiming.cpp ./src/V3SchedVirtIface.cpp ./src/V3Scope.cpp ./src/V3Scoreboard.cpp ./src/V3Slice.cpp ./src/V3Split.cpp ./src/V3SplitAs.cpp ./src/V3SplitVar.cpp ./src/V3StackCount.cpp ./src/V3Stats.cpp ./src/V3StatsReport.cpp ./src/V3String.cpp ./src/V3Subst.cpp ./src/V3TSP.cpp ./src/V3Table.cpp ./src/V3Task.cpp ./src/V3ThreadPool.cpp ./src/V3Timing.cpp ./src/V3Trace.cpp ./src/V3TraceDecl.cpp ./src/V3Tristate.cpp ./src/V3Undriven.cpp ./src/V3Unknown.cpp ./src/V3Unroll.cpp ./src/V3VariableOrder.cpp ./src/V3Waiver.cpp ./src/V3Width.cpp ./src/V3WidthCommit.cpp ./src/V3WidthSel.cpp ./include/verilated.h ./include/verilated_config.h ./include/verilated_cov.h ./include/verilated_cov_key.h ./include/verilated_dpi.h ./include/verilated_fst_c.h ./include/verilated_fst_sc.h ./include/verilated_funcs.h ./include/verilated_imp.h ./include/verilated_intrinsics.h ./include/verilated_profiler.h ./include/verilated_random.h ./include/verilated_save.h ./include/verilated_sc.h ./include/verilated_sc_trace.h ./include/verilated_sym_props.h ./include/verilated_syms.h ./include/verilated_threads.h ./include/verilated_timing.h ./include/verilated_trace.h ./include/verilated_trace_imp.h ./include/verilated_types.h ./include/verilated_vcd_c.h ./include/verilated_vcd_sc.h ./include/verilated_vpi.h ./include/verilatedos.h ./include/verilatedos_c.h ./src/V3Active.h ./src/V3ActiveTop.h ./src/V3Assert.h ./src/V3AssertPre.h ./src/V3Ast.h ./src/V3AstInlines.h ./src/V3AstNodeDType.h ./src/V3AstNodeExpr.h ./src/V3AstNodeOther.h ./src/V3AstUserAllocator.h ./src/V3Begin.h ./src/V3Branch.h ./src/V3Broken.h ./src/V3CCtors.h ./src/V3CUse.h ./src/V3Case.h ./src/V3Cast.h ./src/V3Class.h ./src/V3Clean.h ./src/V3Clock.h ./src/V3Combine.h ./src/V3Common.h ./src/V3Config.h ./src/V3Const.h ./src/V3Coverage.h ./src/V3CoverageJoin.h ./src/V3Dead.h ./src/V3Delayed.h ./src/V3Depth.h ./src/V3DepthBlock.h ./src/V3Descope.h ./src/V3Dfg.h ./src/V3DfgCache.h ./src/V3DfgOptimizer.h ./src/V3DfgPasses.h ./src/V3DfgPatternStats.h ./src/V3DfgPeephole.h ./src/V3DfgVertices.h ./src/V3DupFinder.h ./src/V3EmitC.h ./src/V3EmitCBase.h ./src/V3EmitCConstInit.h ./src/V3EmitCFunc.h ./src/V3EmitCMain.h ./src/V3EmitCMake.h ./src/V3EmitMk.h ./src/V3EmitV.h ./src/V3EmitXml.h ./src/V3Error.h ./src/V3ExecGraph.h ./src/V3Expand.h ./src/V3File.h ./src/V3FileLine.h ./src/V3Force.h ./src/V3Fork.h ./src/V3FunctionTraits.h ./src/V3Gate.h ./src/V3Global.h ./src/V3Graph.h ./src/V3GraphAlg.h ./src/V3GraphPathChecker.h ./src/V3GraphStream.h ./src/V3Hash.h ./src/V3Hasher.h ./src/V3HierBlock.h ./src/V3Inline.h ./src/V3Inst.h ./src/V3InstrCount.h ./src/V3Interface.h ./src/V3LangCode.h ./src/V3LanguageWords.h ./src/V3Life.h ./src/V3LifePost.h ./src/V3LinkCells.h ./src/V3LinkDot.h ./src/V3LinkInc.h ./src/V3LinkJump.h ./src/V3LinkLValue.h ./src/V3LinkLevel.h ./src/V3LinkParse.h ./src/V3LinkResolve.h ./src/V3List.h ./src/V3Localize.h ./src/V3MemberMap.h ./src/V3MergeCond.h ./src/V3Mutex.h ./src/V3Name.h ./src/V3Number.h ./src/V3OptionParser.h ./src/V3Options.h ./src/V3Order.h ./src/V3OrderCFuncEmitter.h ./src/V3OrderGraph.h ./src/V3OrderInternal.h ./src/V3OrderMoveGraph.h ./src/V3Os.h ./src/V3PairingHeap.h ./src/V3Param.h ./src/V3Parse.h ./src/V3ParseImp.h ./src/V3ParseSym.h ./src/V3PchAstMT.h ./src/V3PchAstNoMT.h ./src/V3PreExpr.h ./src/V3PreLex.h ./src/V3PreProc.h ./src/V3PreShell.h ./src/V3Premit.h ./src/V3ProtectLib.h ./src/V3Randomize.h ./src/V3Reloop.h ./src/V3Rtti.h ./src/V3Sampled.h ./src/V3Sched.h ./src/V3Scope.h ./src/V3Scoreboard.h ./src/V3SenExprBuilder.h ./src/V3SenTree.h ./src/V3Simulate.h ./src/V3Slice.h ./src/V3Split.h ./src/V3SplitAs.h ./src/V3SplitVar.h ./src/V3StackCount.h ./src/V3Stats.h ./src/V3StdFuture.h ./src/V3String.h ./src/V3Subst.h ./src/V3SymTable.h ./src/V3TSP.h ./src/V3Table.h ./src/V3Task.h ./src/V3ThreadPool.h ./src/V3Timing.h ./src/V3Trace.h ./src/V3TraceDecl.h ./src/V3Tristate.h ./src/V3Undriven.h ./src/V3UniqueNames.h ./src/V3Unknown.h ./src/V3Unroll.h ./src/V3VariableOrder.h ./src/V3Waiver.h ./src/V3Width.h ./src/V3WidthCommit.h ./src/V3WidthRemove.h ./src/VlcBucket.h ./src/VlcOptions.h ./src/VlcPoint.h ./src/VlcSource.h ./src/VlcTest.h ./src/VlcTop.h ./src/config_build.h ./src/config_package.h ./src/config_rev.h ./src/verilog.y ./src/V3PreLex.l ./src/verilog.l test_regress/t/*.c* test_regress/t/*.h
make[1]: Leaving directory '/svaha/wsnyder/SandBox/homecvs/v4/verilator'
2024-08-26 05:01:37 -04:00
Wilson Snyder d2dfcbca53 Internals: Add log_changes for updating Changes file 2024-07-23 18:36:57 -04:00
Arkadiusz Kozdra 739be2f782
Support constrained randomization with external solvers (#4947) 2024-05-17 10:38:34 -04:00
Szymon Gizler 8301fdc6d3
Add JSON AST dumps (#5020) 2024-03-28 07:32:18 -04:00
Geza Lore f56f318217
Make installation relocatable, and the installation testable (#4927)
Fixes #4893
2024-03-01 00:08:28 +00:00
Szymon Gizler d667b73e8d Add --json-only and related JSON dumping (#4715) (#4831). 2024-02-09 17:50:09 -05:00
Wilson Snyder 89cfa0737f Internals: Fix cppcheck warnings 2024-01-17 19:48:07 -05:00