Merge from master for release.
This commit is contained in:
commit
447ab12cec
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
#*****************************************************************************
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
|
@ -16,11 +16,16 @@ cmake_minimum_required(VERSION 3.15)
|
|||
cmake_policy(SET CMP0091 NEW) # Use MSVC_RUNTIME_LIBRARY to select the runtime
|
||||
project(
|
||||
Verilator
|
||||
VERSION 5.030
|
||||
VERSION 5.032
|
||||
HOMEPAGE_URL https://verilator.org
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
# Set default build type to Release if not specified
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE)
|
||||
endif()
|
||||
|
||||
option(
|
||||
DEBUG_AND_RELEASE_AND_COVERAGE
|
||||
"Builds both the debug and release binaries, overriding CMAKE_BUILD_TYPE. Not supported under MSBuild."
|
||||
|
|
@ -173,6 +178,7 @@ install(
|
|||
PATTERN "include/verilated_config.h"
|
||||
PATTERN "include/*.[chv]"
|
||||
PATTERN "include/*.cpp"
|
||||
PATTERN "include/*.vlt"
|
||||
PATTERN "include/*.sv"
|
||||
PATTERN "include/gtkwave/*.[chv]*"
|
||||
PATTERN "include/vltstd/*.[chv]*"
|
||||
|
|
|
|||
60
Changes
60
Changes
|
|
@ -8,6 +8,61 @@ The changes in each Verilator version are described below. The
|
|||
contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
|
||||
Verilator 5.032 2025-01-01
|
||||
==========================
|
||||
|
||||
**Minor:**
|
||||
|
||||
* Support queue's assignment `push_back/push_front('{})` (#5585) (#5586). [Yilou Wang]
|
||||
* Support basic constrained random for multi-dimensional dynamic array and queue (#5591). [Yilou Wang]
|
||||
* Support vpiDefName (#3906) (#5572). [Krzysztof Starecki]
|
||||
* Support parameter names in pattern initialization (#5593) (#5596). [Greg Davill]
|
||||
* Support randomize size constraints with restrictions (#5582 partial) (#5611). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Support associative array basic constrained randomization (#5658) (#5670). [Yilou Wang]
|
||||
* Support `default disable iff` and `$inferred_disable` (#4016). [Srinivasan Venkataramanan]
|
||||
* Support `extern constraint` and `pure constraint`.
|
||||
* Add `--no-std-waiver` and default reading of standard lint waivers file (#5607).
|
||||
* Add `--no-std-package` as subset-alias of `--no-std` (#5607).
|
||||
* Add `lint_off --contents` in configuration files (#5606).
|
||||
* Add `--waiver-multiline` for context-sensitive `--waiver-output` (#5608).
|
||||
* Add `--fno-inline-funcs` to disable function inlining.
|
||||
* Add `--fno-slice` to disable array assignment slicing (#5644).
|
||||
* Add error on illegal enum base type (#3010). [Iztok Jeras]
|
||||
* Add error on `wait` with missing `.triggered` (#4457).
|
||||
* Add error when improperly storing to parameter (#5147). [Gökçe Aydos]
|
||||
* Add error on illegal `--prefix` etc. values (#5507). [Fabian Keßler]
|
||||
* Add error on `--savable --timing` (#5690). [Narcis Rodas]
|
||||
* Add coverage point hierarchy to coverage reports (#5575) (#5576). [Andrew Nolte]
|
||||
* Add warning on global constraints (#5625). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Add default CMAKE_BUILD_TYPE (#5691) (#5692). [Anthony Moore]
|
||||
* Add error on `solve before` or soft constraints of `randc` variable.
|
||||
* Improve concatenation performance (#5598) (#5599) (#5602). [Geza Lore]
|
||||
* Improve optimization of duplicate wide expressions (#5637). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix dotted reference in delay value (#2410).
|
||||
* Fix `function fork...join_none` regression with unknown type (#4449).
|
||||
* Fix public_module requiring a wire to become public (#4916). [Andrew Nolte]
|
||||
* Fix --hierarchical on projects with dot-f dependency lists (#5199) (#5669). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix can't locate scope error in interface task delayed assignment (#5462) (#5568). [Zhou Shen]
|
||||
* Fix BLKANDNBLK for for VARXREFs (#5569). [Todd Strader]
|
||||
* Fix VPI error instead of fatal for vpi_get_value() on large signals (#5571). [Todd Strader]
|
||||
* Fix --output-groups leftover files issue (#5574). [Todd Strader]
|
||||
* Fix slow unsized number parsing (#5577). [Geza Lore]
|
||||
* Fix negative assignment pattern keys (#5580). [Iztok Jeras]
|
||||
* Fix duplicate scope identifiers decoding (#5584). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix `rand` dynamic arrays with null handles (#5594). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix NBAs to unpacked arrays of unpacked structs (#5603). [Geza Lore]
|
||||
* Fix array of struct member overwrites on member update (#5605) (#5618) (#5628). [sumpster]
|
||||
* Fix interface and struct pattern collision (#5639) (#5640). [Todd Strader]
|
||||
* Fix mis-aliasing of instances with mailbox parameter types (#5632 partial).
|
||||
* Fix error on duplicated declaration of gen block (#5663). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix wildcard equality and inside operators for non-fourstate expressions (#5673). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix `randomize..with` of parameterized classes (#5676). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix interface bracketed array parameter access (#5677) (#5678). [Todd Strader]
|
||||
* Fix width extension of operands of `inside` operator (#5685). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix VPI + SYMRSVDWORD intersection (#5686). [Todd Strader]
|
||||
* Fix verilator_gantt for hierarchically Verilated models (#5700). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
|
||||
|
||||
Verilator 5.030 2024-10-27
|
||||
==========================
|
||||
|
||||
|
|
@ -103,6 +158,9 @@ Verilator 5.030 2024-10-27
|
|||
* Fix build on gcc when using the Spack wrapper (#5555). [Eric Müller]
|
||||
* Fix enum name method (#5563). [Todd Strader]
|
||||
* Fix `$countbits` in assert with non-tristates (#5566). [Shou-Li Hsu]
|
||||
* Fix missing VlProcess handle in coroutines with splits (#5623) (#5650). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix imported array assignment literals (#5642) (#5648). [Todd Strader]
|
||||
* Fix foreach mixed array (#5655) (#5656). [Yilou Wang]
|
||||
|
||||
|
||||
Verilator 5.028 2024-08-21
|
||||
|
|
@ -4872,7 +4930,7 @@ Verilator 0.0 1994-07-08
|
|||
Copyright
|
||||
=========
|
||||
|
||||
Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
#*****************************************************************************
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
|
@ -249,6 +249,7 @@ VL_INST_INC_BLDDIR_FILES = \
|
|||
# Files under srcdir, instead of build time
|
||||
VL_INST_INC_SRCDIR_FILES = \
|
||||
include/*.[chv]* \
|
||||
include/*.vlt \
|
||||
include/*.sv \
|
||||
include/gtkwave/*.[chv]* \
|
||||
include/vltstd/*.[chv]* \
|
||||
|
|
@ -451,13 +452,13 @@ analyzer-include:
|
|||
scan-build $(MAKE) -k examples
|
||||
|
||||
format:
|
||||
$(MAKE) -j 4 clang-format yapf format-exec
|
||||
$(MAKE) -j 4 format-c format-py format-exec
|
||||
|
||||
CLANGFORMAT = clang-format-14
|
||||
CLANGFORMAT_FLAGS = -i
|
||||
CLANGFORMAT_FILES = $(CHECK_CPP) $(CHECK_H) $(CHECK_YL) test_regress/t/*.c* test_regress/t/*.h
|
||||
|
||||
clang-format:
|
||||
format-c clang-format:
|
||||
@$(CLANGFORMAT) --version | egrep 14.0 > /dev/null \
|
||||
|| echo "*** You are not using clang-format-14, indents may differ from master's ***"
|
||||
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
||||
|
|
@ -517,7 +518,7 @@ PY_TEST_FILES = \
|
|||
YAPF = yapf3
|
||||
YAPF_FLAGS = -i --parallel
|
||||
|
||||
yapf:
|
||||
format-py yapf:
|
||||
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
|
||||
|
||||
GERSEMI = gersemi
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.. Github doesn't render images unless absolute URL
|
||||
.. Do not know of a conditional tag, "only: github" nor "github display" works
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5| |badge6| |badge7| |badge8|
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5| |badge6| |badge7|
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
|
||||
:target: https://verilator.org
|
||||
|
|
@ -15,9 +15,7 @@
|
|||
:target: https://hub.docker.com/r/verilator/verilator
|
||||
.. |badge6| image:: https://api.codacy.com/project/badge/Grade/fa78caa433c84a4ab9049c43e9debc6f
|
||||
:target: https://www.codacy.com/gh/verilator/verilator
|
||||
.. |badge7| image:: https://codecov.io/gh/verilator/verilator/branch/master/graph/badge.svg
|
||||
:target: https://codecov.io/gh/verilator/verilator
|
||||
.. |badge8| image:: https://github.com/verilator/verilator/workflows/build/badge.svg
|
||||
.. |badge7| image:: https://github.com/verilator/verilator/workflows/build/badge.svg
|
||||
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
|
||||
|
||||
|
||||
|
|
@ -143,7 +141,7 @@ Related Projects
|
|||
Open License
|
||||
============
|
||||
|
||||
Verilator is Copyright 2003-2024 by Wilson Snyder. (Report bugs to
|
||||
Verilator is Copyright 2003-2025 by Wilson Snyder. (Report bugs to
|
||||
`Verilator Issues <https://verilator.org/issues>`_.)
|
||||
|
||||
Verilator is free software; you can redistribute it and/or modify it under
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
######################################################################
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
######################################################################
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
|
@ -448,7 +448,9 @@ detailed descriptions of these arguments.
|
|||
--no-skip-identical Disable skipping identical output
|
||||
--stats Create statistics file
|
||||
--stats-vars Provide statistics on variables
|
||||
--no-std Prevent parsing standard library
|
||||
--no-std Prevent loading standard files
|
||||
--no-std-package Prevent parsing standard package
|
||||
--no-std-waiver Prevent parsing standard lint waivers
|
||||
--no-stop-fail Do not call $stop when assertion fails
|
||||
--structs-packed Convert all unpacked structures to packed structures
|
||||
-sv Enable SystemVerilog parsing
|
||||
|
|
@ -487,7 +489,8 @@ detailed descriptions of these arguments.
|
|||
+verilog2001ext+<ext> Synonym for +1364-2001ext+<ext>
|
||||
--version Show program version and exits
|
||||
--vpi Enable VPI compiles
|
||||
--waiver-output <filename> Create a waiver file based on the linter warnings
|
||||
--waiver-multiline Create multiline --match for waivers
|
||||
--waiver-output <filename> Create a waiver file based on linter warnings
|
||||
-Wall Enable all style warnings
|
||||
-Werror-<message> Convert warnings to errors
|
||||
-Wfuture-<message> Disable unknown message warnings
|
||||
|
|
@ -540,7 +543,7 @@ description of these arguments.
|
|||
|
||||
The latest version is available from L<https://verilator.org>.
|
||||
|
||||
Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
redistribute it and/or modify the Verilator internals under the terms of
|
||||
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
||||
License Version 2.0.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ parser = argparse.ArgumentParser(
|
|||
|
||||
For documentation see
|
||||
https://verilator.org/guide/latest/exe_verilator_ccache_report.html""",
|
||||
epilog="""Copyright 2002-2024 by Wilson Snyder. This program is free software; you
|
||||
epilog="""Copyright 2002-2025 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
######################################################################
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
|
@ -188,7 +188,7 @@ L<https://verilator.org/guide/latest/exe_verilator_coverage.html>.
|
|||
|
||||
The latest version is available from L<https://verilator.org>.
|
||||
|
||||
Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify the Verilator internals under the terms
|
||||
of either the GNU Lesser General Public License Version 3 or the Perl
|
||||
Artistic License Version 2.0.
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ parser = argparse.ArgumentParser(
|
|||
Verilator_difftree is used for debugging Verilator tree output files.
|
||||
It performs a diff between two files, or all files common between two
|
||||
directories, ignoring irrelevant pointer differences.""",
|
||||
epilog="""Copyright 2005-2024 by Wilson Snyder. This program is free software; you
|
||||
epilog="""Copyright 2005-2025 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ def read_data(filename):
|
|||
re_proc_cpu = re.compile(r'VLPROFPROC processor\s*:\s*(\d+)\s*$')
|
||||
re_proc_dat = re.compile(r'VLPROFPROC ([a-z_ ]+)\s*:\s*(.*)$')
|
||||
cpu = None
|
||||
thread = None
|
||||
thread = 0
|
||||
execGraphStart = None
|
||||
|
||||
global LongestVcdStrValueLength
|
||||
|
|
@ -54,11 +54,11 @@ def read_data(filename):
|
|||
if kind == "SECTION_PUSH":
|
||||
LongestVcdStrValueLength = max(LongestVcdStrValueLength, len(payload))
|
||||
SectionStack.append(payload)
|
||||
Sections.append((tick, tuple(SectionStack)))
|
||||
Sections[thread].append((tick, tuple(SectionStack)))
|
||||
elif kind == "SECTION_POP":
|
||||
assert SectionStack, "SECTION_POP without SECTION_PUSH"
|
||||
SectionStack.pop()
|
||||
Sections.append((tick, tuple(SectionStack)))
|
||||
Sections[thread].append((tick, tuple(SectionStack)))
|
||||
elif kind == "MTASK_BEGIN":
|
||||
mtask, predict_start, ecpu = re_payload_mtaskBegin.match(payload).groups()
|
||||
mtask = int(mtask)
|
||||
|
|
@ -97,6 +97,7 @@ def read_data(filename):
|
|||
print("-Unknown execution trace record: %s" % line)
|
||||
elif re_thread.match(line):
|
||||
thread = int(re_thread.match(line).group(1))
|
||||
Sections.append([])
|
||||
elif re.match(r'^VLPROF(THREAD|VERSION)', line):
|
||||
pass
|
||||
elif re_arg1.match(line):
|
||||
|
|
@ -307,23 +308,27 @@ def report_cpus():
|
|||
|
||||
|
||||
def report_sections():
|
||||
if not Sections:
|
||||
return
|
||||
print("\nSection profile:")
|
||||
for thread, section in enumerate(Sections):
|
||||
if section:
|
||||
print(f"\nSection profile for thread {thread}:")
|
||||
report_section(section)
|
||||
|
||||
|
||||
def report_section(section):
|
||||
totalTime = collections.defaultdict(lambda: 0)
|
||||
selfTime = collections.defaultdict(lambda: 0)
|
||||
|
||||
sectionTree = [0, {}, 1] # [selfTime, childTrees, numberOfTimesEntered]
|
||||
prevTime = 0
|
||||
prevStack = ()
|
||||
for time, stack in Sections:
|
||||
for time, stack in section:
|
||||
if len(stack) > len(prevStack):
|
||||
scope = sectionTree
|
||||
for item in stack:
|
||||
scope = scope[1].setdefault(item, [0, {}, 0])
|
||||
scope[2] += 1
|
||||
dt = time - prevTime
|
||||
assert dt >= 0
|
||||
scope = sectionTree
|
||||
for item in prevStack:
|
||||
scope = scope[1].setdefault(item, [0, {}, 0])
|
||||
|
|
@ -457,12 +462,13 @@ def write_vcd(filename):
|
|||
addValue(pcode, time, value)
|
||||
|
||||
# Section graph
|
||||
if Sections:
|
||||
scode = getCode(LongestVcdStrValueLength * 8, "section", "trace")
|
||||
dcode = getCode(32, "section", "depth")
|
||||
for time, stack in Sections:
|
||||
addValue(scode, time, stack[-1] if stack else None)
|
||||
addValue(dcode, time, len(stack))
|
||||
for thread, section in enumerate(Sections):
|
||||
if section:
|
||||
scode = getCode(LongestVcdStrValueLength * 8, "section", f"t{thread}_trace")
|
||||
dcode = getCode(32, "section", f"t{thread}_depth")
|
||||
for time, stack in section:
|
||||
addValue(scode, time, stack[-1] if stack else None)
|
||||
addValue(dcode, time, len(stack))
|
||||
|
||||
# Create output file
|
||||
fh.write("$version Generated by verilator_gantt $end\n")
|
||||
|
|
@ -523,7 +529,7 @@ Verilator_gantt creates a visual representation to help analyze Verilator
|
|||
|
||||
For documentation see
|
||||
https://verilator.org/guide/latest/exe_verilator_gantt.html""",
|
||||
epilog="""Copyright 2018-2024 by Wilson Snyder. This program is free software; you
|
||||
epilog="""Copyright 2018-2025 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
# pylint: disable=C0114,C0209
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify the Verilator internals under the terms
|
||||
# of either the GNU Lesser General Public License Version 3 or the Perl
|
||||
# Artistic License Version 2.0.
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ in each Verilog block.
|
|||
|
||||
For documentation see
|
||||
https://verilator.org/guide/latest/exe_verilator_profcfunc.html""",
|
||||
epilog="""Copyright 2002-2024 by Wilson Snyder. This program is free software; you
|
||||
epilog="""Copyright 2002-2025 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Verilator Build Docker Container:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
Verilator Executable Docker Container
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
# DESCRIPTION: codecov.io config
|
||||
#
|
||||
# Copyright 2020-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2020-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
|
|
|||
10
configure.ac
10
configure.ac
|
|
@ -1,6 +1,6 @@
|
|||
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. Verilator is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. Verilator is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
# Then 'make maintainer-dist'
|
||||
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
||||
#AC_INIT([Verilator],[#.### devel])
|
||||
AC_INIT([Verilator],[5.030 2024-10-27],
|
||||
AC_INIT([Verilator],[5.032 2025-01-01],
|
||||
[https://verilator.org],
|
||||
[verilator],[https://verilator.org])
|
||||
|
||||
|
|
@ -176,8 +176,10 @@ AC_PROG_CXX
|
|||
AC_PROG_INSTALL
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
cxx_version=$($CXX --version | head -1)
|
||||
AC_MSG_RESULT([compiler is $CXX --version = $cxx_version])
|
||||
CFG_CXX_VERSION=`$CXX --version | head -1`
|
||||
AC_MSG_RESULT([compiler $CXX --version = $CFG_CXX_VERSION])
|
||||
AC_SUBST(CFG_CXX_VERSION)
|
||||
|
||||
AC_MSG_CHECKING([that C++ compiler can compile simple program])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE([int main() { return 0; }])],
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ Andrei Kostovski
|
|||
Andrew Miloradovsky
|
||||
Andrew Nolte
|
||||
Anthony Donlon
|
||||
Anthony Moore
|
||||
Arkadiusz Kozdra
|
||||
Arthur Rosa
|
||||
Aylon Chaim Porat
|
||||
|
|
@ -65,6 +66,7 @@ Gijs Burghoorn
|
|||
Glen Gibb
|
||||
Gökçe Aydos
|
||||
Graham Rushton
|
||||
Greg Davill
|
||||
Guokai Chen
|
||||
Gus Smith
|
||||
Gustav Svensk
|
||||
|
|
@ -126,6 +128,7 @@ Krzysztof Bieganski
|
|||
Krzysztof Boronski
|
||||
Krzysztof Boroński
|
||||
Krzysztof Obłonczek
|
||||
Krzysztof Starecki
|
||||
Kuba Ober
|
||||
Larry Doolittle
|
||||
Liam Braun
|
||||
|
|
@ -194,9 +197,11 @@ Srinivasan Venkataramanan
|
|||
Stefan Wallentowitz
|
||||
Stephen Henry
|
||||
Steven Hugg
|
||||
sumpster
|
||||
Szymon Gizler
|
||||
Sören Tempel
|
||||
Teng Huang
|
||||
Tom Manner
|
||||
Tim Hutt
|
||||
Tim Snyder
|
||||
Tobias Rosenkranz
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
# Code available from: https://verilator.org
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ parser = argparse.ArgumentParser(
|
|||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description="""Read a file and extract documentation data.""",
|
||||
epilog=""" Copyright 2021-2024 by Wilson Snyder. This package is free software;
|
||||
epilog=""" Copyright 2021-2025 by Wilson Snyder. This package is free software;
|
||||
you can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ parser = argparse.ArgumentParser(
|
|||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description="""Post-process Sphinx HTML.""",
|
||||
epilog=""" Copyright 2021-2024 by Wilson Snyder. This package is free software;
|
||||
epilog=""" Copyright 2021-2025 by Wilson Snyder. This package is free software;
|
||||
you can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
****************
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# pylint: disable=C0103,C0114,C0116,C0301,E0402,W0622
|
||||
#
|
||||
# Configuration file for Verilator's Sphinx documentation builder.
|
||||
# Copyright 2003-2024 by Wilson Snyder.
|
||||
# Copyright 2003-2025 by Wilson Snyder.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
#
|
||||
# This file only contains overridden options. For a full list:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Connecting:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*******************************
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
************************
|
||||
|
|
@ -34,130 +34,140 @@ MicroTune Inc., picoChip Designs Ltd., Sun Microsystems Inc., Nauticus
|
|||
Networks Inc., SiCortex Inc, Shunyao CAD, and Western Digital Inc.
|
||||
|
||||
The contributors of major functionality are: Jeremy Bennett, Krzysztof
|
||||
Bieganski, Byron Bradley, Lane Brooks, John Coiner, Duane Galbi, Geza Lore,
|
||||
Todd Strader, Yutetsu Takatsukasa, Stefan Wallentowitz, Paul Wasson, Jie
|
||||
Xu, and Wilson Snyder.
|
||||
Bieganski, Byron Bradley, Lane Brooks, John Coiner, Duane Galbi, Arkadiusz
|
||||
Kozdra, Geza Lore, Todd Strader, Yutetsu Takatsukasa, Stefan Wallentowitz,
|
||||
Paul Wasson, Jie Xu, and Wilson Snyder.
|
||||
|
||||
Some of the people who have provided ideas, and feedback for Verilator
|
||||
include:
|
||||
|
||||
David Addison, Tariq B. Ahmad, Nikana Anastasiadis, John David Anglin,
|
||||
Frederic Antonin, Hans Van Antwerpen, Vasu Arasanipalai, Jens Arm, Rohan
|
||||
Arshid, Gökçe Aydos, Adam Bagley, Sharad Bagri, Robert Balas, Marco
|
||||
Balboni, Matthew Ballance, Andrew Bardsley, Ilya Barkov, Matthew Barr,
|
||||
Geoff Barrett, Kaleb Barrett, Daniel Bates, Julius Baxter, Michael Berman,
|
||||
Jean Berniolles, Victor Besyakov, Narayan Bhagavatula, Moinak
|
||||
Bhattacharyya, Kritik Bhimani, David Biancolin, David Binderman, Piotr
|
||||
Binkowski, Johan Björk, David Black, Tymoteusz Blazejczyk, Scott Bleiweiss,
|
||||
David van der Bokke, Daniel Bone, Guy Bonneau, Krzysztof Boroński, Gregg
|
||||
Bouchard, Christopher Boumenot, Nick Bowler, Bryan Brady, Maarten De
|
||||
Braekeleer, Charlie Brej, J Briquet, John Brownlee, KC Buckenmaier, Jeff
|
||||
Bush, Lawrence Butcher, Tony Bybell, Iru Cai, Ted Campbell, Anthony Campos,
|
||||
Chris Candler, Lauren Carlson, Gregory Carver, Donal Casey, Sebastien Van
|
||||
Cauwenberghe, Alex Chadwick, Greg Chadwick, Marcel Chang, Aliaksei
|
||||
Chapyzhenka, Chih-Mao Chen, Guokai Chen, Terry Chen, Yi-Chung Chen, Yurii
|
||||
Cherkasov, Hennadii Chernyshchyk, Enzo Chi, Robert A. Clark, Ryan Clarke,
|
||||
Allan Cochrane, Keith Colbert, Quentin Corradi, Nassim Corteggiani,
|
||||
Arshid, Valentin Atepalikhin, Philip Axer, Gökçe Aydos, Chris Bachhuber,
|
||||
Filip Badáň, Adam Bagley, Sharad Bagri, James Bailey, Robert Balas, Marco
|
||||
Balboni, Matthew Ballance, Ricardo Barbedo, Andrew Bardsley, Ilya Barkov,
|
||||
Matthew Barr, Geoff Barrett, Kaleb Barrett, Daniel Bates, Julius Baxter,
|
||||
Michael Berman, Jean Berniolles, Victor Besyakov, Narayan Bhagavatula,
|
||||
Moinak Bhattacharyya, Kritik Bhimani, David Biancolin, Krzysztof Bieganski,
|
||||
Michael Bikovitsky, David Binderman, Piotr Binkowski, Johan Björk, David
|
||||
Black, Tymoteusz Blazejczyk, Scott Bleiweiss, David van der Bokke, Daniel
|
||||
Bone, Guy Bonneau, Krzysztof Boroński, Gregg Bouchard, Christopher
|
||||
Boumenot, Paul Bowen-Huggett, Nick Bowler, Bryan Brady, Maarten De
|
||||
Braekeleer, Liam Braun, Charlie Brej, J Briquet, John Brownlee, KC
|
||||
Buckenmaier, Gijs Burghoorn, Jeff Bush, Lawrence Butcher, Tony Bybell, Iru
|
||||
Cai, Ted Campbell, Anthony Campos, Chris Candler, Lauren Carlson, Gregory
|
||||
Carver, Donal Casey, Sebastien Van Cauwenberghe, Alex Chadwick, Greg
|
||||
Chadwick, Marcel Chang, Aliaksei Chapyzhenka, Chih-Mao Chen, Guokai Chen,
|
||||
Kefa Chen, Terry Chen, Yangyu Chen, Yi-Chung Chen, Yurii Cherkasov,
|
||||
Hennadii Chernyshchyk, Enzo Chi, Bartłomiej Chmiel, Robert A. Clark, Ryan
|
||||
Clarke, Allan Cochrane, Keith Colbert, Quentin Corradi, Nassim Corteggiani,
|
||||
Gianfranco Costamagna, February Cozzocrea, Sean Cross, George Cuan, Michal
|
||||
Czyz, Joe DErrico, Jim Dai, Lukasz Dalek, Laurens van Dam, Gunter
|
||||
Dannoritzer, Ashutosh Das, Julian Daube, Bernard Deadman, Peter Debacker,
|
||||
John Demme, Mike Denio, John Deroo, Philip Derrick, Aadi Desai, John
|
||||
Dickol, Ruben Diez, Danny Ding, Jacko Dirks, Ivan Djordjevic, Brad Dobbie,
|
||||
Paul Donahue, Jonathon Donaldson, Anthony Donlon, Caleb Donovick, Larry
|
||||
Doolittle, Leendert van Doorn, Sebastian Dressler, Jonathan Drolet, Maciej
|
||||
Dudek, Alex Duller, Jeff Dutton, Tomas Dzetkulic, Usuario Eda, Charles
|
||||
Eddleston, Chandan Egbert, Joe Eiler, Ahmed El-Mahmoudy, Trevor Elbourne,
|
||||
Mats Engstrom, Robert Farrell, Julien Faucher, Olivier Faure, Eugen Fekete,
|
||||
Fabrizio Ferrandi, Udi Finkelstein, Brian Flachs, Bill Flynn, Andrea
|
||||
Foletto, Alex Forencich, Aurelien Francillon, Bob Fredieu, Manuel
|
||||
Freiberger, Mostafa Gamal, Vito Gamberini, Mostafa Garnal, Benjamin
|
||||
Gartner, Christian Gelinek, Richard E George, Peter Gerst, Glen Gibb,
|
||||
Michael Gielda, Barbara Gigerl, Nimrod Gileadi, Shankar Giri, Dan
|
||||
Gisselquist, Petr Gladkikh, Sam Gladstone, Mariusz Glebocki, Embedded Go,
|
||||
Andrew Goessling, Amir Gonnen, Chitlesh Goorah, Tomasz Gorochowik, Kai
|
||||
Gossner, Tarik Graba, Sergi Granell, Al Grant, Nathan Graybeal, Alexander
|
||||
Grobman, Qian Gu, Xuan Guo, Prabhat Gupta, Driss Hafdi, Neil Hamilton,
|
||||
James Hanlon, Tang Haojin, Øyvind Harboe, Jannis Harder, David Harris,
|
||||
Junji Hashimoto, Thomas Hawkins, Mitch Hayenga, Harald Heckmann, Robert
|
||||
Henry, Stephen Henry, Sebastian Hesselbarth, David Hewson, Jamey Hicks,
|
||||
Joel Holdsworth, Andrew Holme, Peter Holmes, Hiroki Honda, Alex Hornung,
|
||||
Dannoritzer, Ashutosh Das, Julian Daube, Greg Davill, Bernard Deadman,
|
||||
Peter Debacker, Josse Van Delm, John Demme, Mike Denio, John Deroo, Philip
|
||||
Derrick, Aadi Desai, John Dickol, Ruben Diez, Danny Ding, Jacko Dirks, Ivan
|
||||
Djordjevic, Brad Dobbie, Paul Donahue, Jonathon Donaldson, Anthony Donlon,
|
||||
Caleb Donovick, Larry Doolittle, Leendert van Doorn, Sebastian Dressler,
|
||||
Jonathan Drolet, Justin Yao Du, Maciej Dudek, Alex Duller, Jeff Dutton,
|
||||
Tomas Dzetkulic, Usuario Eda, Charles Eddleston, Chandan Egbert, Joe Eiler,
|
||||
Ahmed El-Mahmoudy, Trevor Elbourne, Mats Engstrom, Robert Farrell, Julien
|
||||
Faucher, Olivier Faure, Eugene Feinberg, Eugen Fekete, Fabrizio Ferrandi,
|
||||
Udi Finkelstein, Brian Flachs, Bill Flynn, Andrea Foletto, Alex Forencich,
|
||||
Aurelien Francillon, Bob Fredieu, Manuel Freiberger, Mostafa Gamal, Vito
|
||||
Gamberini, Mostafa Garnal, Benjamin Gartner, Christian Gelinek, Richard E
|
||||
George, Peter Gerst, Glen Gibb, Michael Gielda, Barbara Gigerl, Nimrod
|
||||
Gileadi, Shankar Giri, Dan Gisselquist, Szymon Gizler, Petr Gladkikh, Sam
|
||||
Gladstone, Mariusz Glebocki, Embedded Go, Andrew Goessling, Amir Gonnen,
|
||||
Chitlesh Goorah, Tomasz Gorochowik, Kai Gossner, Tarik Graba, Sergi
|
||||
Granell, Al Grant, Nathan Graybeal, Alexander Grobman, Qian Gu, Xuan Guo,
|
||||
Prabhat Gupta, Deniz Güzel, Driss Hafdi, Abdul Hameed, Neil Hamilton, James
|
||||
Hanlon, Tang Haojin, Øyvind Harboe, Jannis Harder, David Harris, Junji
|
||||
Hashimoto, Thomas Hawkins, Mitch Hayenga, Harald Heckmann, Robert Henry,
|
||||
Stephen Henry, Sebastian Hesselbarth, David Hewson, Jamey Hicks, Joel
|
||||
Holdsworth, Andrew Holme, Peter Holmes, Hiroki Honda, Alex Hornung,
|
||||
Pierre-Henri Horrein, David Horton, Peter Horvath, Jae Hossell, Kuoping
|
||||
Hsu, Teng Huang, Steven Hugg, Huanghuang Zhou, Alan Hunter, James
|
||||
Hutchinson, Tim Hutt, Ehab Ibrahim, Edgar E. Iglesias, Shahid Ikram, Jamie
|
||||
Iles, Vighnesh Iyer, Ben Jackson, Daniel Jacques, Shareef Jalloq, Marlon
|
||||
Hsu, Shou-Li Hsu, Teng Huang, Steven Hugg, Alan Hunter, James Hutchinson,
|
||||
Tim Hutt, Ehab Ibrahim, Edgar E. Iglesias, Shahid Ikram, Jamie Iles, Fuad
|
||||
Ismail, Vighnesh Iyer, Ben Jackson, Daniel Jacques, Shareef Jalloq, Marlon
|
||||
James, Krzysztof Jankowski, Eyck Jentzsch, HyungKi Jeong, Iztok Jeras,
|
||||
Alexandre Joannou, James Johnson, Christophe Joly, Justin Jones,
|
||||
William D. Jones, Larry Darryl Lee Jr., Franck Jullien, James Jung,
|
||||
Yoshitomo Kaneda, Mike Kagen, Arthur Kahlich, Kaalia Kahn, Guy-Armand
|
||||
Kamendje, Vasu Kandadi, Kanad Kanhere, Patricio Kaplan, Pieter Kapsenberg,
|
||||
Rafal Kapuscik, Ralf Karge, Per Karlsson, Dan Katz, Sol Katzman, Ian
|
||||
Kennedy, Ami Keren, Michael Killough, Sun Kim, Jonathan Kimmitt, Olof
|
||||
Kindgren, Kevin Kiningham, Cameron Kirk, Dan Kirkham, Aleksander Kiryk,
|
||||
Sobhan Klnv, Gernot Koch, Jack Koenig, Soon Koh, Nathan Kohagen, Steve
|
||||
Kolecki, Brett Koonce, Will Korteland, Andrei Kostovski, Wojciech Koszek,
|
||||
Varun Koyyalagunta, Arkadiusz Kozdra, Markus Krause, David Kravitz, Adam
|
||||
Krolnik, Roland Kruse, Mahesh Kumashikar, Andreas Kuster, Sergey Kvachonok,
|
||||
Charles Eric LaForest, Kevin Laeufer, Ed Lander, Steve Lang, Pierre
|
||||
Laroche, Stephane Laurent, Walter Lavino, Christian Leber, David Ledger,
|
||||
Alex Lee, Larry Lee, Yoda Lee, Michaël Lefebvre, Dag Lem, Igor Lesik, John
|
||||
Li, Kay Li, Zixi Li, Davide Libenzi, Nandor Licker, Eivind Liland, Ícaro
|
||||
Lima, Kevin Lin, Yu-Sheng Lin, Charlie Lind, Andrew Ling, Jiuyang Liu, Joey
|
||||
Liu, Paul Liu, Derek Lockhart, Jake Longo, Arthur Low, Jose Loyola, Stefan
|
||||
Ludwig, Dan Lussier, Konstantin Lübeck, Fred Ma, Liwei Ma, Duraid Madina,
|
||||
Oleh Maksymenko, Affe Mao, Julien Margetts, Chick Markley, Alexis Marquet,
|
||||
Mark Marshall, Alfonso Martinez, Unai Martinez-Corral, Adrien Le Masle,
|
||||
Yves Mathieu, Vladimir Matveyenko, Patrick Maupin, Stan Mayer, Conor
|
||||
McCullough, Jason McMullan, Elliot Mednick, Yuan Mei, Andy Meier,
|
||||
Pawel Jewstafjew, Alexandre Joannou, James Johnson, Christophe Joly, Justin
|
||||
Jones, William D. Jones, Abe Jordan, Larry Darryl Lee Jr., Franck Jullien,
|
||||
James Jung, Mike Kagen, Arthur Kahlich, Kaalia Kahn, Guy-Armand Kamendje,
|
||||
Vasu Kandadi, Yoshitomo Kaneda, Kanad Kanhere, Patricio Kaplan, Pieter
|
||||
Kapsenberg, Rafal Kapuscik, Ralf Karge, Per Karlsson, Dan Katz, Sol
|
||||
Katzman, Ian Kennedy, Ami Keren, Fabian Keßler, Michael Killough, Sun Kim,
|
||||
Jonathan Kimmitt, Olof Kindgren, Kevin Kiningham, Cameron Kirk, Dan
|
||||
Kirkham, Aleksander Kiryk, Sobhan Klnv, Gernot Koch, Jack Koenig, Soon Koh,
|
||||
Nathan Kohagen, Steve Kolecki, Brett Koonce, Will Korteland, Andrei
|
||||
Kostovski, Wojciech Koszek, Varun Koyyalagunta, Arkadiusz Kozdra, Markus
|
||||
Krause, David Kravitz, Adam Krolnik, Roland Kruse, Mahesh Kumashikar,
|
||||
Andreas Kuster, Sergey Kvachonok, Charles Eric LaForest, Kevin Laeufer, Ed
|
||||
Lander, Steve Lang, Pierre Laroche, Stephane Laurent, Walter Lavino,
|
||||
Christian Leber, David Ledger, Alex Lee, Larry Lee, Yoda Lee, Michaël
|
||||
Lefebvre, Dag Lem, Igor Lesik, John Li, Kay Li, Zixi Li, Davide Libenzi,
|
||||
Nandor Licker, Eivind Liland, Ícaro Lima, Kevin Lin, Yu-Sheng Lin, Charlie
|
||||
Lind, Andrew Ling, Jiuyang Liu, Joey Liu, Paul Liu, Derek Lockhart, Jake
|
||||
Longo, Geza Lore, Arthur Low, Jose Loyola, Stefan Ludwig, Dan Lussier,
|
||||
Konstantin Lübeck, Fred Ma, Liwei Ma, Duraid Madina, Oleh Maksymenko, Affe
|
||||
Mao, Julien Margetts, Chick Markley, Alexis Marquet, Mark Marshall, Alfonso
|
||||
Martinez, Unai Martinez-Corral, Adrien Le Masle, Yves Mathieu, Vladimir
|
||||
Matveyenko, Patrick Maupin, Stan Mayer, Jordan McConnon, Conor McCullough,
|
||||
Jason McMullan, Elliot Mednick, Yuan Mei, Andy Meier, Luiza de Melo,
|
||||
Rodrigo A. Melo, Benjamin Menküc, Jake Merdich, David Metz, Wim Michiels,
|
||||
Miodrag Milanović, Darryl Miles, Kevin Millis, Andrew Miloradovsky, Wai Sum
|
||||
Mong, Peter Monsson, Sean Moore, Stuart Morris, Dennis Muhlestein, John
|
||||
Murphy, Matt Myers, Nathan Myers, Richard Myers, Alex Mykyta, Dimitris
|
||||
Nalbantis, Peter Nelson, Felix Neumärker, Bob Newgard, Cong Van Nguyen,
|
||||
Rachit Nigam, Toru Niina, Paul Nitza, Yossi Nivin, Pete Nixon, Lisa Noack,
|
||||
Mark Nodine, Michael Nolan, Andrew Nolte, Joseph Nwabueze, Kuba Ober,
|
||||
Andreas Olofsson, Baltazar Ortiz, Aleksander Osman, Don Owen, Tim Paine,
|
||||
Deepa Palaniappan, James Pallister, Vassilis Papaefstathiou, Sanggyu Park,
|
||||
Brad Parker, Risto Pejašinović, Morten Borup Petersen, Dan Petrisko, Wesley
|
||||
Piard, Maciej Piechotka, David Pierce, Cody Piersall, T. Platz, Michael
|
||||
Platzer, Dominic Plunkett, David Poole, Michael Popoloski, Roman Popov,
|
||||
Aylon Chaim Porat, Oron Port, Rich Porter, Rick Porter, Stefan Post,
|
||||
Niranjan Prabhu, Damien Pretet, Harald Pretl, Bill Pringlemeir, Usha
|
||||
Priyadharshini, Mark Jackson Pulver, Prateek Puri, Jiacheng Qian, Marshal
|
||||
Qiao, Raynard Qiao, Yujia Qiao, Jasen Qin, Frank Qiu, Nandu Raj, Kamil
|
||||
Rakoczy, Danilo Ramos, Drew Ranck, Chris Randall, Anton Rapp, Josh Redford,
|
||||
Odd Magne Reitan, Frédéric Requin, Dustin Richmond, Samuel Riedel, Alberto
|
||||
Del Rio, Eric Rippey, Oleg Rodionov, Ludwig Rogiers, Paul Rolfe, Michail
|
||||
Rontionov, Arjen Roodselaar, Tobias Rosenkranz, Yernagula Roshit, Ryszard
|
||||
Miodrag Milanović, Darryl Miles, Kevin Millis, Andrew Miloradovsky, David
|
||||
Moberg, Wai Sum Mong, Peter Monsson, Anthony Moore, Sean Moore, Stuart
|
||||
Morris, Dennis Muhlestein, John Murphy, Matt Myers, Nathan Myers, Richard
|
||||
Myers, Alex Mykyta, Eric Müller, Dimitris Nalbantis, Peter Nelson, Felix
|
||||
Neumärker, Bob Newgard, Cong Van Nguyen, Rachit Nigam, Toru Niina, Paul
|
||||
Nitza, Yossi Nivin, Pete Nixon, Lisa Noack, Mark Nodine, Michael Nolan,
|
||||
Andrew Nolte, Joseph Nwabueze, Kevin Nygaard, Kuba Ober, Krzysztof
|
||||
Obłonczek, Andreas Olofsson, Baltazar Ortiz, Aleksander Osman, Don Owen,
|
||||
Tim Paine, Deepa Palaniappan, James Pallister, Vassilis Papaefstathiou,
|
||||
Sanggyu Park, Brad Parker, Risto Pejašinović, Seth Pellegrino, Morten Borup
|
||||
Petersen, Dan Petrisko, Wesley Piard, Maciej Piechotka, David Pierce, Cody
|
||||
Piersall, T. Platz, Michael Platzer, Dominic Plunkett, Nolan Poe, David
|
||||
Poole, Michael Popoloski, Roman Popov, Aylon Chaim Porat, Oron Port, Rich
|
||||
Porter, Rick Porter, Stefan Post, Niranjan Prabhu, Damien Pretet, Harald
|
||||
Pretl, Bill Pringlemeir, Usha Priyadharshini, Mark Jackson Pulver, Prateek
|
||||
Puri, Han Qi, Jiacheng Qian, Marshal Qiao, Raynard Qiao, Yujia Qiao, Jasen
|
||||
Qin, Frank Qiu, Nandu Raj, Kamil Rakoczy, Danilo Ramos, Drew Ranck, Chris
|
||||
Randall, Anton Rapp, Josh Redford, Odd Magne Reitan, Frédéric Requin,
|
||||
Dustin Richmond, Samuel Riedel, Alberto Del Rio, Eric Rippey, Narcis Rodas,
|
||||
Oleg Rodionov, Ludwig Rogiers, Paul Rolfe, Michail Rontionov, Arjen
|
||||
Roodselaar, Arthur Rosa, Tobias Rosenkranz, Yernagula Roshit, Ryszard
|
||||
Rozak, Huang Rui, Graham Rushton, Jan Egil Ruud, Denis Rystsov, Pawel
|
||||
Sagan, Robert Sammelson, John Sanguinetti, Josep Sans, Luca Sasselli,
|
||||
Martin Scharrer, Martin Schmidt, Julie Schwartz, Galen Seitz, Joseph
|
||||
Shaker, Mark Shaw, Salman Sheikh, Zhou Shen, Hao Shi, James Shi, Michael
|
||||
Shinkarovsky, Rafael Shirakawa, Jeffrey Short, S Shuba, Fan Shupei, Ethan
|
||||
Sifferman, Anderson Ignacio da Silva, Rodney Sinclair, Ameya Vikram Singh,
|
||||
Sanjay Singh, Frans Skarman, Nate Slager, Steven Slatter, Mladen
|
||||
Slijepcevic, Brian Small, Garrett Smith, Gus Smith, Tim Snyder, Maciej
|
||||
Sobkowski, Stan Sokorac, Alex Solomatnikov, Flavien Solt, Wei Song, Trefor
|
||||
Southwell, Martin Stadler, Art Stamness, David Stanford, John Stevenson,
|
||||
Pete Stevenson, Patrick Stewart, Rob Stoddard, Tood Strader, John Stroebel,
|
||||
Ray Strouble, Sven Stucki, Howard Su, Emerson Suguimoto, Gene Sullivan,
|
||||
Qingyao Sun, Renga Sundararajan, Kuba Sunderland-Ober, Gustav Svensk,
|
||||
Rupert Swarbrick, Jevin Sweval, Shinya T-Y, Thierry Tambe, Jesse Taube,
|
||||
Drew Taussig, Jose Tejada, Sören Tempel, Peter Tengstrand, Wesley Terpstra,
|
||||
Rui Terra, Stefan Thiede, Justin Thiel, Gary Thomas, Ian Thompson, Kevin
|
||||
Thompson, Mike Thyer, Hans Tichelaar, Tudor Timi, Viktor Tomov, Steve Tong,
|
||||
Topa Topino, Àlex Torregrosa, Topa Tota, Michael Tresidder, Lenny Truong,
|
||||
David Turner, Neil Turton, Hideto Ueno, Mike Urbach, Joel Vandergriendt,
|
||||
Srini Vemuri, Srinivasan Venkataramanan, Yuri Victorovich, Ivan Vnučec,
|
||||
Bogdan Vukobratovic, Holger Waechtler, Philipp Wagner, Johannes Walter, CY
|
||||
Wang, Chuxuan Wang, Shawn Wang, Zhanglei Wang, Greg Waters, Thomas Watts,
|
||||
Eugene Weber, John Wehle, Tianrui Wei, David Welch, Thomas J Whatson,
|
||||
Martin Whitaker, Marco Widmer, Leon Wildman, Daniel S. Wilkerson, Daniel
|
||||
Wilkerson, Gerald Williams, Trevor Williams, Don Williamson, Jan Van
|
||||
Winkel, Jeff Winston, Joshua Wise, Clifford Wolf, Johan Wouters, Paul
|
||||
Wright, Tobias Wölfel, Junyi Xi, Ding Xiaoliang, Liu Xiaoyi, Mandy Xu,
|
||||
Shanshan Xu, Yinan Xu, SU YANG, Felix Yan, Luke Yang, Amir Yazdanbakhsh,
|
||||
Chentai (Seven) Yuan, Florian Zaruba, Mat Zeno, Keyi Zhang, Xi Zhang, Yike
|
||||
Zhou, Jiamin Zhu.
|
||||
Sagan, Robert Sammelson, Adrian Sampson, John Sanguinetti, Josep Sans, Luca
|
||||
Sasselli, Martin Scharrer, Martin Schmidt, Jonathan Schröter, Julie
|
||||
Schwartz, Galen Seitz, Sam Shahrestani, Joseph Shaker, Mark Shaw, Salman
|
||||
Sheikh, Zhou Shen, Hao Shi, James Shi, Michael Shinkarovsky, Rafael
|
||||
Shirakawa, Jeffrey Short, S Shuba, Fan Shupei, Ethan Sifferman, Anderson
|
||||
Ignacio da Silva, Rodney Sinclair, Ameya Vikram Singh, Sanjay Singh, Frans
|
||||
Skarman, Nate Slager, Steven Slatter, Mladen Slijepcevic, Brian Small,
|
||||
Garrett Smith, Gus Smith, Tim Snyder, Maciej Sobkowski, Stan Sokorac, Alex
|
||||
Solomatnikov, Flavien Solt, Wei Song, Trefor Southwell, Martin Stadler, Art
|
||||
Stamness, David Stanford, Krzysztof Starecki, Baruch Sterin, John
|
||||
Stevenson, Pete Stevenson, Patrick Stewart, Rob Stoddard, Tood Strader,
|
||||
John Stroebel, Ray Strouble, Sven Stucki, Howard Su, Udaya Raj Subedi,
|
||||
Emerson Suguimoto, Gene Sullivan, Qingyao Sun, Renga Sundararajan, Kuba
|
||||
Sunderland-Ober, Gustav Svensk, Rupert Swarbrick, Jevin Sweval, Paul
|
||||
Swirhun, Shinya T-Y, Thierry Tambe, Jesse Taube, Drew Taussig, Christopher
|
||||
Taylor, Greg Taylor, Jose Tejada, Sören Tempel, Peter Tengstrand, Wesley
|
||||
Terpstra, Rui Terra, Stefan Thiede, Justin Thiel, Gary Thomas, Ian
|
||||
Thompson, Kevin Thompson, Mike Thyer, Hans Tichelaar, Tudor Timi, Viktor
|
||||
Tomov, Steve Tong, Topa Topino, Àlex Torregrosa, Topa Tota, Michael
|
||||
Tresidder, Lenny Truong, David Turner, Neil Turton, Hideto Ueno, Mike
|
||||
Urbach, Joel Vandergriendt, Srini Vemuri, Srinivasan Venkataramanan, Yuri
|
||||
Victorovich, Ivan Vnučec, Bogdan Vukobratovic, Holger Waechtler, Philipp
|
||||
Wagner, Stefan Wallentowitz, Johannes Walter, CY Wang, Chuxuan Wang, Shawn
|
||||
Wang, Yilou Wang, Zhanglei Wang, Greg Waters, Thomas Watts, Eugene Weber,
|
||||
John Wehle, Tianrui Wei, David Welch, Thomas J Whatson, Martin Whitaker,
|
||||
Marco Widmer, Leon Wildman, Daniel S. Wilkerson, Daniel Wilkerson, Gerald
|
||||
Williams, Trevor Williams, Don Williamson, Jan Van Winkel, Jeff Winston,
|
||||
Joshua Wise, Clifford Wolf, Johan Wouters, Paul Wright, Tobias Wölfel,
|
||||
Junyi Xi, Ding Xiaoliang, Liu Xiaoyi, Jinyan Xu, Mandy Xu, Pengcheng Xu,
|
||||
Shanshan Xu, Yan Xu, Yinan Xu, SU YANG, Felix Yan, Jiaxun Yang, Luke Yang,
|
||||
Amir Yazdanbakhsh, Chentai (Seven) Yuan, Florian Zaruba, Mat Zeno, Keyi
|
||||
Zhang, Xi Zhang, Huanghuang Zhou, Yike Zhou, Jiamin Zhu, Ryan Ziegler.
|
||||
|
||||
Thanks to them, and all those we've missed mentioning above, and to those
|
||||
whom have wished to remain anonymous.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*********
|
||||
|
|
@ -8,7 +8,7 @@ Copyright
|
|||
The latest version of Verilator is available from `https://verilator.org
|
||||
<https://verilator.org>`_.
|
||||
|
||||
Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify the Verilator internals under the terms
|
||||
of either the GNU Lesser General Public License Version 3 or the Perl
|
||||
Artistic License Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
Deprecations
|
||||
|
|
@ -13,7 +13,10 @@ C++14 compiler support
|
|||
|
||||
Verilator will require C++20 or newer compilers for both compiling
|
||||
Verilator and compiling all Verilated models no sooner than May 2025.
|
||||
(Likely to be removed shortly after GitHub removes Ubuntu 20.04
|
||||
continuous-integration action runners, which are used to test the older
|
||||
C++ standard).
|
||||
|
||||
XML output
|
||||
Verilator currently supports XML parser output (enabled with `--xml-only`).
|
||||
Support for `--xml-*` options will be deprecated no sooner than January 2025.
|
||||
Support for `--xml-*` options will be deprecated no sooner than January 2026.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
Environment
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Example Create-Binary Execution:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Example C++ Execution:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
First you need Verilator installed, see :ref:`Installation`. In brief, if
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Examples in the Distribution:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Example SystemC Execution:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Examples:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Simulation Runtime Arguments:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
verilator Arguments
|
||||
|
|
@ -589,10 +589,18 @@ Summary:
|
|||
|
||||
.. option:: -fno-expand
|
||||
|
||||
.. option:: -fno-func-opt
|
||||
|
||||
.. option:: -fno-func-opt-balance-cat
|
||||
|
||||
.. option:: -fno-func-opt-split-cat
|
||||
|
||||
.. option:: -fno-gate
|
||||
|
||||
.. option:: -fno-inline
|
||||
|
||||
.. option:: -fno-inline-funcs
|
||||
|
||||
.. option:: -fno-life
|
||||
|
||||
.. option:: -fno-life-post
|
||||
|
|
@ -609,6 +617,8 @@ Summary:
|
|||
|
||||
.. option:: -fno-reorder
|
||||
|
||||
.. option:: -fno-slice
|
||||
|
||||
.. option:: -fno-split
|
||||
|
||||
.. option:: -fno-subst
|
||||
|
|
@ -1357,7 +1367,17 @@ Summary:
|
|||
|
||||
.. option:: --no-std
|
||||
|
||||
Prevents parsing standard library.
|
||||
Prevents parsing standard input files, alias for
|
||||
:vlopt:`--no-std-package`, :vlopt:`--no-std-waiver`. This may be extended
|
||||
to prevent reading other standardized files in future versions.
|
||||
|
||||
.. option:: --no-std-package
|
||||
|
||||
Prevents parsing standard `std::` package file.
|
||||
|
||||
.. option:: --no-std-waiver
|
||||
|
||||
Prevents parsing standard lint waivers (`verilated_std_waiver.vlt`).
|
||||
|
||||
.. option:: --no-stop-fail
|
||||
|
||||
|
|
@ -1637,6 +1657,15 @@ Summary:
|
|||
|
||||
Enable the use of VPI and linking against the :file:`verilated_vpi.cpp` files.
|
||||
|
||||
.. option:: --waiver-multiline
|
||||
|
||||
When using :vlopt:`--waiver-output \<filename\> <--waiver-output>`,
|
||||
include a match expression that includes the entire multiline error
|
||||
message as a match regular expression, as opposed to the default of only
|
||||
matching the first line of the error message. This provides a starting
|
||||
point for creating complex waivers, but such generated waivers will
|
||||
likely require editing for brevity before being reused.
|
||||
|
||||
.. option:: --waiver-output <filename>
|
||||
|
||||
Generate a waiver file that contains all waiver statements to suppress
|
||||
|
|
@ -1741,18 +1770,19 @@ Summary:
|
|||
``-Wwarn-CASEX`` ``-Wwarn-CASTCONST`` ``-Wwarn-CMPCONST``
|
||||
``-Wwarn-COLONPLUS`` ``-Wwarn-IMPLICIT`` ``-Wwarn-IMPLICITSTATIC``
|
||||
``-Wwarn-LATCH`` ``-Wwarn-MISINDENT`` ``-Wwarn-NEWERSTD``
|
||||
``-Wwarn-PINMISSING`` ``-Wwarn-REALCVT`` ``-Wwarn-STATICVAR``
|
||||
``-Wwarn-UNSIGNED`` ``-Wwarn-WIDTHTRUNC`` ``-Wwarn-WIDTHEXPAND``
|
||||
``-Wwarn-WIDTHXZEXPAND``.
|
||||
``-Wwarn-PREPROCZERO`` ``-Wwarn-PINMISSING`` ``-Wwarn-REALCVT``
|
||||
``-Wwarn-STATICVAR`` ``-Wwarn-UNSIGNED`` ``-Wwarn-WIDTHTRUNC``
|
||||
``-Wwarn-WIDTHEXPAND`` ``-Wwarn-WIDTHXZEXPAND``.
|
||||
|
||||
.. option:: -Wwarn-style
|
||||
|
||||
Enable all code style-related warning messages. This is equivalent to
|
||||
``-Wwarn-ASSIGNDLY`` ``-Wwarn-DECLFILENAME`` ``-Wwarn-DEFPARAM``
|
||||
``-Wwarn-EOFNEWLINE`` ``-Wwarn-GENUNNAMED`` ``-Wwarn-INCABSPATH``
|
||||
``-Wwarn-ASSIGNDLY`` ``-Wwarn-BLKSEQ`` ``-Wwarn-DECLFILENAME``
|
||||
``-Wwarn-DEFPARAM`` ``-Wwarn-EOFNEWLINE`` ``-Wwarn-GENUNNAMED``
|
||||
``-Wwarn-IMPORTSTAR`` ``-Wwarn-INCABSPATH`` ``-Wwarn-PINCONNECTEMPTY``
|
||||
``-Wwarn-PINNOCONNECT`` ``-Wwarn-SYNCASYNCNET`` ``-Wwarn-UNDRIVEN``
|
||||
``-Wwarn-UNUSEDGENVAR`` ``-Wwarn-UNUSEDPARAM`` ``-Wwarn-UNUSEDSIGNAL``
|
||||
``-Wwarn-VARHIDDEN``.
|
||||
``-Wwarn-UNUSEDGENVAR`` ``-Wwarn-UNUSEDLOOP`` ``-Wwarn-UNUSEDPARAM``
|
||||
``-Wwarn-UNUSEDSIGNAL`` ``-Wwarn-VARHIDDEN``.
|
||||
|
||||
.. option:: --x-assign 0
|
||||
|
||||
|
|
@ -2067,7 +2097,7 @@ The grammar of configuration commands is as follows:
|
|||
|
||||
.. option:: lint_off [-rule <message>] [-file "<filename>" [-lines <line> [ - <line>]]]
|
||||
|
||||
.. option:: lint_off [-rule <message>] [-file "<filename>"] [-match "<string>"]
|
||||
.. option:: lint_off [-rule <message>] [-file "<filename>"] [-contents "<wildcard>"] [-match "<wildcard>"]
|
||||
|
||||
Enable/disables the specified lint warning, in the specified filename
|
||||
(or wildcard with '\*' or '?', or all files if omitted) and range of
|
||||
|
|
@ -2076,17 +2106,28 @@ The grammar of configuration commands is as follows:
|
|||
With lint_off using "\*" will override any lint_on directives in the
|
||||
source, i.e. the warning will still not be printed.
|
||||
|
||||
If the -rule is omitted, all lint warnings (see list in
|
||||
If the :code:`-rule` is omitted, all lint warnings (see list in
|
||||
:vlopt:`-Wno-lint`) are enabled/disabled. This will override all later
|
||||
lint warning enables for the specified region.
|
||||
|
||||
If -match is set, the linter warnings are matched against this
|
||||
(wildcard) string and are waived in case they match, provided with the
|
||||
rule and file also match.
|
||||
If :code:`-contents` is provided, the input files must contain the given
|
||||
wildcard (with '\*' or '?'), and are waived in case they match, provided
|
||||
the :code:`-rule`, :code:`-file`, and :code:`-contents` also match. The
|
||||
wildcard should be designed to match a single line; it is unspecified if
|
||||
the wildcard is allowed to match across multiple lines. The input
|
||||
contents does not include :vlopt:`--std <--no-std>` standard files, nor
|
||||
configuration files (with :code:`verilator_config`). Typical use for
|
||||
this is to match a version number present in the Verilog sources, so
|
||||
that the waiver will only apply to that version of the sources.
|
||||
|
||||
In previous versions -rule was named -msg. The latter is deprecated, but
|
||||
still works with a deprecation info; it may be removed in future
|
||||
versions.
|
||||
If :code:`-match` is provided, the linter warnings are matched against
|
||||
the given wildcard (with '\*' or '?'), and are waived in case they
|
||||
match, provided the :code:`-rule`, :code:`-file`, and :code:`-contents`
|
||||
also match. The wildcard is compared across the entire multi-line
|
||||
message; see :vlopt:`--waiver-multiline`.
|
||||
|
||||
Before version 4.026, :code:`-rule` was named :code:`-msg`, and
|
||||
:code:`-msg` remained a deprecated alias until Version 5.000.
|
||||
|
||||
.. option:: public [-module "<modulename>"] [-task/-function "<taskname>"] -var "<signame>"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
verilator_coverage
|
||||
|
|
@ -35,11 +35,11 @@ verilator_coverage Example Usage
|
|||
verilator_coverage --help
|
||||
verilator_coverage --version
|
||||
|
||||
verilator_coverage --annotate <obj>
|
||||
verilator_coverage --annotate obj_dir coverage.dat
|
||||
|
||||
verilator_coverage -write merged.dat <datafiles>...
|
||||
verilator_coverage --write merged.dat coverage.dat ...
|
||||
|
||||
verilator_coverage -write-info merged.info <datafiles>...
|
||||
verilator_coverage --write-info merged.info coverage.dat ...
|
||||
|
||||
|
||||
verilator_coverage Arguments
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
verilator_gantt
|
||||
|
|
@ -62,6 +62,17 @@ predicted_thread#_mtask
|
|||
executing.
|
||||
|
||||
|
||||
verilator_gantt Example Usage
|
||||
-----------------------------
|
||||
|
||||
..
|
||||
|
||||
verilator_gantt --help
|
||||
verilator_gantt --version
|
||||
|
||||
verilator_gantt profile_exec.dat
|
||||
|
||||
|
||||
verilator_gantt Arguments
|
||||
-------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
verilator_profcfunc
|
||||
|
|
@ -15,6 +15,17 @@ reported as a rounding error.
|
|||
|
||||
For an overview of the use of verilator_profcfunc, see :ref:`Profiling`.
|
||||
|
||||
verilator_profcfunc Example Usage
|
||||
---------------------------------
|
||||
|
||||
..
|
||||
|
||||
verilator_profcfunc --help
|
||||
verilator_profcfunc --version
|
||||
|
||||
verilator_profcfunc gprof.out
|
||||
|
||||
|
||||
verilator_profcfunc Arguments
|
||||
-----------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*********************************
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*******************
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
******************************
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*****
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
######################
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _CMakeInstallation:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Installation:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
***************
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
********
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Simulating:
|
||||
|
|
@ -224,14 +224,6 @@ at branches). At each such branch, a counter is incremented. At the end
|
|||
of a test, the counters, filename, and line number corresponding to each
|
||||
counter are written into the coverage file.
|
||||
|
||||
Verilator automatically disables coverage of branches with a $stop in
|
||||
them, as it is assumed that $stop branches contain an error check that should
|
||||
not occur. A :option:`/*verilator&32;coverage_block_off*/` metacomment
|
||||
will perform a similar function on any code in that block or below, or
|
||||
:option:`/*verilator&32;coverage_off*/` and
|
||||
:option:`/*verilator&32;coverage_on*/` will disable and enable coverage
|
||||
respectively around a block of code.
|
||||
|
||||
Verilator may over-count combinatorial (non-clocked) blocks when those
|
||||
blocks receive signals which have had the :option:`UNOPTFLAT` warning
|
||||
disabled; for the most accurate results, do not disable this warning when
|
||||
|
|
@ -278,6 +270,22 @@ A :option:`/*verilator&32;coverage_off*/`
|
|||
signals that do not need toggle analysis, such as RAMs and register files.
|
||||
|
||||
|
||||
.. _Suppressing Coverage:
|
||||
|
||||
Suppressing Coverage
|
||||
--------------------
|
||||
|
||||
Using :option:`/*verilator&32;coverage_off*/` and
|
||||
:option:`/*verilator&32;coverage_on*/` around a block of code will disable
|
||||
and enable coverage respectively around that block. Or, use the
|
||||
:option:`coverage_block_off` configuration file option.
|
||||
|
||||
Verilator automatically disables coverage of lines and branches with a
|
||||
$stop in them, as it is assumed that $stop branches contain an error check
|
||||
that should not occur. A :option:`/*verilator&32;coverage_block_off*/`
|
||||
metacomment will perform a similar function on any code in that block or
|
||||
below.
|
||||
|
||||
.. _Coverage Collection:
|
||||
|
||||
Coverage Collection
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
**********
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*******************
|
||||
|
|
@ -1692,6 +1692,9 @@ List Of Warnings
|
|||
Warning that a symbol matches a C++ reserved word, and using this as a
|
||||
symbol name would result in odd C++ compiler errors. You may disable
|
||||
this warning, but Verilator will rename the symbol to avoid conflict.
|
||||
If you are using `--vpi` and only mark things as public for VPI access
|
||||
(and not C++ access) then it is advisable to disable this warning with
|
||||
:code:`-Wno-SYMRSVDWORD`.
|
||||
|
||||
|
||||
.. option:: SYNCASYNCNET
|
||||
|
|
|
|||
|
|
@ -1656,7 +1656,7 @@ field in the section below.
|
|||
+---------------+--------------------------------------------------------+
|
||||
| ``1:2:`` | The hierarchy of the ``VAR`` is the ``op2p`` |
|
||||
| | pointer under the ``MODULE``, which in turn is the |
|
||||
| | ``op1p`` pointer under the ``NETLIST`` |
|
||||
| | ``op1p`` pointer under the ``NETLIST``. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``VAR`` | The AstNodeType (e.g. ``AstVar``). |
|
||||
+---------------+--------------------------------------------------------+
|
||||
|
|
@ -1670,7 +1670,7 @@ field in the section below.
|
|||
| | and "aa" the 27th. Then line 22 in that file, then |
|
||||
| | column 8 (aa=0, az=25, ba=26, ...). |
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``@dt=0x...`` | The address of the data type this node contains. |
|
||||
| ``@dt=0x...`` | The address of the data type this node references. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``w32`` | The data-type width() is 32 bits. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
|
|
@ -1678,7 +1678,7 @@ field in the section below.
|
|||
| | variable. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``[O]`` | Flags which vary with the type of node, in this |
|
||||
| | case, it means the variable is an output. |
|
||||
| | case of a VAR, it means the variable is an output. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
|
||||
In more detail, the following fields are dumped common to all nodes. They
|
||||
|
|
@ -2411,7 +2411,7 @@ xsim_flags / xsim_flags2 / xsim_run_flags
|
|||
Distribution
|
||||
============
|
||||
|
||||
Copyright 2008-2024 by Wilson Snyder. Verilator is free software; you can
|
||||
Copyright 2008-2025 by Wilson Snyder. Verilator is free software; you can
|
||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||
|
||||
|
|
|
|||
|
|
@ -294,6 +294,7 @@ NaN
|
|||
Nalbantis
|
||||
Nandor
|
||||
Narayan
|
||||
Narcis
|
||||
Nassim
|
||||
Nauticus
|
||||
Newgard
|
||||
|
|
@ -343,6 +344,7 @@ Redhat
|
|||
Reitan
|
||||
Renga
|
||||
Requin
|
||||
Rodas
|
||||
Rodionov
|
||||
Rohan
|
||||
Rolfe
|
||||
|
|
@ -693,6 +695,7 @@ fno
|
|||
fopen
|
||||
forceable
|
||||
foreach
|
||||
fourstate
|
||||
fprintf
|
||||
fprofile
|
||||
fread
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ The XML document consists of 4 sections within the top level
|
|||
Distribution
|
||||
============
|
||||
|
||||
Copyright 2020-2024 by Wilson Snyder. Verilator is free software; you can
|
||||
Copyright 2020-2025 by Wilson Snyder. Verilator is free software; you can
|
||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||
|
||||
|
|
|
|||
|
|
@ -3907,16 +3907,18 @@ while (value)
|
|||
static int fstVcdIDForFwrite(char *buf, unsigned int value)
|
||||
{
|
||||
char *pnt = buf;
|
||||
int len = 0;
|
||||
|
||||
/* zero is illegal for a value...it is assumed they start at one */
|
||||
while (value)
|
||||
while (value && len <= 14)
|
||||
{
|
||||
value--;
|
||||
++len;
|
||||
*(pnt++) = (char)('!' + value % 94);
|
||||
value = value / 94;
|
||||
}
|
||||
|
||||
return(pnt - buf);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -2650,7 +2650,7 @@ const char* VerilatedContext::timeprecisionString() const VL_MT_SAFE {
|
|||
}
|
||||
|
||||
void VerilatedContext::threads(unsigned n) {
|
||||
if (n == 0) VL_FATAL_MT(__FILE__, __LINE__, "", "%Error: Simulation threads must be >= 1");
|
||||
if (n == 0) VL_FATAL_MT(__FILE__, __LINE__, "", "Simulation threads must be >= 1");
|
||||
|
||||
if (m_threadPool) {
|
||||
VL_FATAL_MT(
|
||||
|
|
@ -3326,7 +3326,7 @@ VerilatedScope::~VerilatedScope() {
|
|||
}
|
||||
|
||||
void VerilatedScope::configure(VerilatedSyms* symsp, const char* prefixp, const char* suffixp,
|
||||
const char* identifier, int8_t timeunit,
|
||||
const char* identifier, const char* defnamep, int8_t timeunit,
|
||||
const Type& type) VL_MT_UNSAFE {
|
||||
// Slowpath - called once/scope at construction
|
||||
// We don't want the space and reference-count access overhead of strings.
|
||||
|
|
@ -3343,6 +3343,7 @@ void VerilatedScope::configure(VerilatedSyms* symsp, const char* prefixp, const
|
|||
m_namep = namep;
|
||||
}
|
||||
m_identifierp = identifier;
|
||||
m_defnamep = defnamep;
|
||||
Verilated::threadContextp()->impp()->scopeInsert(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -100,7 +100,7 @@ class VerilatedFstC;
|
|||
class VerilatedFstSc;
|
||||
class VerilatedScope;
|
||||
class VerilatedScopeNameMap;
|
||||
template <class, class>
|
||||
template <typename, typename>
|
||||
class VerilatedTrace;
|
||||
class VerilatedTraceBaseC;
|
||||
class VerilatedTraceConfig;
|
||||
|
|
@ -300,7 +300,7 @@ public:
|
|||
|
||||
private:
|
||||
// The following are for use by Verilator internals only
|
||||
template <class, class>
|
||||
template <typename, typename>
|
||||
friend class VerilatedTrace;
|
||||
// Run-time trace configuration requested by this model
|
||||
virtual std::unique_ptr<VerilatedTraceConfig> traceConfig() const;
|
||||
|
|
@ -546,9 +546,9 @@ public:
|
|||
/// 1 = Set all bits to one
|
||||
/// 2 = Randomize all bits
|
||||
void randReset(int val) VL_MT_SAFE;
|
||||
/// Set default random seed, 0 = seed it automatically
|
||||
int randSeed() const VL_MT_SAFE { return m_s.m_randSeed; }
|
||||
/// Return default random seed
|
||||
int randSeed() const VL_MT_SAFE { return m_s.m_randSeed; }
|
||||
/// Set default random seed, 0 = seed it automatically
|
||||
void randSeed(int val) VL_MT_SAFE;
|
||||
|
||||
/// Return statistic: CPU time delta from model created until now
|
||||
|
|
@ -714,6 +714,7 @@ private:
|
|||
VerilatedVarNameMap* m_varsp = nullptr; // Variable map
|
||||
const char* m_namep = nullptr; // Scope name (Slowpath)
|
||||
const char* m_identifierp = nullptr; // Identifier of scope (with escapes removed)
|
||||
const char* m_defnamep = nullptr; // Definition name (SCOPE_MODULE only)
|
||||
int8_t m_timeunit = 0; // Timeunit in negative power-of-10
|
||||
Type m_type = SCOPE_OTHER; // Type of the scope
|
||||
|
||||
|
|
@ -721,13 +722,15 @@ public: // But internals only - called from VerilatedModule's
|
|||
VerilatedScope() = default;
|
||||
~VerilatedScope();
|
||||
void configure(VerilatedSyms* symsp, const char* prefixp, const char* suffixp,
|
||||
const char* identifier, int8_t timeunit, const Type& type) VL_MT_UNSAFE;
|
||||
const char* identifier, const char* defnamep, int8_t timeunit,
|
||||
const Type& type) VL_MT_UNSAFE;
|
||||
void exportInsert(int finalize, const char* namep, void* cb) VL_MT_UNSAFE;
|
||||
void varInsert(int finalize, const char* namep, void* datap, bool isParam,
|
||||
VerilatedVarType vltype, int vlflags, int dims, ...) VL_MT_UNSAFE;
|
||||
// ACCESSORS
|
||||
const char* name() const VL_MT_SAFE_POSTINIT { return m_namep; }
|
||||
const char* identifier() const VL_MT_SAFE_POSTINIT { return m_identifierp; }
|
||||
const char* defname() const VL_MT_SAFE_POSTINIT { return m_defnamep; }
|
||||
int8_t timeunit() const VL_MT_SAFE_POSTINIT { return m_timeunit; }
|
||||
VerilatedSyms* symsp() const VL_MT_SAFE_POSTINIT { return m_symsp; }
|
||||
VerilatedVar* varFind(const char* namep) const VL_MT_SAFE_POSTINIT;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
######################################################################
|
||||
# DESCRIPTION: Makefile commands for all verilated target files
|
||||
#
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
|
@ -23,6 +23,12 @@ PYTHON3 = @PYTHON3@
|
|||
CFG_WITH_CCWARN = @CFG_WITH_CCWARN@
|
||||
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
|
||||
|
||||
# Compiler version found during configure. This make variable is not used
|
||||
# here, but note that if this differs from what `$(CXX) --version` prints,
|
||||
# then there may be strange results such as unexpected warnings, as
|
||||
# configure determines compiler characteristics.
|
||||
CFG_CXX_VERSION = "@CFG_CXX_VERSION@"
|
||||
|
||||
# Compiler flags to enable profiling
|
||||
CFG_CXXFLAGS_PROFILE = @CFG_CXXFLAGS_PROFILE@
|
||||
# Select language required to compile (often empty)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -12,11 +12,11 @@
|
|||
//
|
||||
// DESCRIPTION: Verilator: Include in verilog files to hide verilator defines
|
||||
|
||||
`ifdef _VERILATED_V_ `else
|
||||
`ifndef _VERILATED_V_
|
||||
`define _VERILATED_V_ 1
|
||||
|
||||
// Hide verilator pragmas from other tools
|
||||
`ifdef VERILATOR `else
|
||||
`ifndef VERILATOR
|
||||
`define coverage_block_off
|
||||
`endif
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -71,7 +71,7 @@ public: // But only local to this file
|
|||
// This isn't in the header file for auto-magic conversion because it
|
||||
// inlines to too much code and makes compilation too slow.
|
||||
|
||||
template <class T>
|
||||
template <typename T>
|
||||
class VerilatedCoverItemSpec final : public VerilatedCovImpItem {
|
||||
private:
|
||||
// MEMBERS
|
||||
|
|
@ -233,7 +233,7 @@ private:
|
|||
// Little selftest
|
||||
#define SELF_CHECK(got, exp) \
|
||||
do { \
|
||||
if ((got) != (exp)) VL_FATAL_MT(__FILE__, __LINE__, "", "%Error: selftest"); \
|
||||
if ((got) != (exp)) VL_FATAL_MT(__FILE__, __LINE__, "", "selftest"); \
|
||||
} while (0)
|
||||
SELF_CHECK(combineHier("a.b.c", "a.b.c"), "a.b.c");
|
||||
SELF_CHECK(combineHier("a.b.c", "a.b"), "a.b*");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2009-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2009-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// THIS MODULE IS PUBLICLY LICENSED
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||
//=============================================================================
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -1604,26 +1604,26 @@ static inline IData VL_PACK_II(int obits, int lbits, const VlQueue<IData>& q) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline IData VL_PACK_II(int obits, int lbits, const VlUnpacked<CData, T_Depth>& q) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline IData VL_PACK_II(int obits, int lbits, const VlUnpacked<CData, N_Depth>& q) {
|
||||
IData ret = 0;
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
ret |= static_cast<IData>(q[T_Depth - 1 - i]) << (i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
ret |= static_cast<IData>(q[N_Depth - 1 - i]) << (i * lbits);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline IData VL_PACK_II(int obits, int lbits, const VlUnpacked<SData, T_Depth>& q) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline IData VL_PACK_II(int obits, int lbits, const VlUnpacked<SData, N_Depth>& q) {
|
||||
IData ret = 0;
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
ret |= static_cast<IData>(q[T_Depth - 1 - i]) << (i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
ret |= static_cast<IData>(q[N_Depth - 1 - i]) << (i * lbits);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline IData VL_PACK_II(int obits, int lbits, const VlUnpacked<IData, T_Depth>& q) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline IData VL_PACK_II(int obits, int lbits, const VlUnpacked<IData, N_Depth>& q) {
|
||||
IData ret = 0;
|
||||
for (size_t i = 0; i < T_Depth; ++i) ret |= q[T_Depth - 1 - i] << (i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i) ret |= q[N_Depth - 1 - i] << (i * lbits);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1645,27 +1645,27 @@ static inline QData VL_PACK_QI(int obits, int lbits, const VlQueue<IData>& q) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline QData VL_PACK_QI(int obits, int lbits, const VlUnpacked<CData, T_Depth>& q) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline QData VL_PACK_QI(int obits, int lbits, const VlUnpacked<CData, N_Depth>& q) {
|
||||
QData ret = 0;
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
ret |= static_cast<QData>(q[T_Depth - 1 - i]) << (i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
ret |= static_cast<QData>(q[N_Depth - 1 - i]) << (i * lbits);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline QData VL_PACK_QI(int obits, int lbits, const VlUnpacked<SData, T_Depth>& q) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline QData VL_PACK_QI(int obits, int lbits, const VlUnpacked<SData, N_Depth>& q) {
|
||||
QData ret = 0;
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
ret |= static_cast<QData>(q[T_Depth - 1 - i]) << (i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
ret |= static_cast<QData>(q[N_Depth - 1 - i]) << (i * lbits);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline QData VL_PACK_QI(int obits, int lbits, const VlUnpacked<IData, T_Depth>& q) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline QData VL_PACK_QI(int obits, int lbits, const VlUnpacked<IData, N_Depth>& q) {
|
||||
QData ret = 0;
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
ret |= static_cast<QData>(q[T_Depth - 1 - i]) << (i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
ret |= static_cast<QData>(q[N_Depth - 1 - i]) << (i * lbits);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1675,10 +1675,10 @@ static inline QData VL_PACK_QQ(int obits, int lbits, const VlQueue<QData>& q) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline QData VL_PACK_QQ(int obits, int lbits, const VlUnpacked<QData, T_Depth>& q) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline QData VL_PACK_QQ(int obits, int lbits, const VlUnpacked<QData, N_Depth>& q) {
|
||||
QData ret = 0;
|
||||
for (size_t i = 0; i < T_Depth; ++i) ret |= q[T_Depth - 1 - i] << (i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i) ret |= q[N_Depth - 1 - i] << (i * lbits);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1703,30 +1703,30 @@ static inline WDataOutP VL_PACK_WI(int obits, int lbits, WDataOutP owp, const Vl
|
|||
return owp;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
template <std::size_t N_Depth>
|
||||
static inline WDataOutP VL_PACK_WI(int obits, int lbits, WDataOutP owp,
|
||||
const VlUnpacked<CData, T_Depth>& q) {
|
||||
const VlUnpacked<CData, N_Depth>& q) {
|
||||
VL_MEMSET_ZERO_W(owp + 1, VL_WORDS_I(obits) - 1);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
_vl_insert_WI(owp, q[T_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
_vl_insert_WI(owp, q[N_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
return owp;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
template <std::size_t N_Depth>
|
||||
static inline WDataOutP VL_PACK_WI(int obits, int lbits, WDataOutP owp,
|
||||
const VlUnpacked<SData, T_Depth>& q) {
|
||||
const VlUnpacked<SData, N_Depth>& q) {
|
||||
VL_MEMSET_ZERO_W(owp + 1, VL_WORDS_I(obits) - 1);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
_vl_insert_WI(owp, q[T_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
_vl_insert_WI(owp, q[N_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
return owp;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
template <std::size_t N_Depth>
|
||||
static inline WDataOutP VL_PACK_WI(int obits, int lbits, WDataOutP owp,
|
||||
const VlUnpacked<IData, T_Depth>& q) {
|
||||
const VlUnpacked<IData, N_Depth>& q) {
|
||||
VL_MEMSET_ZERO_W(owp + 1, VL_WORDS_I(obits) - 1);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
_vl_insert_WI(owp, q[T_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
_vl_insert_WI(owp, q[N_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
return owp;
|
||||
}
|
||||
|
||||
|
|
@ -1737,30 +1737,30 @@ static inline WDataOutP VL_PACK_WQ(int obits, int lbits, WDataOutP owp, const Vl
|
|||
return owp;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
template <std::size_t N_Depth>
|
||||
static inline WDataOutP VL_PACK_WQ(int obits, int lbits, WDataOutP owp,
|
||||
const VlUnpacked<QData, T_Depth>& q) {
|
||||
const VlUnpacked<QData, N_Depth>& q) {
|
||||
VL_MEMSET_ZERO_W(owp + 1, VL_WORDS_I(obits) - 1);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
_vl_insert_WQ(owp, q[T_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
_vl_insert_WQ(owp, q[N_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
return owp;
|
||||
}
|
||||
|
||||
template <std::size_t N>
|
||||
template <std::size_t N_Words>
|
||||
static inline WDataOutP VL_PACK_WW(int obits, int lbits, WDataOutP owp,
|
||||
const VlQueue<VlWide<N>>& q) {
|
||||
const VlQueue<VlWide<N_Words>>& q) {
|
||||
VL_MEMSET_ZERO_W(owp + 1, VL_WORDS_I(obits) - 1);
|
||||
for (size_t i = 0; i < q.size(); ++i)
|
||||
_vl_insert_WW(owp, q.at(i), i * lbits + lbits - 1, i * lbits);
|
||||
return owp;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth, std::size_t N>
|
||||
template <std::size_t N_Depth, std::size_t N_Words>
|
||||
static inline WDataOutP VL_PACK_WW(int obits, int lbits, WDataOutP owp,
|
||||
const VlUnpacked<VlWide<N>, T_Depth>& q) {
|
||||
const VlUnpacked<VlWide<N_Words>, N_Depth>& q) {
|
||||
VL_MEMSET_ZERO_W(owp + 1, VL_WORDS_I(obits) - 1);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
_vl_insert_WW(owp, q[T_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
_vl_insert_WW(owp, q[N_Depth - 1 - i], i * lbits + lbits - 1, i * lbits);
|
||||
return owp;
|
||||
}
|
||||
|
||||
|
|
@ -2288,8 +2288,8 @@ static inline void VL_UNPACK_QW(int lbits, int rbits, VlQueue<QData>& q, WDataIn
|
|||
}
|
||||
}
|
||||
|
||||
template <std::size_t N>
|
||||
static inline void VL_UNPACK_WW(int lbits, int rbits, VlQueue<VlWide<N>>& q, WDataInP rwp) {
|
||||
template <std::size_t N_Words>
|
||||
static inline void VL_UNPACK_WW(int lbits, int rbits, VlQueue<VlWide<N_Words>>& q, WDataInP rwp) {
|
||||
const int size = (rbits + lbits - 1) / lbits;
|
||||
q.renew(size);
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
|
|
@ -2297,85 +2297,85 @@ static inline void VL_UNPACK_WW(int lbits, int rbits, VlQueue<VlWide<N>>& q, WDa
|
|||
}
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_II(int lbits, int rbits, VlUnpacked<CData, T_Depth>& q, IData from) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_II(int lbits, int rbits, VlUnpacked<CData, N_Depth>& q, IData from) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i) q[i] = (from >> ((T_Depth - 1 - i) * lbits)) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i) q[i] = (from >> ((N_Depth - 1 - i) * lbits)) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_II(int lbits, int rbits, VlUnpacked<SData, T_Depth>& q, IData from) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_II(int lbits, int rbits, VlUnpacked<SData, N_Depth>& q, IData from) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i) q[i] = (from >> ((T_Depth - 1 - i) * lbits)) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i) q[i] = (from >> ((N_Depth - 1 - i) * lbits)) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_II(int lbits, int rbits, VlUnpacked<IData, T_Depth>& q, IData from) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_II(int lbits, int rbits, VlUnpacked<IData, N_Depth>& q, IData from) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i) q[i] = (from >> ((T_Depth - 1 - i) * lbits)) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i) q[i] = (from >> ((N_Depth - 1 - i) * lbits)) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_IQ(int lbits, int rbits, VlUnpacked<CData, T_Depth>& q, QData from) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_IQ(int lbits, int rbits, VlUnpacked<CData, N_Depth>& q, QData from) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i) q[i] = (from >> ((T_Depth - 1 - i) * lbits)) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i) q[i] = (from >> ((N_Depth - 1 - i) * lbits)) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_IQ(int lbits, int rbits, VlUnpacked<SData, T_Depth>& q, QData from) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_IQ(int lbits, int rbits, VlUnpacked<SData, N_Depth>& q, QData from) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i) q[i] = (from >> ((T_Depth - 1 - i) * lbits)) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i) q[i] = (from >> ((N_Depth - 1 - i) * lbits)) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_IQ(int lbits, int rbits, VlUnpacked<IData, T_Depth>& q, QData from) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_IQ(int lbits, int rbits, VlUnpacked<IData, N_Depth>& q, QData from) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i) q[i] = (from >> ((T_Depth - 1 - i) * lbits)) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i) q[i] = (from >> ((N_Depth - 1 - i) * lbits)) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_QQ(int lbits, int rbits, VlUnpacked<QData, T_Depth>& q, QData from) {
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_QQ(int lbits, int rbits, VlUnpacked<QData, N_Depth>& q, QData from) {
|
||||
const QData mask = VL_MASK_Q(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i) q[i] = (from >> ((T_Depth - 1 - i) * lbits)) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i) q[i] = (from >> ((N_Depth - 1 - i) * lbits)) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_IW(int lbits, int rbits, VlUnpacked<CData, T_Depth>& q,
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_IW(int lbits, int rbits, VlUnpacked<CData, N_Depth>& q,
|
||||
WDataInP rwp) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
q[i] = VL_SEL_IWII(rbits, rwp, (T_Depth - 1 - i) * lbits, lbits) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
q[i] = VL_SEL_IWII(rbits, rwp, (N_Depth - 1 - i) * lbits, lbits) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_IW(int lbits, int rbits, VlUnpacked<SData, T_Depth>& q,
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_IW(int lbits, int rbits, VlUnpacked<SData, N_Depth>& q,
|
||||
WDataInP rwp) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
q[i] = VL_SEL_IWII(rbits, rwp, (T_Depth - 1 - i) * lbits, lbits) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
q[i] = VL_SEL_IWII(rbits, rwp, (N_Depth - 1 - i) * lbits, lbits) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_IW(int lbits, int rbits, VlUnpacked<IData, T_Depth>& q,
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_IW(int lbits, int rbits, VlUnpacked<IData, N_Depth>& q,
|
||||
WDataInP rwp) {
|
||||
const IData mask = VL_MASK_I(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
q[i] = VL_SEL_IWII(rbits, rwp, (T_Depth - 1 - i) * lbits, lbits) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
q[i] = VL_SEL_IWII(rbits, rwp, (N_Depth - 1 - i) * lbits, lbits) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth>
|
||||
static inline void VL_UNPACK_QW(int lbits, int rbits, VlUnpacked<QData, T_Depth>& q,
|
||||
template <std::size_t N_Depth>
|
||||
static inline void VL_UNPACK_QW(int lbits, int rbits, VlUnpacked<QData, N_Depth>& q,
|
||||
WDataInP rwp) {
|
||||
const QData mask = VL_MASK_Q(lbits);
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
q[i] = VL_SEL_QWII(rbits, rwp, (T_Depth - 1 - i) * lbits, lbits) & mask;
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
q[i] = VL_SEL_QWII(rbits, rwp, (N_Depth - 1 - i) * lbits, lbits) & mask;
|
||||
}
|
||||
|
||||
template <std::size_t T_Depth, std::size_t N>
|
||||
static inline void VL_UNPACK_WW(int lbits, int rbits, VlUnpacked<VlWide<N>, T_Depth>& q,
|
||||
template <std::size_t N_Depth, std::size_t N_Words>
|
||||
static inline void VL_UNPACK_WW(int lbits, int rbits, VlUnpacked<VlWide<N_Words>, N_Depth>& q,
|
||||
WDataInP rwp) {
|
||||
for (size_t i = 0; i < T_Depth; ++i)
|
||||
VL_SEL_WWII(lbits, rbits, q[i], rwp, (T_Depth - 1 - i) * lbits, lbits);
|
||||
for (size_t i = 0; i < N_Depth; ++i)
|
||||
VL_SEL_WWII(lbits, rbits, q[i], rwp, (N_Depth - 1 - i) * lbits, lbits);
|
||||
}
|
||||
|
||||
// Return QData from double (numeric)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2009-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2009-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2012-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2012-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2012-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2012-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -198,7 +198,7 @@ public:
|
|||
//=============================================================================
|
||||
// VlPgoProfiler is for collecting profiling data for PGO
|
||||
|
||||
template <std::size_t T_Entries>
|
||||
template <std::size_t N_Entries>
|
||||
class VlPgoProfiler final {
|
||||
// TYPES
|
||||
struct Record final {
|
||||
|
|
@ -207,7 +207,7 @@ class VlPgoProfiler final {
|
|||
};
|
||||
|
||||
// Counters are stored packed, all together to reduce cache effects
|
||||
std::array<uint64_t, T_Entries> m_counters; // Time spent on this record
|
||||
std::array<uint64_t, N_Entries> m_counters; // Time spent on this record
|
||||
std::vector<Record> m_records; // Record information
|
||||
|
||||
public:
|
||||
|
|
@ -216,7 +216,7 @@ public:
|
|||
~VlPgoProfiler() = default;
|
||||
void write(const char* modelp, const std::string& filename) VL_MT_SAFE;
|
||||
void addCounter(size_t counter, const std::string& name) {
|
||||
VL_DEBUG_IF(assert(counter < T_Entries););
|
||||
VL_DEBUG_IF(assert(counter < N_Entries););
|
||||
m_records.emplace_back(Record{name, counter});
|
||||
}
|
||||
void startCounter(size_t counter) {
|
||||
|
|
@ -227,8 +227,8 @@ public:
|
|||
void stopCounter(size_t counter) { m_counters[counter] += VL_CPU_TICK(); }
|
||||
};
|
||||
|
||||
template <std::size_t T_Entries>
|
||||
void VlPgoProfiler<T_Entries>::write(const char* modelp, const std::string& filename) VL_MT_SAFE {
|
||||
template <std::size_t N_Entries>
|
||||
void VlPgoProfiler<N_Entries>::write(const char* modelp, const std::string& filename) VL_MT_SAFE {
|
||||
static VerilatedMutex s_mutex;
|
||||
const VerilatedLockGuard lock{s_mutex};
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "verilated_random.h"
|
||||
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <streambuf>
|
||||
|
|
@ -281,37 +282,6 @@ std::string parseNestedSelect(const std::string& nested_select_expr,
|
|||
indices.push_back(idx);
|
||||
return name;
|
||||
}
|
||||
|
||||
std::string flattenIndices(const std::vector<std::string>& indices, const VlRandomVar* const var) {
|
||||
int flattenedIndex = 0;
|
||||
int multiplier = 1;
|
||||
for (int i = indices.size() - 1; i >= 0; --i) {
|
||||
int indexValue = 0;
|
||||
std::string trimmedIndex = indices[i];
|
||||
|
||||
trimmedIndex.erase(0, trimmedIndex.find_first_not_of(" \t"));
|
||||
trimmedIndex.erase(trimmedIndex.find_last_not_of(" \t") + 1);
|
||||
|
||||
if (trimmedIndex.find("#x") == 0) {
|
||||
indexValue = std::strtoul(trimmedIndex.substr(2).c_str(), nullptr, 16);
|
||||
} else if (trimmedIndex.find("#b") == 0) {
|
||||
indexValue = std::strtoul(trimmedIndex.substr(2).c_str(), nullptr, 2);
|
||||
} else {
|
||||
indexValue = std::strtoul(trimmedIndex.c_str(), nullptr, 10);
|
||||
}
|
||||
const int length = var->getLength(i);
|
||||
if (length == -1) {
|
||||
VL_WARN_MT(__FILE__, __LINE__, "randomize",
|
||||
"Internal: Wrong Call: Only RandomArray can call getLength()");
|
||||
break;
|
||||
}
|
||||
flattenedIndex += indexValue * multiplier;
|
||||
multiplier *= length;
|
||||
}
|
||||
std::string hexString = std::to_string(flattenedIndex);
|
||||
while (hexString.size() < 8) { hexString.insert(0, "0"); }
|
||||
return "#x" + hexString;
|
||||
}
|
||||
//======================================================================
|
||||
// VlRandomizer:: Methods
|
||||
|
||||
|
|
@ -404,7 +374,11 @@ bool VlRandomizer::next(VlRNG& rngr) {
|
|||
f << "(define-fun __Vbv ((b Bool)) (_ BitVec 1) (ite b #b1 #b0))\n";
|
||||
f << "(define-fun __Vbool ((v (_ BitVec 1))) Bool (= #b1 v))\n";
|
||||
for (const auto& var : m_vars) {
|
||||
f << "(declare-fun " << var.second->name() << " () ";
|
||||
if (var.second->dimension() > 0) {
|
||||
auto arrVarsp = std::make_shared<const ArrayInfoMap>(m_arr_vars);
|
||||
var.second->setArrayInfo(arrVarsp);
|
||||
}
|
||||
f << "(declare-fun " << var.first << " () ";
|
||||
var.second->emitType(f);
|
||||
f << ")\n";
|
||||
}
|
||||
|
|
@ -444,9 +418,14 @@ bool VlRandomizer::parseSolution(std::iostream& f) {
|
|||
}
|
||||
|
||||
f << "(get-value (";
|
||||
for (const auto& var : m_vars) var.second->emitGetValue(f);
|
||||
for (const auto& var : m_vars) {
|
||||
if (var.second->dimension() > 0) {
|
||||
auto arrVarsp = std::make_shared<const ArrayInfoMap>(m_arr_vars);
|
||||
var.second->setArrayInfo(arrVarsp);
|
||||
}
|
||||
var.second->emitGetValue(f);
|
||||
}
|
||||
f << "))\n";
|
||||
|
||||
// Quasi-parse S-expression of the form ((x #xVALUE) (y #bVALUE) (z #xVALUE))
|
||||
char c;
|
||||
f >> c;
|
||||
|
|
@ -455,7 +434,6 @@ bool VlRandomizer::parseSolution(std::iostream& f) {
|
|||
"Internal: Unable to parse solver's response: invalid S-expression");
|
||||
return false;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
f >> c;
|
||||
if (c == ')') break;
|
||||
|
|
@ -471,7 +449,6 @@ bool VlRandomizer::parseSolution(std::iostream& f) {
|
|||
if (name == "(select") {
|
||||
const std::string selectExpr = readUntilBalanced(f);
|
||||
name = parseNestedSelect(selectExpr, indices);
|
||||
idx = indices[0];
|
||||
}
|
||||
std::getline(f, value, ')');
|
||||
const auto it = m_vars.find(name);
|
||||
|
|
@ -480,12 +457,34 @@ bool VlRandomizer::parseSolution(std::iostream& f) {
|
|||
if (m_randmode && !varr.randModeIdxNone()) {
|
||||
if (!(m_randmode->at(varr.randModeIdx()))) continue;
|
||||
}
|
||||
if (indices.size() > 1) {
|
||||
const std::string flattenedIndex = flattenIndices(indices, &varr);
|
||||
varr.set(flattenedIndex, value);
|
||||
} else {
|
||||
varr.set(idx, value);
|
||||
if (!indices.empty()) {
|
||||
std::ostringstream oss;
|
||||
oss << varr.name();
|
||||
for (const auto& hex_index : indices) {
|
||||
const size_t start = hex_index.find_first_not_of(" ");
|
||||
if (start == std::string::npos || hex_index.substr(start, 2) != "#x") {
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "randomize",
|
||||
"hex_index contains invalid format");
|
||||
continue;
|
||||
}
|
||||
const long long index = std::stoll(hex_index.substr(start + 2), nullptr, 16);
|
||||
oss << "[" << index << "]";
|
||||
}
|
||||
const std::string indexed_name = oss.str();
|
||||
const auto it = std::find_if(m_arr_vars.begin(), m_arr_vars.end(),
|
||||
[&indexed_name](const auto& entry) {
|
||||
return entry.second->m_name == indexed_name;
|
||||
});
|
||||
if (it != m_arr_vars.end()) {
|
||||
std::ostringstream ss;
|
||||
ss << "#x" << std::hex << std::setw(8) << std::setfill('0') << it->second->m_index;
|
||||
idx = ss.str();
|
||||
} else {
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "randomize",
|
||||
"indexed_name not found in m_arr_vars");
|
||||
}
|
||||
}
|
||||
varr.set(idx, value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,29 @@
|
|||
|
||||
#include "verilated.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
|
||||
//=============================================================================
|
||||
// VlRandomExpr and subclasses represent expressions for the constraint solver.
|
||||
class ArrayInfo final {
|
||||
public:
|
||||
const std::string
|
||||
m_name; // Name of the array variable, including index notation (e.g., arr[2][1])
|
||||
void* const m_datap; // Reference to the array variable data
|
||||
const int m_index; // Flattened (1D) index of the array element
|
||||
const std::vector<size_t> m_indices; // Multi-dimensional indices of the array element
|
||||
const std::vector<size_t> m_idxWidths; // Multi-dimensional indices' bit widths
|
||||
|
||||
ArrayInfo(const std::string& name, void* datap, int index, const std::vector<size_t>& indices,
|
||||
const std::vector<size_t>& idxWidths)
|
||||
: m_name(name)
|
||||
, m_datap(datap)
|
||||
, m_index(index)
|
||||
, m_indices(indices)
|
||||
, m_idxWidths(idxWidths) {}
|
||||
};
|
||||
using ArrayInfoMap = std::map<std::string, std::shared_ptr<const ArrayInfo>>;
|
||||
|
||||
class VlRandomVar VL_NOT_FINAL {
|
||||
const char* const m_name; // Variable name
|
||||
|
|
@ -58,129 +77,100 @@ public:
|
|||
virtual void emitExtract(std::ostream& s, int i) const;
|
||||
virtual void emitType(std::ostream& s) const;
|
||||
virtual int totalWidth() const;
|
||||
virtual int getLength(int dimension) const { return -1; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class VlRandomQueueVar final : public VlRandomVar {
|
||||
public:
|
||||
VlRandomQueueVar(const char* name, int width, void* datap, int dimension,
|
||||
std::uint32_t randModeIdx)
|
||||
: VlRandomVar{name, width, datap, dimension, randModeIdx} {}
|
||||
void* datap(int idx) const override {
|
||||
return &static_cast<T*>(VlRandomVar::datap(idx))->atWrite(idx);
|
||||
mutable std::shared_ptr<const ArrayInfoMap> m_arrVarsRefp;
|
||||
void setArrayInfo(const std::shared_ptr<const ArrayInfoMap>& arrVarsRefp) const {
|
||||
m_arrVarsRefp = arrVarsRefp;
|
||||
}
|
||||
void emitSelect(std::ostream& s, int i) const {
|
||||
s << " (select " << name() << " #x";
|
||||
for (int j = 28; j >= 0; j -= 4) s << "0123456789abcdef"[(i >> j) & 0xf];
|
||||
s << ')';
|
||||
}
|
||||
void emitGetValue(std::ostream& s) const override {
|
||||
const int length = static_cast<T*>(VlRandomVar::datap(0))->size();
|
||||
for (int i = 0; i < length; i++) emitSelect(s, i);
|
||||
}
|
||||
void emitType(std::ostream& s) const override {
|
||||
s << "(Array (_ BitVec 32) (_ BitVec " << width() << "))";
|
||||
}
|
||||
int totalWidth() const override {
|
||||
const int length = static_cast<T*>(VlRandomVar::datap(0))->size();
|
||||
return width() * length;
|
||||
}
|
||||
void emitExtract(std::ostream& s, int i) const override {
|
||||
const int j = i / width();
|
||||
i = i % width();
|
||||
s << " ((_ extract " << i << ' ' << i << ')';
|
||||
emitSelect(s, j);
|
||||
s << ')';
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class VlRandomArrayVar final : public VlRandomVar {
|
||||
public:
|
||||
VlRandomArrayVar(const char* name, int width, void* datap, int dimension,
|
||||
std::uint32_t randModeIdx)
|
||||
: VlRandomVar{name, width, datap, dimension, randModeIdx} {}
|
||||
|
||||
void* datap(int idx) const override {
|
||||
if (idx < 0) return &static_cast<T*>(VlRandomVar::datap(0))->operator[](0);
|
||||
std::vector<size_t> indices(dimension());
|
||||
for (int dim = dimension() - 1; dim >= 0; --dim) {
|
||||
const int length = getLength(dim);
|
||||
indices[dim] = idx % length;
|
||||
idx /= length;
|
||||
mutable std::map<std::string, int> count_cache;
|
||||
int countMatchingElements(const ArrayInfoMap& arr_vars, const std::string& base_name) const {
|
||||
if (VL_LIKELY(count_cache.find(base_name) != count_cache.end()))
|
||||
return count_cache[base_name];
|
||||
int count = 0;
|
||||
for (int index = 0; arr_vars.find(base_name + std::to_string(index)) != arr_vars.end();
|
||||
++index) {
|
||||
++count;
|
||||
}
|
||||
return &static_cast<T*>(VlRandomVar::datap(0))->find_element(indices);
|
||||
count_cache[base_name] = count;
|
||||
return count;
|
||||
}
|
||||
|
||||
void emitSelect(std::ostream& s, const std::vector<int>& indices) const {
|
||||
};
|
||||
template <typename T>
|
||||
class VlRandomArrayVarTemplate final : public VlRandomVar {
|
||||
public:
|
||||
VlRandomArrayVarTemplate(const char* name, int width, void* datap, int dimension,
|
||||
std::uint32_t randModeIdx)
|
||||
: VlRandomVar{name, width, datap, dimension, randModeIdx} {}
|
||||
void* datap(int idx) const override {
|
||||
const std::string indexed_name = name() + std::to_string(idx);
|
||||
const auto it = m_arrVarsRefp->find(indexed_name);
|
||||
if (it != m_arrVarsRefp->end()) {
|
||||
return it->second->m_datap;
|
||||
} else {
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "randomize", "indexed_name not found in m_arr_vars");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
void emitSelect(std::ostream& s, const std::vector<size_t>& indices,
|
||||
const std::vector<size_t>& idxWidths) const {
|
||||
for (size_t idx = 0; idx < indices.size(); ++idx) s << "(select ";
|
||||
s << name();
|
||||
for (size_t idx = 0; idx < indices.size(); ++idx) {
|
||||
s << " #x";
|
||||
for (int j = 28; j >= 0; j -= 4) {
|
||||
const size_t bit_width = idxWidths[idx];
|
||||
for (int j = bit_width - 4; j >= 0; j -= 4) {
|
||||
s << "0123456789abcdef"[(indices[idx] >> j) & 0xf];
|
||||
}
|
||||
s << ")";
|
||||
}
|
||||
}
|
||||
|
||||
int getLength(int dimension) const override {
|
||||
const auto var = static_cast<const T*>(datap(-1));
|
||||
const int lenth = var->find_length(dimension);
|
||||
return lenth;
|
||||
}
|
||||
|
||||
void emitGetValue(std::ostream& s) const override {
|
||||
const int total_dimensions = dimension();
|
||||
std::vector<int> lengths;
|
||||
for (int dim = 0; dim < total_dimensions; dim++) {
|
||||
const int len = getLength(dim);
|
||||
lengths.push_back(len);
|
||||
}
|
||||
std::vector<int> indices(total_dimensions, 0);
|
||||
while (true) {
|
||||
emitSelect(s, indices);
|
||||
int currentDimension = total_dimensions - 1;
|
||||
while (currentDimension >= 0
|
||||
&& ++indices[currentDimension] >= lengths[currentDimension]) {
|
||||
indices[currentDimension] = 0;
|
||||
--currentDimension;
|
||||
const int elementCounts = countMatchingElements(*m_arrVarsRefp, name());
|
||||
for (int i = 0; i < elementCounts; i++) {
|
||||
const std::string indexed_name = name() + std::to_string(i);
|
||||
const auto it = m_arrVarsRefp->find(indexed_name);
|
||||
if (it != m_arrVarsRefp->end()) {
|
||||
const std::vector<size_t>& indices = it->second->m_indices;
|
||||
const std::vector<size_t>& idxWidths = it->second->m_idxWidths;
|
||||
emitSelect(s, indices, idxWidths);
|
||||
} else {
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "randomize",
|
||||
"indexed_name not found in m_arr_vars");
|
||||
}
|
||||
if (currentDimension < 0) break;
|
||||
}
|
||||
}
|
||||
|
||||
void emitType(std::ostream& s) const override {
|
||||
if (dimension() > 0) {
|
||||
for (int i = 0; i < dimension(); ++i) s << "(Array (_ BitVec 32) ";
|
||||
s << "(_ BitVec " << width() << ")";
|
||||
for (int i = 0; i < dimension(); ++i) s << ")";
|
||||
const std::string indexed_name = name() + std::to_string(0);
|
||||
const auto it = m_arrVarsRefp->find(indexed_name);
|
||||
if (it != m_arrVarsRefp->end()) {
|
||||
const std::vector<size_t>& idxWidths = it->second->m_idxWidths;
|
||||
if (dimension() > 0) {
|
||||
for (int i = 0; i < dimension(); ++i) {
|
||||
s << "(Array (_ BitVec " << idxWidths[i] << ") ";
|
||||
}
|
||||
s << "(_ BitVec " << width() << ")";
|
||||
for (int i = 0; i < dimension(); ++i) { s << ")"; }
|
||||
}
|
||||
} else {
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "randomize", "indexed_name not found in m_arr_vars");
|
||||
}
|
||||
}
|
||||
|
||||
int totalWidth() const override {
|
||||
int totalLength = 1;
|
||||
for (int dim = 0; dim < dimension(); ++dim) {
|
||||
const int length = getLength(dim);
|
||||
if (length == -1) return 0;
|
||||
totalLength *= length;
|
||||
}
|
||||
return width() * totalLength;
|
||||
const int elementCounts = countMatchingElements(*m_arrVarsRefp, name());
|
||||
return width() * elementCounts;
|
||||
}
|
||||
|
||||
void emitExtract(std::ostream& s, int i) const override {
|
||||
const int j = i / width();
|
||||
i = i % width();
|
||||
std::vector<int> indices(dimension());
|
||||
int idx = j;
|
||||
for (int dim = dimension() - 1; dim >= 0; --dim) {
|
||||
int length = getLength(dim);
|
||||
indices[dim] = idx % length;
|
||||
idx /= length;
|
||||
}
|
||||
s << " ((_ extract " << i << ' ' << i << ')';
|
||||
emitSelect(s, indices);
|
||||
const std::string indexed_name = name() + std::to_string(j);
|
||||
const auto it = m_arrVarsRefp->find(indexed_name);
|
||||
if (it != m_arrVarsRefp->end()) {
|
||||
const std::vector<size_t>& indices = it->second->m_indices;
|
||||
const std::vector<size_t>& idxWidths = it->second->m_idxWidths;
|
||||
emitSelect(s, indices, idxWidths);
|
||||
} else {
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "randomize", "indexed_name not found in m_arr_vars");
|
||||
}
|
||||
s << ')';
|
||||
}
|
||||
};
|
||||
|
|
@ -192,6 +182,8 @@ class VlRandomizer final {
|
|||
std::vector<std::string> m_constraints; // Solver-dependent constraints
|
||||
std::map<std::string, std::shared_ptr<const VlRandomVar>> m_vars; // Solver-dependent
|
||||
// variables
|
||||
ArrayInfoMap m_arr_vars; // Tracks each element in array structures for iteration
|
||||
std::map<size_t, std::string> seen_values; // Record String Index to avoid conflicts
|
||||
const VlQueue<CData>* m_randmode; // rand_mode state;
|
||||
|
||||
// PRIVATE METHODS
|
||||
|
|
@ -206,6 +198,47 @@ public:
|
|||
// METHODS
|
||||
// Finds the next solution satisfying the constraints
|
||||
bool next(VlRNG& rngr);
|
||||
|
||||
template <typename T_Key>
|
||||
typename std::enable_if<std::is_integral<T_Key>::value>::type
|
||||
process_key(const T_Key& key, std::string& indexed_name, size_t& integral_index,
|
||||
const std::string& base_name, size_t& idx_width) {
|
||||
integral_index = static_cast<size_t>(key);
|
||||
indexed_name = base_name + "[" + std::to_string(integral_index) + "]";
|
||||
idx_width = sizeof(T_Key) * 8;
|
||||
}
|
||||
template <typename T_Key>
|
||||
typename std::enable_if<std::is_same<T_Key, std::string>::value>::type
|
||||
process_key(const T_Key& key, std::string& indexed_name, size_t& integral_index,
|
||||
const std::string& base_name, size_t& idx_width) {
|
||||
integral_index = string_to_integral(key);
|
||||
indexed_name = base_name + "[" + std::to_string(integral_index) + "]";
|
||||
idx_width = 64; // 64-bit mask
|
||||
}
|
||||
template <typename T_Key>
|
||||
typename std::enable_if<!std::is_integral<T_Key>::value
|
||||
&& !std::is_same<T_Key, std::string>::value>::type
|
||||
process_key(const T_Key& key, std::string& indexed_name, size_t& integral_index,
|
||||
const std::string& base_name, size_t& idx_width) {
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "randomize",
|
||||
"Unsupported: Only integral and string index of associative array is "
|
||||
"supported currently.");
|
||||
}
|
||||
|
||||
uint64_t string_to_integral(const std::string& str) {
|
||||
uint64_t result = 0;
|
||||
for (char c : str) { result = (result << 8) | static_cast<uint64_t>(c); }
|
||||
|
||||
#ifdef VL_DEBUG
|
||||
if (seen_values.count(result) > 0 && seen_values[result] != str)
|
||||
VL_WARN_MT(__FILE__, __LINE__, "randomize",
|
||||
"Conflict detected: Different strings mapped to the same 64-bit index.");
|
||||
seen_values[result] = str;
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void write_var(T& var, int width, const char* name, int dimension,
|
||||
std::uint32_t randmodeIdx = std::numeric_limits<std::uint32_t>::max()) {
|
||||
|
|
@ -218,16 +251,103 @@ public:
|
|||
void write_var(VlQueue<T>& var, int width, const char* name, int dimension,
|
||||
std::uint32_t randmodeIdx = std::numeric_limits<std::uint32_t>::max()) {
|
||||
if (m_vars.find(name) != m_vars.end()) return;
|
||||
m_vars[name] = std::make_shared<const VlRandomQueueVar<VlQueue<T>>>(
|
||||
m_vars[name] = std::make_shared<const VlRandomArrayVarTemplate<VlQueue<T>>>(
|
||||
name, width, &var, dimension, randmodeIdx);
|
||||
if (dimension > 0) {
|
||||
idx = 0;
|
||||
record_arr_table(var, name, dimension, {}, {});
|
||||
}
|
||||
}
|
||||
template <typename T, std::size_t N>
|
||||
void write_var(VlUnpacked<T, N>& var, int width, const char* name, int dimension,
|
||||
template <typename T, std::size_t N_Depth>
|
||||
void write_var(VlUnpacked<T, N_Depth>& var, int width, const char* name, int dimension,
|
||||
std::uint32_t randmodeIdx = std::numeric_limits<std::uint32_t>::max()) {
|
||||
if (m_vars.find(name) != m_vars.end()) return;
|
||||
m_vars[name] = std::make_shared<const VlRandomArrayVar<VlUnpacked<T, N>>>(
|
||||
m_vars[name] = std::make_shared<const VlRandomArrayVarTemplate<VlUnpacked<T, N_Depth>>>(
|
||||
name, width, &var, dimension, randmodeIdx);
|
||||
if (dimension > 0) {
|
||||
idx = 0;
|
||||
record_arr_table(var, name, dimension, {}, {});
|
||||
}
|
||||
}
|
||||
template <typename T_Key, typename T_Value>
|
||||
void write_var(VlAssocArray<T_Key, T_Value>& var, int width, const char* name, int dimension,
|
||||
std::uint32_t randmodeIdx = std::numeric_limits<std::uint32_t>::max()) {
|
||||
if (m_vars.find(name) != m_vars.end()) return;
|
||||
m_vars[name]
|
||||
= std::make_shared<const VlRandomArrayVarTemplate<VlAssocArray<T_Key, T_Value>>>(
|
||||
name, width, &var, dimension, randmodeIdx);
|
||||
if (dimension > 0) {
|
||||
idx = 0;
|
||||
record_arr_table(var, name, dimension, {}, {});
|
||||
}
|
||||
}
|
||||
|
||||
int idx;
|
||||
std::string generateKey(const std::string& name, int idx) {
|
||||
if (!name.empty() && name[0] == '\\') {
|
||||
const size_t space_pos = name.find(' ');
|
||||
return (space_pos != std::string::npos ? name.substr(0, space_pos) : name)
|
||||
+ std::to_string(idx);
|
||||
}
|
||||
const size_t bracket_pos = name.find('[');
|
||||
return (bracket_pos != std::string::npos ? name.substr(0, bracket_pos) : name)
|
||||
+ std::to_string(idx);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void record_arr_table(T& var, const std::string name, int dimension,
|
||||
std::vector<size_t> indices, std::vector<size_t> idxWidths) {
|
||||
const std::string key = generateKey(name, idx);
|
||||
m_arr_vars[key] = std::make_shared<ArrayInfo>(name, &var, idx, indices, idxWidths);
|
||||
++idx;
|
||||
}
|
||||
template <typename T>
|
||||
void record_arr_table(VlQueue<T>& var, const std::string name, int dimension,
|
||||
std::vector<size_t> indices, std::vector<size_t> idxWidths) {
|
||||
if ((dimension > 0) && (var.size() != 0)) {
|
||||
idxWidths.push_back(32);
|
||||
for (size_t i = 0; i < var.size(); ++i) {
|
||||
const std::string indexed_name = name + "[" + std::to_string(i) + "]";
|
||||
indices.push_back(i);
|
||||
record_arr_table(var.atWrite(i), indexed_name, dimension - 1, indices, idxWidths);
|
||||
indices.pop_back();
|
||||
}
|
||||
}
|
||||
}
|
||||
template <typename T, std::size_t N_Depth>
|
||||
void record_arr_table(VlUnpacked<T, N_Depth>& var, const std::string name, int dimension,
|
||||
std::vector<size_t> indices, std::vector<size_t> idxWidths) {
|
||||
if ((dimension > 0) && (N_Depth != 0)) {
|
||||
idxWidths.push_back(32);
|
||||
for (size_t i = 0; i < N_Depth; ++i) {
|
||||
const std::string indexed_name = name + "[" + std::to_string(i) + "]";
|
||||
indices.push_back(i);
|
||||
record_arr_table(var.operator[](i), indexed_name, dimension - 1, indices,
|
||||
idxWidths);
|
||||
indices.pop_back();
|
||||
}
|
||||
}
|
||||
}
|
||||
template <typename T_Key, typename T_Value>
|
||||
void record_arr_table(VlAssocArray<T_Key, T_Value>& var, const std::string name, int dimension,
|
||||
std::vector<size_t> indices, std::vector<size_t> idxWidths) {
|
||||
if ((dimension > 0) && (var.size() != 0)) {
|
||||
for (auto it = var.begin(); it != var.end(); ++it) {
|
||||
const T_Key& key = it->first;
|
||||
const T_Value& value = it->second;
|
||||
std::string indexed_name;
|
||||
size_t integral_index;
|
||||
size_t idx_width;
|
||||
process_key(key, indexed_name, integral_index, name, idx_width);
|
||||
idxWidths.push_back(idx_width);
|
||||
indices.push_back(integral_index);
|
||||
record_arr_table(var.at(key), indexed_name, dimension - 1, indices, idxWidths);
|
||||
idxWidths.pop_back();
|
||||
indices.pop_back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void hard(std::string&& constraint);
|
||||
void clear();
|
||||
void set_randmode(const VlQueue<CData>& randmode) { m_randmode = &randmode; }
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2000-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2000-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -300,7 +300,7 @@ inline VerilatedDeserialize& operator>>(VerilatedDeserialize& os, std::string& r
|
|||
VerilatedSerialize& operator<<(VerilatedSerialize& os, VerilatedContext* rhsp);
|
||||
VerilatedDeserialize& operator>>(VerilatedDeserialize& os, VerilatedContext* rhsp);
|
||||
|
||||
template <class T_Key, class T_Value>
|
||||
template <typename T_Key, typename T_Value>
|
||||
VerilatedSerialize& operator<<(VerilatedSerialize& os, VlAssocArray<T_Key, T_Value>& rhs) {
|
||||
os << rhs.atDefault();
|
||||
const uint32_t len = rhs.size();
|
||||
|
|
@ -312,7 +312,7 @@ VerilatedSerialize& operator<<(VerilatedSerialize& os, VlAssocArray<T_Key, T_Val
|
|||
}
|
||||
return os;
|
||||
}
|
||||
template <class T_Key, class T_Value>
|
||||
template <typename T_Key, typename T_Value>
|
||||
VerilatedDeserialize& operator>>(VerilatedDeserialize& os, VlAssocArray<T_Key, T_Value>& rhs) {
|
||||
os >> rhs.atDefault();
|
||||
uint32_t len = 0;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2009-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2009-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||
//=============================================================================
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
//*************************************************************************
|
||||
//
|
||||
// Copyright 2022-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2022-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
// General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
|
@ -14,13 +14,16 @@
|
|||
/// \file
|
||||
/// \brief Verilated IEEE std:: header
|
||||
///
|
||||
/// This file is included automatically by Verilator when a std::mailbox or
|
||||
/// std::semaphore is referenced.
|
||||
/// This file is included automatically by Verilator, unless '--no-std-package'
|
||||
/// is used.
|
||||
///
|
||||
/// This file is not part of the Verilated public-facing API.
|
||||
/// It is only for internal use.
|
||||
///
|
||||
//*************************************************************************
|
||||
//
|
||||
// The following keywords from this file are hardcoded for detection in the parser:
|
||||
// "mailbox", "process", "randomize", "semaphore", "std"
|
||||
|
||||
// verilator lint_off DECLFILENAME
|
||||
// verilator lint_off TIMESCALEMOD
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
// DESCRIPTION: Verilator: built-in standard lint waivers
|
||||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
//*************************************************************************
|
||||
//
|
||||
// Copyright 2022-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
// General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
//
|
||||
//*************************************************************************
|
||||
///
|
||||
/// \file
|
||||
/// \brief Verilated built-in standard lint waivers
|
||||
///
|
||||
/// This file is included automatically by Verilator, unless '--no-std-waiver'
|
||||
/// is used.
|
||||
///
|
||||
/// To assist in building new rules, use:
|
||||
/// 'verilator --waiver-multiline --waiver-output <filename>'
|
||||
///
|
||||
//*************************************************************************
|
||||
|
||||
`ifndef _VERILATED_STD_WAIVER_VLT_
|
||||
`define _VERILATED_STD_WAIVER_VLT_
|
||||
|
||||
`verilator_config
|
||||
|
||||
//=========================================================================
|
||||
// UVM
|
||||
|
||||
// Apply these rules to only UVM base files
|
||||
`define VLT_UVM_FILES -file "*/uvm_*.svh" -contents "*UVM_VERSION_STRING*"
|
||||
|
||||
// Whole-package file waivers
|
||||
lint_off -rule DECLFILENAME `VLT_UVM_FILES
|
||||
lint_off -rule VARHIDDEN `VLT_UVM_FILES
|
||||
lint_off -rule WIDTHEXPAND `VLT_UVM_FILES
|
||||
lint_off -rule WIDTHTRUNC `VLT_UVM_FILES
|
||||
|
||||
// Context-sensitive waivers
|
||||
lint_off -rule CASEINCOMPLETE `VLT_UVM_FILES -match "* case ({is_R, is_W})*"
|
||||
lint_off -rule CASEINCOMPLETE `VLT_UVM_FILES -match "* case(orig_severity)*"
|
||||
lint_off -rule CASTCONST `VLT_UVM_FILES -match "*class{}uvm_callback*"
|
||||
lint_off -rule CASTCONST `VLT_UVM_FILES -match "*class{}uvm_component*"
|
||||
lint_off -rule CASTCONST `VLT_UVM_FILES -match "*class{}uvm_event*"
|
||||
lint_off -rule CASTCONST `VLT_UVM_FILES -match "*class{}uvm_report_object*"
|
||||
lint_off -rule CASTCONST `VLT_UVM_FILES -match "*class{}uvm_sequence_item*"
|
||||
lint_off -rule MISINDENT `VLT_UVM_FILES -match "* foreach (abstractions[i])*"
|
||||
lint_off -rule MISINDENT `VLT_UVM_FILES -match "* foreach (lock_list[i])*"
|
||||
lint_off -rule MISINDENT `VLT_UVM_FILES -match "* rw_access.data=*"
|
||||
lint_off -rule MISINDENT `VLT_UVM_FILES -match "* uvm_cmdline_proc =*"
|
||||
lint_off -rule REALCVT `VLT_UVM_FILES -match "* m_time *"
|
||||
lint_off -rule REALCVT `VLT_UVM_FILES -match "*$realtime*"
|
||||
lint_off -rule SYMRSVDWORD `VLT_UVM_FILES -match "*'delete'*"
|
||||
lint_off -rule SYMRSVDWORD `VLT_UVM_FILES -match "*'list'*"
|
||||
lint_off -rule SYMRSVDWORD `VLT_UVM_FILES -match "*'map'*"
|
||||
lint_off -rule SYMRSVDWORD `VLT_UVM_FILES -match "*'override'*"
|
||||
lint_off -rule SYMRSVDWORD `VLT_UVM_FILES -match "*'volatile'*"
|
||||
|
||||
//=========================================================================
|
||||
`undef VLT_UVM_FILES
|
||||
`endif // Guard
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2012-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2012-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2012-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2012-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -161,10 +161,10 @@ public:
|
|||
~VlWorkerThread();
|
||||
|
||||
// METHODS
|
||||
template <bool SpinWait>
|
||||
template <bool N_SpinWait>
|
||||
void dequeWork(ExecRec* workp) VL_MT_SAFE_EXCLUDES(m_mutex) {
|
||||
// Spin for a while, waiting for new data
|
||||
if VL_CONSTEXPR_CXX17 (SpinWait) {
|
||||
if VL_CONSTEXPR_CXX17 (N_SpinWait) {
|
||||
for (unsigned i = 0; i < VL_LOCK_SPINS; ++i) {
|
||||
if (VL_LIKELY(m_ready_size.load(std::memory_order_relaxed))) break;
|
||||
VL_CPU_RELAX();
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ void VlDelayScheduler::resume() {
|
|||
uint64_t VlDelayScheduler::nextTimeSlot() const {
|
||||
if (!m_queue.empty()) return m_queue.cbegin()->first;
|
||||
if (m_zeroDelayed.empty())
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "", "%Error: There is no next time slot scheduled");
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "", "There is no next time slot scheduled");
|
||||
return m_context.time();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -41,9 +41,9 @@
|
|||
// clang-format on
|
||||
|
||||
class VlThreadPool;
|
||||
template <class T_Buffer>
|
||||
template <typename T_Buffer>
|
||||
class VerilatedTraceBuffer;
|
||||
template <class T_Buffer>
|
||||
template <typename T_Buffer>
|
||||
class VerilatedTraceOffloadBuffer;
|
||||
|
||||
//=============================================================================
|
||||
|
|
@ -100,7 +100,7 @@ enum class VerilatedTraceSigType : uint8_t {
|
|||
// Offloaded tracing
|
||||
|
||||
// A simple synchronized first in first out queue
|
||||
template <class T>
|
||||
template <typename T>
|
||||
class VerilatedThreadQueue final { // LCOV_EXCL_LINE // lcov bug
|
||||
private:
|
||||
mutable VerilatedMutex m_mutex; // Protects m_queue
|
||||
|
|
@ -202,7 +202,7 @@ public:
|
|||
|
||||
// T_Trace is the format-specific subclass of VerilatedTrace.
|
||||
// T_Buffer is the format-specific base class of VerilatedTraceBuffer.
|
||||
template <class T_Trace, class T_Buffer>
|
||||
template <typename T_Trace, typename T_Buffer>
|
||||
class VerilatedTrace VL_NOT_FINAL {
|
||||
public:
|
||||
using Buffer = VerilatedTraceBuffer<T_Buffer>;
|
||||
|
|
@ -442,7 +442,7 @@ public:
|
|||
|
||||
// T_Buffer is the format-specific base class of VerilatedTraceBuffer.
|
||||
// The format-specific hot-path methods use duck-typing via T_Buffer for performance.
|
||||
template <class T_Buffer>
|
||||
template <typename T_Buffer>
|
||||
class VerilatedTraceBuffer VL_NOT_FINAL : public T_Buffer {
|
||||
protected:
|
||||
// Type of the owner trace file
|
||||
|
|
@ -543,7 +543,7 @@ public:
|
|||
|
||||
// T_Buffer is the format-specific base class of VerilatedTraceBuffer.
|
||||
// The format-specific hot-path methods use duck-typing via T_Buffer for performance.
|
||||
template <class T_Buffer>
|
||||
template <typename T_Buffer>
|
||||
class VerilatedTraceOffloadBuffer final : public VerilatedTraceBuffer<T_Buffer> {
|
||||
using typename VerilatedTraceBuffer<T_Buffer>::Trace;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
// can redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||
//=============================================================================
|
||||
//
|
||||
// Copyright 2001-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2001-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2009-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2009-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -268,6 +268,7 @@ protected:
|
|||
bool m_toplevel = false;
|
||||
const char* m_name;
|
||||
const char* m_fullname;
|
||||
const char* m_defname;
|
||||
|
||||
public:
|
||||
explicit VerilatedVpioScope(const VerilatedScope* scopep)
|
||||
|
|
@ -275,6 +276,7 @@ public:
|
|||
m_fullname = m_scopep->name();
|
||||
if (std::strncmp(m_fullname, "TOP.", 4) == 0) m_fullname += 4;
|
||||
m_name = m_scopep->identifier();
|
||||
m_defname = m_scopep->defname();
|
||||
}
|
||||
~VerilatedVpioScope() override = default;
|
||||
static VerilatedVpioScope* castp(vpiHandle h) {
|
||||
|
|
@ -284,6 +286,7 @@ public:
|
|||
const VerilatedScope* scopep() const { return m_scopep; }
|
||||
const char* name() const override { return m_name; }
|
||||
const char* fullname() const override { return m_fullname; }
|
||||
const char* defname() const override { return m_defname; }
|
||||
bool toplevel() const { return m_toplevel; }
|
||||
};
|
||||
|
||||
|
|
@ -2415,9 +2418,11 @@ void vl_get_value(const VerilatedVar* varp, void* varDatap, p_vpi_value valuep,
|
|||
} else if (varp->vltype() == VLVT_WDATA) {
|
||||
const int words = VL_WORDS_I(varp->packed().elements());
|
||||
if (VL_UNCOVERABLE(words >= VL_VALUE_STRING_MAX_WORDS)) {
|
||||
VL_FATAL_MT(__FILE__, __LINE__, "",
|
||||
"vpi_get_value with more than VL_VALUE_STRING_MAX_WORDS; increase and "
|
||||
"recompile");
|
||||
VL_VPI_ERROR_(
|
||||
__FILE__, __LINE__,
|
||||
"vpi_get_value with more than VL_VALUE_STRING_MAX_WORDS; increase and "
|
||||
"recompile");
|
||||
return;
|
||||
}
|
||||
const WDataInP datap = (reinterpret_cast<EData*>(varDatap));
|
||||
for (int i = 0; i < words; ++i) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2009-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2009-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
@ -67,11 +67,21 @@
|
|||
# endif
|
||||
# define VL_LIKELY(x) __builtin_expect(!!(x), 1) // Prefer over C++20 [[likely]]
|
||||
# define VL_UNLIKELY(x) __builtin_expect(!!(x), 0) // Prefer over C++20 [[unlikely]]
|
||||
# define VL_UNREACHABLE __builtin_unreachable() // C++23 std::unreachable()
|
||||
# define VL_PREFETCH_RD(p) __builtin_prefetch((p), 0)
|
||||
# define VL_PREFETCH_RW(p) __builtin_prefetch((p), 1)
|
||||
#endif
|
||||
|
||||
#ifdef __cpp_lib_unreachable
|
||||
/// Statement that may never be reached (for coverage etc)
|
||||
# define VL_UNREACHABLE std::unreachable() // C++23
|
||||
#elif defined(__GNUC__)
|
||||
# define VL_UNREACHABLE __builtin_unreachable()
|
||||
#elif defined(_MSC_VER) // MSVC
|
||||
# define VL_UNREACHABLE __assume(false)
|
||||
#else
|
||||
# define VL_UNREACHABLE
|
||||
#endif
|
||||
|
||||
// Function acquires a capability/lock (-fthread-safety)
|
||||
#define VL_ACQUIRE(...) \
|
||||
VL_CLANG_ATTR(annotate("ACQUIRE")) \
|
||||
|
|
@ -179,9 +189,6 @@
|
|||
#endif
|
||||
/// Boolean expression never hit by users (branch coverage disabled)
|
||||
# define VL_UNCOVERABLE(x) VL_UNLIKELY(x)
|
||||
#ifndef VL_UNREACHABLE
|
||||
# define VL_UNREACHABLE ///< Statement that may never be reached (for coverage etc)
|
||||
#endif
|
||||
#ifndef VL_PREFETCH_RD
|
||||
# define VL_PREFETCH_RD(p) ///< Prefetch pointer argument with read intent
|
||||
#endif
|
||||
|
|
@ -694,7 +701,7 @@ reverse_wrapper<T> reverse_view(const T& v) {
|
|||
// Object that is returned by this function is not considered
|
||||
// as MT_SAFE and any function call on this object still
|
||||
// needs to be `VL_MT_SAFE`.
|
||||
template <class T>
|
||||
template <typename T>
|
||||
T const& as_const(T& v) VL_MT_SAFE {
|
||||
return v;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// Code available from: https://verilator.org
|
||||
//
|
||||
// Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
// Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
// redistribute it and/or modify it under the terms of either the GNU
|
||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
# pylint: disable=C0114,C0115,C0116,C0209,C0302,R0902,R0911,R0912,R0914,R0915,E1101
|
||||
#
|
||||
# Copyright 2022-2024 by Wilson Snyder. Verilator is free software; you
|
||||
# Copyright 2022-2025 by Wilson Snyder. Verilator is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
# General Public License Version 3 or the Apache License 2.0.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Apache-2.0
|
||||
|
|
@ -38,6 +38,7 @@ else:
|
|||
def __getattr__(cls, name: str) -> clang.cindex.CursorKind:
|
||||
return getattr(clang.cindex.CursorKind, name)
|
||||
|
||||
# pylint: disable-next=invalid-enum-extension
|
||||
class CursorKind(clang.cindex.CursorKind, metaclass=CursorKindMeta):
|
||||
pass
|
||||
|
||||
|
|
@ -1079,7 +1080,7 @@ def main():
|
|||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description="""Check function annotations for correctness""",
|
||||
epilog="""Copyright 2022-2024 by Wilson Snyder. Verilator is free software;
|
||||
epilog="""Copyright 2022-2025 by Wilson Snyder. Verilator is free software;
|
||||
you can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Apache License 2.0.
|
||||
SPDX-License-Identifier: LGPL-3.0-only OR Apache-2.0""")
|
||||
|
|
@ -1145,10 +1146,14 @@ def main():
|
|||
for refid, file in enumerate(cmdline.file):
|
||||
filename = os.path.abspath(file)
|
||||
root = default_compilation_root
|
||||
cxxflags = []
|
||||
cxxflags = common_cxxflags[:]
|
||||
if compdb:
|
||||
entry = compdb.getCompileCommands(filename)
|
||||
entry_list = list(entry)
|
||||
if entry is None:
|
||||
print(f"%Error: reading compile commands failed: {filename}", file=sys.stderr)
|
||||
entry_list = []
|
||||
else:
|
||||
entry_list = list(entry)
|
||||
# Compilation database can contain multiple entries for single file,
|
||||
# e.g. when it has been updated by appending new entries.
|
||||
# Use last entry for the file, if it exists, as it is the newest one.
|
||||
|
|
@ -1160,9 +1165,7 @@ def main():
|
|||
# compiler executable name/path. CIndex (libclang) always
|
||||
# implicitly prepends executable name, so it shouldn't be passed
|
||||
# here.
|
||||
cxxflags = common_cxxflags + entry_args[1:]
|
||||
else:
|
||||
cxxflags = common_cxxflags[:]
|
||||
cxxflags.extend(entry_args[1:])
|
||||
|
||||
compile_command = CompileCommand(refid, filename, cxxflags, root)
|
||||
compile_commands_list.append(compile_command)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue