mirror of
https://github.com/verilator/verilator.git
synced 2025-07-31 07:56:10 +00:00
Convert test driver to Python (#5427)
This commit is contained in:
parent
55ae48ac13
commit
07bb8c701d
2
.github/workflows/contributor.yml
vendored
2
.github/workflows/contributor.yml
vendored
@ -14,4 +14,4 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: test_regress/t/t_dist_contributors.pl
|
||||
- run: test_regress/t/t_dist_contributors.py
|
||||
|
4
Changes
4
Changes
@ -11,6 +11,10 @@ contributors that suggested a given feature are shown in []. Thanks!
|
||||
Verilator 5.029 devel
|
||||
==========================
|
||||
|
||||
**Major:**
|
||||
|
||||
* Self-tests have been converted to Python, run `{testname}.py` instead of `{testname}.pl`.
|
||||
|
||||
**Minor:**
|
||||
|
||||
* Support IEEE-compliant intra-assign delays (#3711) (#5441). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
|
31
Makefile.in
31
Makefile.in
@ -52,6 +52,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MAKEINFO = makeinfo
|
||||
POD2TEXT = pod2text
|
||||
PYTHON3 = @PYTHON3@
|
||||
MKINSTALLDIRS = $(SHELL) $(srcdir)/src/mkinstalldirs
|
||||
|
||||
# Version (for docs/guide/conf.py)
|
||||
@ -156,7 +157,7 @@ msg_test: all_nomsg
|
||||
.PHONY: test
|
||||
ifeq ($(CFG_WITH_LONGTESTS),yes) # Local... Else don't burden users
|
||||
test: smoke-test test_regress
|
||||
# examples is part of test_regress's test_regress/t/t_a2_examples.pl
|
||||
# examples is part of test_regress's test_regress/t/t_a2_examples.py
|
||||
# (because that allows it to run in parallel with other test_regress's)
|
||||
else
|
||||
test: smoke-test examples
|
||||
@ -168,8 +169,8 @@ endif
|
||||
@echo
|
||||
|
||||
smoke-test: all_nomsg
|
||||
test_regress/t/t_a1_first_cc.pl
|
||||
test_regress/t/t_a2_first_sc.pl
|
||||
test_regress/t/t_a1_first_cc.py
|
||||
test_regress/t/t_a2_first_sc.py
|
||||
|
||||
test_regress: all_nomsg
|
||||
$(MAKE) -C test_regress
|
||||
@ -412,7 +413,7 @@ analyzer-include:
|
||||
scan-build $(MAKE) -k examples
|
||||
|
||||
format:
|
||||
$(MAKE) -j 4 clang-format yapf format-pl-exec
|
||||
$(MAKE) -j 4 clang-format yapf format-exec
|
||||
|
||||
CLANGFORMAT = clang-format-14
|
||||
CLANGFORMAT_FLAGS = -i
|
||||
@ -423,6 +424,7 @@ clang-format:
|
||||
|| echo "*** You are not using clang-format-14, indents may differ from master's ***"
|
||||
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
||||
|
||||
# Python programs, subject to format and lint
|
||||
PY_PROGRAMS = \
|
||||
bin/verilator_ccache_report \
|
||||
bin/verilator_difftree \
|
||||
@ -441,6 +443,7 @@ PY_PROGRAMS = \
|
||||
src/flexfix \
|
||||
src/vlcovgen \
|
||||
src/.gdbinit.py \
|
||||
test_regress/*.py \
|
||||
test_regress/t/*.pf \
|
||||
nodist/clang_check_attributes \
|
||||
nodist/code_coverage \
|
||||
@ -450,36 +453,44 @@ PY_PROGRAMS = \
|
||||
nodist/install_test \
|
||||
nodist/log_changes \
|
||||
|
||||
# Python files, subject to format but not lint
|
||||
PY_FILES = \
|
||||
$(PY_PROGRAMS) \
|
||||
nodist/code_coverage.dat \
|
||||
test_regress/t/*.py \
|
||||
|
||||
PY_FILES_NOLINT = \
|
||||
# Python files, test_regress tests
|
||||
PY_TEST_FILES = \
|
||||
test_regress/t/*.py \
|
||||
|
||||
YAPF = yapf3
|
||||
YAPF_FLAGS = -i --parallel
|
||||
|
||||
yapf:
|
||||
$(YAPF) $(YAPF_FLAGS) $(PY_FILES) $(PY_FILES_NOLINT)
|
||||
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
|
||||
|
||||
PYLINT = pylint
|
||||
PYLINT_FLAGS = --score=n --disable=R0801
|
||||
PYLINT_FLAGS = --recursive=n --score=n --disable=R0801
|
||||
PYLINT_TEST_FLAGS = $(PYLINT_FLAGS) --disable=C0103,C0114,C0116,C0209,C0411,C0413,C0301,R0801,R0912,R0915,R0916,R1702,W0511,W0621
|
||||
|
||||
RUFF = ruff
|
||||
RUFF_FLAGS = check --ignore=E402,E501,E701
|
||||
|
||||
# "make -k" so can see all tool result errors
|
||||
lint-py:
|
||||
$(MAKE) -k lint-py-pylint lint-py-ruff
|
||||
$(MAKE) -k lint-py-pylint lint-py-pylint-tests lint-py-ruff
|
||||
|
||||
lint-py-pylint:
|
||||
$(PYLINT) $(PYLINT_FLAGS) $(PY_PROGRAMS)
|
||||
|
||||
lint-py-pylint-tests:
|
||||
$(PYLINT) $(PYLINT_TEST_FLAGS) $(PY_TEST_FILES) | $(PYTHON3) nodist/lint_py_test_filter
|
||||
|
||||
lint-py-ruff:
|
||||
$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
|
||||
|
||||
format-pl-exec:
|
||||
-chmod a+x test_regress/t/*.pl
|
||||
format-exec:
|
||||
-chmod a+x test_regress/t/*.py
|
||||
|
||||
install-msg:
|
||||
@echo
|
||||
|
@ -68,9 +68,6 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
||||
sudo apt-get install bear mold ||
|
||||
sudo apt-get install bear mold
|
||||
fi
|
||||
if [ "$COVERAGE" = 1 ]; then
|
||||
yes yes | sudo cpan -fi Parallel::Forker
|
||||
fi
|
||||
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||
brew update
|
||||
brew install ccache perl gperftools
|
||||
@ -94,7 +91,7 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||
# libfl-dev needed for internal coverage's test runs
|
||||
sudo apt-get install gdb gtkwave lcov libfl-dev ccache jq z3 ||
|
||||
sudo apt-get install gdb gtkwave lcov libfl-dev ccache jq z3
|
||||
# Required for test_regress/t/t_dist_attributes.pl
|
||||
# Required for test_regress/t/t_dist_attributes.py
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then
|
||||
sudo apt-get install python3-clang mold ||
|
||||
sudo apt-get install python3-clang mold
|
||||
@ -114,10 +111,6 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||
fatal "Unknown os: '$CI_OS_NAME'"
|
||||
fi
|
||||
# Common installs
|
||||
if [ "$CI_RUNS_ON" != "ubuntu-14.04" ]; then
|
||||
CI_CPAN_REPO=https://cpan.org
|
||||
fi
|
||||
yes yes | sudo cpan -M $CI_CPAN_REPO -fi Parallel::Forker
|
||||
install-vcddiff
|
||||
# Workaround -fsanitize=address crash
|
||||
sudo sysctl -w vm.mmap_rnd_bits=28
|
||||
|
@ -61,6 +61,7 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||
# Run tests
|
||||
|
||||
export VERILATOR_TEST_NO_CONTRIBUTORS=1 # Separate workflow check
|
||||
export VERILATOR_TEST_NO_LINT_PY=1 # Separate workflow check
|
||||
|
||||
if [ "$CI_OS_NAME" = "osx" ]; then
|
||||
export VERILATOR_TEST_NO_GDB=1 # Pain to get GDB to work on OS X
|
||||
|
@ -51,8 +51,6 @@ RUN apt-get update \
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
RUN cpan install -fi Parallel::Forker
|
||||
|
||||
RUN git clone https://github.com/veripool/vcddiff.git && \
|
||||
make -C vcddiff && \
|
||||
cp -p vcddiff/vcddiff /usr/local/bin/vcddiff && \
|
||||
|
@ -199,6 +199,8 @@ AC_PATH_PROG(PYTHON3,python3)
|
||||
if test "x$PYTHON3" = "x" ; then
|
||||
AC_MSG_ERROR([Cannot find "python3" in your PATH, please install it])
|
||||
fi
|
||||
python3_version=$($PYTHON3 --version | head -1)
|
||||
AC_MSG_RESULT([$PYTHON3 --version = $python3_version])
|
||||
|
||||
AC_PATH_PROG(LEX,flex)
|
||||
if test "x$LEX" = "x" ; then
|
||||
|
@ -29,18 +29,18 @@ directory, as follows:
|
||||
.. code-block:: bash
|
||||
|
||||
cd test_regress
|
||||
cp -p t/t_EXAMPLE.pl t/t_BUG.pl
|
||||
cp -p t/t_EXAMPLE.py t/t_BUG.py
|
||||
cp -p t/t_EXAMPLE.v t/t_BUG.v
|
||||
|
||||
There are many hints on how to write a good test in the
|
||||
:file:`test_regress/driver.pl` documentation which can be seen by running:
|
||||
:file:`test_regress/driver.py` documentation which can be seen by running:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd $VERILATOR_ROOT # Need the original distribution kit
|
||||
test_regress/driver.pl --help
|
||||
test_regress/driver.py --help
|
||||
|
||||
Edit :file:`t/t_BUG.pl` to suit your example; you can do anything you want
|
||||
Edit :file:`t/t_BUG.py` to suit your example; you can do anything you want
|
||||
in the Verilog code there; just make sure it retains the single clk input
|
||||
and no outputs. Now, the following should fail:
|
||||
|
||||
@ -48,15 +48,15 @@ and no outputs. Now, the following should fail:
|
||||
|
||||
cd $VERILATOR_ROOT # Need the original distribution kit
|
||||
cd test_regress
|
||||
t/t_BUG.pl # Run on Verilator
|
||||
t/t_BUG.pl --debug # Run on Verilator, passing --debug to Verilator
|
||||
t/t_BUG.pl --vcs # Run on VCS simulator
|
||||
t/t_BUG.pl --nc|--iv|--ghdl # Likewise on other simulators
|
||||
t/t_BUG.py # Run on Verilator
|
||||
t/t_BUG.py --debug # Run on Verilator, passing --debug to Verilator
|
||||
t/t_BUG.py --vcs # Run on VCS simulator
|
||||
t/t_BUG.py --nc|--iv|--ghdl # Likewise on other simulators
|
||||
|
||||
The test driver accepts a number of options, many of which mirror the main
|
||||
Verilator options. For example the previous test could have been run with
|
||||
debugging enabled. The full set of test options can be seen by running
|
||||
:command:`driver.pl --help` as shown above.
|
||||
:command:`driver.py --help` as shown above.
|
||||
|
||||
Finally, report the bug at `Verilator Issues
|
||||
<https://verilator.org/issues>`_. The bug will become publicly visible; if
|
||||
|
@ -130,7 +130,6 @@ Those developing Verilator itself may also want these (see internals.rst):
|
||||
sudo pip3 install sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
|
||||
sudo pip3 install git+https://github.com/antmicro/astsee.git
|
||||
cpan install Pod::Perldoc
|
||||
cpan install Parallel::Forker
|
||||
|
||||
|
||||
Install SystemC
|
||||
|
@ -1472,9 +1472,6 @@ For all tests to pass, you must install the following packages:
|
||||
|
||||
- SystemC to compile the SystemC outputs, see http://systemc.org
|
||||
|
||||
- Parallel::Forker from CPAN to run tests in parallel; you can install
|
||||
this with e.g. "sudo cpan install Parallel::Forker".
|
||||
|
||||
- vcddiff to find differences in VCD outputs. See the readme at
|
||||
https://github.com/veripool/vcddiff
|
||||
|
||||
@ -1484,7 +1481,7 @@ For all tests to pass, you must install the following packages:
|
||||
Controlling the Test Driver
|
||||
---------------------------
|
||||
|
||||
The test driver script `driver.pl` runs tests; see the `Test Driver`
|
||||
The test driver script `driver.py` runs tests; see the `Test Driver`
|
||||
section. The individual test drivers are written in Perl; see `Test
|
||||
Language`.
|
||||
|
||||
@ -1497,7 +1494,7 @@ A specific regression test can be executed manually. To start the
|
||||
|
||||
::
|
||||
|
||||
test_regress/t/t_EXAMPLE.pl
|
||||
test_regress/t/t_EXAMPLE.py
|
||||
|
||||
|
||||
Regression Testing for Developers
|
||||
@ -1517,13 +1514,6 @@ Developers will also want to call ./configure with two extra flags:
|
||||
disabled by default, as SystemC installation problems would otherwise
|
||||
falsely indicate a Verilator problem.
|
||||
|
||||
When enabling the long tests, some additional Perl modules are needed,
|
||||
which you can install using cpan.
|
||||
|
||||
::
|
||||
|
||||
cpan install Parallel::Forker
|
||||
|
||||
There are some traps to avoid when running regression tests
|
||||
|
||||
- When checking the MANIFEST, the test will fail on unexpected code in the
|
||||
@ -1871,7 +1861,7 @@ represent the pointers (``op1p``, ``op2p``, etc) between the nodes.
|
||||
Debugging with GDB
|
||||
------------------
|
||||
|
||||
The `driver.pl` script accepts ``--debug --gdb`` to start
|
||||
The `driver.py` script accepts ``--debug --gdb`` to start
|
||||
Verilator under gdb and break when an error is hit, or the program is about
|
||||
to exit. You can also use ``--debug --gdbbt`` to just backtrace and then
|
||||
exit gdb. To debug the Verilated executable, use ``--gdbsim``.
|
||||
@ -1882,7 +1872,7 @@ can use ``--debug`` and look at the underlying invocation of
|
||||
|
||||
::
|
||||
|
||||
t/t_alw_dly.pl --debug
|
||||
t/t_alw_dly.py --debug
|
||||
|
||||
shows it invokes the command:
|
||||
|
||||
@ -1979,7 +1969,7 @@ Generally, what would you do to add a new feature?
|
||||
Follow the convention described above about the AstNode type hierarchy.
|
||||
Ordering of definitions is enforced by ``astgen``.
|
||||
|
||||
5. Now you can run ``test_regress/t/t_<newtestcase>.pl --debug`` and it'll
|
||||
5. Now you can run ``test_regress/t/t_<newtestcase>.py --debug`` and it'll
|
||||
probably fail, but you'll see a
|
||||
``test_regress/obj_dir/t_<newtestcase>/*.tree`` file which you can examine
|
||||
to see if the parsing worked. See also the sections above on debugging.
|
||||
@ -2028,7 +2018,7 @@ IEEE 1800-2023 33 Config
|
||||
Test Driver
|
||||
===========
|
||||
|
||||
This section documents the test driver script, `driver.pl`. driver.pl
|
||||
This section documents the test driver script, `driver.py`. driver.py
|
||||
invokes Verilator or another simulator on each test file. For test file
|
||||
contents description see `Test Language`.
|
||||
|
||||
@ -2040,7 +2030,7 @@ the regression tests with OBJCACHE enabled and in parallel on a machine
|
||||
with many cores. See the -j option and OBJCACHE environment variable.
|
||||
|
||||
|
||||
driver.pl Non-Scenario Arguments
|
||||
driver.py Non-Scenario Arguments
|
||||
--------------------------------
|
||||
|
||||
--benchmark [<cycles>]
|
||||
@ -2129,7 +2119,7 @@ driver.pl Non-Scenario Arguments
|
||||
For tests using the standard C++ wrapper, enable runtime debug mode.
|
||||
|
||||
|
||||
driver.pl Scenario Arguments
|
||||
driver.py Scenario Arguments
|
||||
----------------------------
|
||||
|
||||
The following options control which simulator is used, and which tests are
|
||||
@ -2171,7 +2161,7 @@ simultaneously.
|
||||
Run Xilinx XSim simulator tests.
|
||||
|
||||
|
||||
driver.pl Environment
|
||||
driver.py Environment
|
||||
---------------------
|
||||
|
||||
HARNESS_UPDATE_GOLDEN
|
||||
@ -2231,30 +2221,30 @@ VERILATOR_XVLOG
|
||||
Test Language
|
||||
=============
|
||||
|
||||
This section describes the format of the ``test_regress/t/*.pl`` test
|
||||
language files, executed by `driver.pl`.
|
||||
This section describes the format of the ``test_regress/t/*.py`` test
|
||||
language files, executed by `driver.py`.
|
||||
|
||||
Test Language Summary
|
||||
---------------------
|
||||
|
||||
For convenience, a summary of the most commonly used features is provided
|
||||
here, with a reference in a later section. All test files typically have a
|
||||
call to the ``lint`` or ``compile`` subroutine to compile the test. For
|
||||
run-time tests, this is followed by a call to the ``execute``
|
||||
subroutine. Both of these functions can optionally be provided with
|
||||
arguments specifying additional options.
|
||||
call to the ``test.lint`` or ``test.compile`` methods to compile the
|
||||
test. For run-time tests, this is followed by a call to the
|
||||
``test.execute`` method. Both of these functions can optionally be provided
|
||||
with arguments specifying additional options.
|
||||
|
||||
If those complete, the script calls ``ok`` to increment the count of
|
||||
successful tests and then returns 1 as its result.
|
||||
If those complete, the script calls ``test.passes`` to increment the count
|
||||
of successful tests.
|
||||
|
||||
The driver.pl script assumes by default that the source Verilog file name
|
||||
The driver.py script assumes by default that the source Verilog file name
|
||||
matches the test script name. So a test whose driver is
|
||||
``t/t_mytest.pl`` will expect a Verilog source file ``t/t_mytest.v``.
|
||||
``t/t_mytest.py`` will expect a Verilog source file ``t/t_mytest.v``.
|
||||
This can be changed using the ``top_filename`` subroutine, for example
|
||||
|
||||
::
|
||||
|
||||
top_filename("t/t_myothertest.v");
|
||||
test.top_filename = "t/t_myothertest.v"
|
||||
|
||||
By default, all tests will run with major simulators (Icarus Verilog, NC,
|
||||
VCS, ModelSim, etc.) as well as Verilator, to allow results to be
|
||||
@ -2263,26 +2253,25 @@ can use the following:
|
||||
|
||||
::
|
||||
|
||||
scenarios(vlt => 1);
|
||||
test.scenarios('vlt')
|
||||
|
||||
Of the many options that can be set through arguments to ``compiler`` and
|
||||
``execute``, the following are particularly useful:
|
||||
Of the many options that can be set through arguments to ``test.compiler``
|
||||
and ``test.execute``, the following are particularly useful:
|
||||
|
||||
``verilator_flags2``
|
||||
A list of flags to be passed to verilator when compiling.
|
||||
|
||||
``fails``
|
||||
Set to 1 to indicate that the compilation or execution is intended to fail.
|
||||
Set true to indicate that the compilation or execution is intended to fail.
|
||||
|
||||
For example, the following would specify that compilation requires two
|
||||
defines and is expected to fail.
|
||||
|
||||
::
|
||||
|
||||
compile(
|
||||
test.compile(
|
||||
verilator_flags2 => ["-DSMALL_CLOCK -DGATED_COMMENT"],
|
||||
fails => 1,
|
||||
);
|
||||
fails = True)
|
||||
|
||||
Hints On Writing Tests
|
||||
----------------------
|
||||
@ -2295,10 +2284,10 @@ same name as the test, but with .cpp as suffix
|
||||
|
||||
::
|
||||
|
||||
compile(
|
||||
make_top_shell => 0,
|
||||
make_main => 0,
|
||||
verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], );
|
||||
test.compile(
|
||||
make_top_shell=False,
|
||||
make_main=False,
|
||||
verilator_flags2=["--exe", test.t_dir + "/" + test.name + ".cpp"])
|
||||
|
||||
Tests should be self-checking, rather than producing lots of output. If a
|
||||
test succeeds it should print ``*-* All Finished *-*`` to standard output
|
||||
@ -2338,9 +2327,8 @@ compile time, it is the only option. For example:
|
||||
::
|
||||
|
||||
compile(
|
||||
fails => 1,
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
fails=True,
|
||||
expect_filename=test.golden_filename)
|
||||
|
||||
Note ``expect_filename`` strips some debugging information from the logfile
|
||||
when comparing.
|
||||
@ -2349,9 +2337,9 @@ when comparing.
|
||||
Test Language Compile/Lint/Run Arguments
|
||||
----------------------------------------
|
||||
|
||||
This section describes common arguments to ``compile()``, ``lint()``, and
|
||||
``run()``. The full list of arguments can be found by looking at the
|
||||
``driver.pl`` source code.
|
||||
This section describes common arguments to ``test.compile``, ``test.lint``,
|
||||
and ``test.run``. The full list of arguments can be found by looking at
|
||||
the ``driver.py`` source code.
|
||||
|
||||
all_run_flags
|
||||
A list of flags to be passed when running the simulator (Verilated model
|
||||
|
@ -350,10 +350,10 @@ SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
|
||||
parser.add_argument('--debug', action='store_true', help='enable debug')
|
||||
parser.add_argument('--hashset',
|
||||
action='store',
|
||||
help='pass test hashset onto driver.pl test harness')
|
||||
help='pass test hashset onto driver.py test harness')
|
||||
parser.add_argument('--scenarios',
|
||||
action='store',
|
||||
help='pass test scenarios onto driver.pl test harness')
|
||||
help='pass test scenarios onto driver.py test harness')
|
||||
parser.add_argument('--stages',
|
||||
'--stage',
|
||||
action='store',
|
||||
|
59
nodist/lint_py_test_filter
Executable file
59
nodist/lint_py_test_filter
Executable file
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env python3
|
||||
# pylint: disable=
|
||||
######################################################################
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import sys
|
||||
|
||||
SUPPRESSES = [
|
||||
"**********",
|
||||
"E0602: Undefined variable 'test' (undefined-variable)",
|
||||
"E0602: Undefined variable 're' (undefined-variable)",
|
||||
"E0602: Undefined variable 'os' (undefined-variable)",
|
||||
"E0602: Undefined variable 'glob' (undefined-variable)",
|
||||
"W0611: Unused import vltest_bootstrap (unused-import)",
|
||||
]
|
||||
|
||||
######################################################################
|
||||
|
||||
def process():
|
||||
anymsg = False
|
||||
for line in sys.stdin:
|
||||
line = line.rstrip();
|
||||
show = True
|
||||
for msg in SUPPRESSES:
|
||||
if msg in line:
|
||||
show = False
|
||||
continue
|
||||
if show:
|
||||
print(line)
|
||||
anymsg = True
|
||||
|
||||
if anymsg:
|
||||
sys.exit("%Error: See messages above")
|
||||
|
||||
#######################################################################
|
||||
#######################################################################
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description="""lint_py_test_filter is used to filter
|
||||
pylint output for expected errors in Verilator test_regress/*.py tests.""",
|
||||
epilog="""Copyright 2024-2024 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""")
|
||||
|
||||
parser.add_argument('--debug', action='store_true', help='enable debug')
|
||||
|
||||
Args = parser.parse_args()
|
||||
process()
|
||||
|
||||
######################################################################
|
||||
# Local Variables:
|
||||
# compile-command: "cd .. ; make lint-py-pylint-tests"
|
||||
# End:
|
@ -19,7 +19,7 @@ set(TEST_REQUIRED_VARS NAME CSOURCES OPT_FAST OPT_GLOBAL
|
||||
VERILATOR_SOURCES SYSTEMC VERBOSE VERILATION)
|
||||
foreach(var ${TEST_REQUIRED_VARS})
|
||||
if (NOT DEFINED TEST_${var})
|
||||
message(FATAL_ERROR "TEST_${var} not defined. This CMakeLists.txt file is meant to be run by driver.pl.")
|
||||
message(FATAL_ERROR "TEST_${var} not defined. This CMakeLists.txt file is meant to be run by driver.py.")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
@ -48,30 +48,30 @@ DRIVER_HASHSET ?=
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
$(PERL) driver.pl $(DRIVER_FLAGS) $(SCENARIOS) $(DRIVER_HASHSET)
|
||||
$(PYTHON3) driver.py $(DRIVER_FLAGS) $(SCENARIOS) $(DRIVER_HASHSET)
|
||||
|
||||
######################################################################
|
||||
|
||||
vcs:
|
||||
$(PERL) driver.pl $(DRIVER_FLAGS) --vcs --stop
|
||||
$(PYTHON3) driver.py $(DRIVER_FLAGS) --vcs --stop
|
||||
|
||||
######################################################################
|
||||
|
||||
nc:
|
||||
$(PERL) driver.pl $(DRIVER_FLAGS) --nc --stop
|
||||
$(PYTHON3) driver.py $(DRIVER_FLAGS) --nc --stop
|
||||
|
||||
######################################################################
|
||||
|
||||
vlt:
|
||||
$(PERL) driver.pl $(DRIVER_FLAGS) --vlt --stop
|
||||
$(PYTHON3) driver.py $(DRIVER_FLAGS) --vlt --stop
|
||||
|
||||
vltmt:
|
||||
$(PERL) driver.pl $(DRIVER_FLAGS) --vltmt --stop
|
||||
$(PYTHON3) driver.py $(DRIVER_FLAGS) --vltmt --stop
|
||||
|
||||
######################################################################
|
||||
|
||||
random:
|
||||
$(PERL) driver.pl $(DRIVER_FLAGS) --optimize : --stop
|
||||
$(PYTHON3) driver.py $(DRIVER_FLAGS) --optimize : --stop
|
||||
|
||||
random_forever:
|
||||
while ( VERILATOR_NO_DEBUG=1 CPPFLAGS_ADD=-Wno-error $(MAKE) random ) ; do \
|
||||
|
2830
test_regress/driver.py
Executable file
2830
test_regress/driver.py
Executable file
File diff suppressed because it is too large
Load Diff
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
);
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_EXAMPLE.py
Executable file
18
test_regress/t/t_EXAMPLE.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile()
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
# show-config: This test runs the very first time we've executed Verilator
|
||||
# after building so we make sure to run with --gdbbt, so if it dumps we'll
|
||||
# get a trace.
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
$DEBUG_QUIET = "--debug --debugi 0 --gdbbt --no-dump-tree";
|
||||
|
||||
run(cmd => ["perl", "$ENV{VERILATOR_ROOT}/bin/verilator", $DEBUG_QUIET, "-V"],
|
||||
verilator_run => 1,
|
||||
);
|
||||
|
||||
compile(
|
||||
verilator_flags2 => [$DEBUG_QUIET, "--trace"],
|
||||
);
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
33
test_regress/t/t_a1_first_cc.py
Executable file
33
test_regress/t/t_a1_first_cc.py
Executable file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
# show-config: This test runs the very first time we've executed Verilator
|
||||
# after building so we make sure to run with --gdbbt, so if it dumps we'll
|
||||
# get a trace.
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt')
|
||||
|
||||
DEBUG_QUIET = "--debug --debugi 0 --gdbbt --no-dump-tree"
|
||||
|
||||
test.run(
|
||||
cmd=[
|
||||
"perl",
|
||||
os.environ["VERILATOR_ROOT"] + "/bin/verilator", #
|
||||
DEBUG_QUIET,
|
||||
"-V"
|
||||
],
|
||||
verilator_run=True)
|
||||
|
||||
test.compile(verilator_flags2=[DEBUG_QUIET, "--trace"])
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
# This test runs the very first time we've executed Verilator --sc
|
||||
# after building so we make sure to run with --gdbbt, so if it dumps we'll
|
||||
# get a trace.
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
top_filename("t/t_a1_first_cc.v");
|
||||
|
||||
$DEBUG_QUIET = "--debug --debugi 0 --gdbbt --no-dump-tree";
|
||||
|
||||
compile(
|
||||
verilator_flags2 => [$DEBUG_QUIET, "-sc --trace"],
|
||||
);
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
25
test_regress/t/t_a2_first_sc.py
Executable file
25
test_regress/t/t_a2_first_sc.py
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
# This test runs the very first time we've executed Verilator --sc
|
||||
# after building so we make sure to run with --gdbbt, so if it dumps we'll
|
||||
# get a trace.
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt')
|
||||
test.top_filename = "t/t_a1_first_cc.v"
|
||||
|
||||
DEBUG_QUIET = "--debug --debugi 0 --gdbbt --no-dump-tree"
|
||||
|
||||
test.compile(verilator_flags2=[DEBUG_QUIET, "-sc --trace"])
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_EXAMPLE.v");
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ['--debug-self-test'],
|
||||
verilator_make_gmake => 0,
|
||||
make_top_shell => 0,
|
||||
make_main => 0,
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
20
test_regress/t/t_a3_selftest.py
Executable file
20
test_regress/t/t_a3_selftest.py
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt')
|
||||
test.top_filename = "t/t_EXAMPLE.v"
|
||||
|
||||
test.compile(verilator_flags2=['--debug-self-test'],
|
||||
verilator_make_gmake=False,
|
||||
make_top_shell=False,
|
||||
make_main=False)
|
||||
|
||||
test.passes()
|
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2023 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
|
||||
|
||||
scenarios(vlt => 1);
|
||||
|
||||
top_filename("t/t_EXAMPLE.v");
|
||||
|
||||
lint(
|
||||
v_flags => ["--lint-only --verilate-jobs 2 --debug-self-test"],
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
17
test_regress/t/t_a3_selftest_thread.py
Executable file
17
test_regress/t/t_a3_selftest_thread.py
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vltmt')
|
||||
test.top_filename = "t/t_EXAMPLE.v"
|
||||
|
||||
test.lint(v_flags=["--lint-only --verilate-jobs 2 --debug-self-test"])
|
||||
|
||||
test.passes()
|
@ -1,49 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2022 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
|
||||
|
||||
scenarios(dist => 1);
|
||||
rerunnable(0);
|
||||
|
||||
my $root = "..";
|
||||
|
||||
if ($ENV{VERILATOR_TEST_NO_ATTRIBUTES}) {
|
||||
skip("Skipping due to VERILATOR_TEST_NO_ATTRIBUTES");
|
||||
} elsif (!-r "$root/.git") {
|
||||
skip("Not in a git repository");
|
||||
} else {
|
||||
check();
|
||||
}
|
||||
sub check {
|
||||
my $root = "..";
|
||||
# some of the files are only used in Verilation
|
||||
# and are only in "include" folder
|
||||
my @srcfiles = glob("$root/include/*.cpp");
|
||||
my $srcfiles_str = join(" ", @srcfiles);
|
||||
my $clang_args = "-I$root/include/ -I$root/include/vltstd/ -fcoroutines-ts";
|
||||
|
||||
sub run_clang_check {
|
||||
{
|
||||
my $cmd = qq{python3 -c "from clang.cindex import Index; index = Index.create(); print(\\"Clang imported\\")";};
|
||||
print "\t$cmd\n" if $::Debug;
|
||||
my $out = `$cmd`;
|
||||
if (!$out || $out !~ /Clang imported/) { skip("No libclang installed\n"); return 1; }
|
||||
}
|
||||
run(logfile => $Self->{run_log_filename},
|
||||
tee => 1,
|
||||
cmd => ["python3", "$root/nodist/clang_check_attributes --verilator-root=$root --cxxflags='$clang_args' $srcfiles_str"]);
|
||||
|
||||
file_grep($Self->{run_log_filename}, "Number of functions reported unsafe: 0");
|
||||
}
|
||||
|
||||
run_clang_check();
|
||||
}
|
||||
|
||||
ok(1);
|
||||
1;
|
50
test_regress/t/t_a5_attributes_include.py
Executable file
50
test_regress/t/t_a5_attributes_include.py
Executable file
@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('dist')
|
||||
test.rerunnable = False
|
||||
|
||||
root = ".."
|
||||
|
||||
|
||||
def have_clang_check():
|
||||
cmd = 'python3 -c "from clang.cindex import Index; index = Index.create(); print(\\"Clang imported\\")";'
|
||||
if test.verbose:
|
||||
print("\t" + cmd)
|
||||
nout = test.run_capture(cmd, check=False)
|
||||
if not nout or not re.search(r'Clang imported', nout):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
if 'VERILATOR_TEST_NO_ATTRIBUTES' in os.environ:
|
||||
test.skip("Skipping due to VERILATOR_TEST_NO_ATTRIBUTES")
|
||||
if not os.path.exists(root + "/src/obj_dbg/compile_commands.json"):
|
||||
test.skip("compile_commands.json not found. Please install 'bear > 3.0' and rebuild Verilator")
|
||||
if not have_clang_check():
|
||||
test.skip("No libclang installed\n")
|
||||
|
||||
# some of the files are only used in Verilation
|
||||
# and are only in "include" folder
|
||||
srcfiles = test.glob_some(root + "/include/*.cpp")
|
||||
srcfiles_str = " ".join(srcfiles)
|
||||
clang_args = "-I" + root + "/include/ -I" + root + "/include/vltstd/ -fcoroutines-ts"
|
||||
|
||||
test.run(logfile=test.run_log_filename,
|
||||
tee=True,
|
||||
cmd=["python3", root + "/nodist/clang_check_attributes",
|
||||
"--verilator-root=" + root,
|
||||
"--cxxflags='" + clang_args + "'",
|
||||
srcfiles_str]) # yapf:disable
|
||||
|
||||
test.file_grep(test.run_log_filename, r'Number of functions reported unsafe: +(\d+)', 0)
|
||||
|
||||
test.passes()
|
@ -1,51 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2022 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
|
||||
|
||||
scenarios(dist => 1);
|
||||
rerunnable(0);
|
||||
my $root = "..";
|
||||
if ($ENV{VERILATOR_TEST_NO_ATTRIBUTES}) {
|
||||
skip("Skipping due to VERILATOR_TEST_NO_ATTRIBUTES");
|
||||
} elsif (! -e "$root/src/obj_dbg/compile_commands.json") {
|
||||
skip("compile_commands.json not found. Please install 'bear > 3.0' and rebuild Verilator.");
|
||||
} else {
|
||||
check();
|
||||
}
|
||||
sub check {
|
||||
# some of the files are only used in Verilation
|
||||
# and are only in "include" folder
|
||||
my @srcfiles = grep { !/\/(V3Const|Vlc\w*|\w*_test|\w*_sc|\w*.yy).cpp$/ }
|
||||
glob("$root/src/*.cpp $root/src/obj_dbg/V3Const__gen.cpp");
|
||||
my $srcfiles_str = join(" ", @srcfiles);
|
||||
|
||||
sub run_clang_check {
|
||||
{
|
||||
my $cmd = qq{python3 -c "from clang.cindex import Index; index = Index.create(); print(\\"Clang imported\\")";};
|
||||
print "\t$cmd\n" if $::Debug;
|
||||
my $out = `$cmd`;
|
||||
if (!$out || $out !~ /Clang imported/) { skip("No libclang installed\n"); return 1; }
|
||||
}
|
||||
run(logfile => $Self->{run_log_filename},
|
||||
tee => 1,
|
||||
cmd => ["python3",
|
||||
"$root/nodist/clang_check_attributes",
|
||||
"--verilator-root=$root",
|
||||
"--compilation-root=$root/src/obj_dbg",
|
||||
"--compile-commands-dir=$root/src/obj_dbg",
|
||||
"$srcfiles_str"]);
|
||||
|
||||
file_grep($Self->{run_log_filename}, "Number of functions reported unsafe: 0");
|
||||
}
|
||||
|
||||
run_clang_check();
|
||||
}
|
||||
|
||||
ok(1);
|
||||
1;
|
52
test_regress/t/t_a5_attributes_src.py
Executable file
52
test_regress/t/t_a5_attributes_src.py
Executable file
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('dist')
|
||||
test.rerunnable = False
|
||||
|
||||
root = ".."
|
||||
|
||||
|
||||
def have_clang_check():
|
||||
cmd = 'python3 -c "from clang.cindex import Index; index = Index.create(); print(\\"Clang imported\\")";'
|
||||
if test.verbose:
|
||||
print("\t" + cmd)
|
||||
nout = test.run_capture(cmd, check=False)
|
||||
if not nout or not re.search(r'Clang imported', nout):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
if 'VERILATOR_TEST_NO_ATTRIBUTES' in os.environ:
|
||||
test.skip("Skipping due to VERILATOR_TEST_NO_ATTRIBUTES")
|
||||
if not os.path.exists(root + "/src/obj_dbg/compile_commands.json"):
|
||||
test.skip("compile_commands.json not found. Please install 'bear > 3.0' and rebuild Verilator")
|
||||
if not have_clang_check():
|
||||
test.skip("No libclang installed\n")
|
||||
|
||||
# some of the files are only used in Verilation
|
||||
# and are only in "include" folder
|
||||
srcfiles = test.glob_some(root + "/src/*.cpp") + test.glob_some(root +
|
||||
"/src/obj_dbg/V3Const__gen.cpp")
|
||||
srcfiles = [f for f in srcfiles if re.search(r'\/(V3Const|Vlc\w*|\w*_test|\w*_sc|\w*.yy).cpp$', f)]
|
||||
srcfiles_str = " ".join(srcfiles)
|
||||
|
||||
test.run(logfile=test.run_log_filename,
|
||||
tee=True,
|
||||
cmd=["python3", root + "/nodist/clang_check_attributes",
|
||||
"--verilator-root=" + root,
|
||||
"--compilation-root=" + root + "/src/obj_dbg",
|
||||
"--compile-commands-dir=" + root + "/src/obj_dbg",
|
||||
srcfiles_str]) # yapf:disable
|
||||
|
||||
test.file_grep(test.run_log_filename, r'Number of functions reported unsafe: +(\d+)', 0)
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(dist => 1);
|
||||
|
||||
$Self->{clean_command} = 'rm -rf ../examples/*/build ../examples/*/obj*';
|
||||
|
||||
my @examples = sort(glob("../examples/*"));
|
||||
for my $example (@examples) {
|
||||
run(cmd => ["$ENV{MAKE} -C $example"]);
|
||||
}
|
||||
|
||||
ok(1);
|
||||
1;
|
25
test_regress/t/t_a6_examples.py
Executable file
25
test_regress/t/t_a6_examples.py
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('dist')
|
||||
|
||||
test.clean_command = '/bin/rm -rf ../examples/*/build ../examples/*/obj*'
|
||||
|
||||
root = ".."
|
||||
|
||||
if not os.path.exists(root + "/.git"):
|
||||
test.skip("Not in a git repository")
|
||||
|
||||
examples = sorted(test.glob_some(root + "/examples/*"))
|
||||
for example in examples:
|
||||
test.run(cmd=[os.environ["MAKE"], "-C", example])
|
||||
|
||||
test.passes()
|
@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(linter => 1);
|
||||
|
||||
lint(
|
||||
fails => $Self->{vlt_all},
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
16
test_regress/t/t_alias2_unsup.py
Executable file
16
test_regress/t/t_alias2_unsup.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('linter')
|
||||
|
||||
test.lint(fails=test.vlt_all, expect_filename=test.golden_filename)
|
||||
|
||||
test.passes()
|
@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(linter => 1);
|
||||
|
||||
lint(
|
||||
fails => $Self->{vlt_all},
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
16
test_regress/t/t_alias_unsup.py
Executable file
16
test_regress/t/t_alias_unsup.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('linter')
|
||||
|
||||
test.lint(fails=test.vlt_all, expect_filename=test.golden_filename)
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_abs.py
Executable file
18
test_regress/t/t_altera_lpm_abs.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_add_sub.py
Executable file
18
test_regress/t/t_altera_lpm_add_sub.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_and.py
Executable file
18
test_regress/t/t_altera_lpm_and.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_bustri.py
Executable file
18
test_regress/t/t_altera_lpm_bustri.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_clshift.py
Executable file
18
test_regress/t/t_altera_lpm_clshift.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_compare.py
Executable file
18
test_regress/t/t_altera_lpm_compare.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_constant.py
Executable file
18
test_regress/t/t_altera_lpm_constant.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}", "--binary --no-timing"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_counter.py
Executable file
18
test_regress/t/t_altera_lpm_counter.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module, "--binary --no-timing"])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_decode.py
Executable file
18
test_regress/t/t_altera_lpm_decode.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_divide.py
Executable file
18
test_regress/t/t_altera_lpm_divide.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_ff.py
Executable file
18
test_regress/t/t_altera_lpm_ff.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_fifo.py
Executable file
18
test_regress/t/t_altera_lpm_fifo.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_fifo_dc.py
Executable file
18
test_regress/t/t_altera_lpm_fifo_dc.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_inv.py
Executable file
18
test_regress/t/t_altera_lpm_inv.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_latch.py
Executable file
18
test_regress/t/t_altera_lpm_latch.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_mult.py
Executable file
18
test_regress/t/t_altera_lpm_mult.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
$module =~ s/_noinl//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}", "-fno-inline"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
19
test_regress/t/t_altera_lpm_mult_noinl.py
Executable file
19
test_regress/t/t_altera_lpm_mult_noinl.py
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
module = re.sub(r'_noinl', '', module)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module, "-fno-inline"])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_mux.py
Executable file
18
test_regress/t/t_altera_lpm_mux.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_or.py
Executable file
18
test_regress/t/t_altera_lpm_or.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_ram_dp.py
Executable file
18
test_regress/t/t_altera_lpm_ram_dp.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_ram_dq.py
Executable file
18
test_regress/t/t_altera_lpm_ram_dq.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_ram_io.py
Executable file
18
test_regress/t/t_altera_lpm_ram_io.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_rom.py
Executable file
18
test_regress/t/t_altera_lpm_rom.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_shiftreg.py
Executable file
18
test_regress/t/t_altera_lpm_shiftreg.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_altera_lpm.v");
|
||||
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--top-module ${module}"]
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_altera_lpm_xor.py
Executable file
18
test_regress/t/t_altera_lpm_xor.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_altera_lpm.v"
|
||||
module = re.sub(r'.*t_altera_', '', test.name)
|
||||
|
||||
test.compile(verilator_flags2=["--top-module", module])
|
||||
|
||||
test.passes()
|
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2004 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
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
);
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_alw_combdly.py
Executable file
18
test_regress/t/t_alw_combdly.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile()
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
);
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
18
test_regress/t/t_alw_dly.py
Executable file
18
test_regress/t/t_alw_dly.py
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile()
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,30 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
top_filename("t/t_alw_reorder.v");
|
||||
compile(
|
||||
verilator_flags2 => ["--stats -fno-reorder"],
|
||||
);
|
||||
|
||||
file_grep($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/, 0);
|
||||
# Here we should see some dly vars since reorder is disabled.
|
||||
# (Whereas our twin test, t_alw_reorder, should see no dly vars
|
||||
# since it enables the reorder step.)
|
||||
my @files = glob_all("$Self->{obj_dir}/$Self->{vm_prefix}___024root*.cpp");
|
||||
file_grep_any(\@files, qr/dly__t__DOT__v1/);
|
||||
file_grep_any(\@files, qr/dly__t__DOT__v2/);
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
26
test_regress/t/t_alw_noreorder.py
Executable file
26
test_regress/t/t_alw_noreorder.py
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
test.top_filename = "t/t_alw_reorder.v"
|
||||
test.compile(verilator_flags2=["--stats -fno-reorder"])
|
||||
|
||||
test.file_grep(test.stats, r'Optimizations, Split always\s+(\d+)', 0)
|
||||
# Here we should see some dly vars since reorder is disabled.
|
||||
# (Whereas our twin test, t_alw_reorder, should see no dly vars
|
||||
# since it enables the reorder step.)
|
||||
files = test.glob_some(test.obj_dir + "/" + test.vm_prefix + "___024root*.cpp")
|
||||
test.file_grep_any(files, r'dly__t__DOT__v1')
|
||||
test.file_grep_any(files, r'dly__t__DOT__v2')
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--stats"],
|
||||
);
|
||||
|
||||
if ($Self->{vlt_all}) {
|
||||
file_grep($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/, 0);
|
||||
}
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
21
test_regress/t/t_alw_nosplit.py
Executable file
21
test_regress/t/t_alw_nosplit.py
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--stats"])
|
||||
|
||||
if test.vlt_all:
|
||||
test.file_grep(test.stats, r'Optimizations, Split always\s+(\d+)', 0)
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(vlt_all => 1);
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--stats"],
|
||||
);
|
||||
|
||||
file_grep($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/, 0);
|
||||
# Important: if reorder succeeded, we should see no dly vars.
|
||||
# Equally important: twin test t_alw_noreorder should see dly vars,
|
||||
# is identical to this test except for disabling the reorder step.
|
||||
foreach my $file (
|
||||
glob_all("$Self->{obj_dir}/$Self->{vm_prefix}*.h"),
|
||||
glob_all("$Self->{obj_dir}/$Self->{vm_prefix}*.cpp")
|
||||
) {
|
||||
file_grep_not($file, qr/dly__t__DOT__v1/);
|
||||
file_grep_not($file, qr/dly__t__DOT__v2/);
|
||||
file_grep_not($file, qr/dly__t__DOT__v3/);
|
||||
}
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
29
test_regress/t/t_alw_reorder.py
Executable file
29
test_regress/t/t_alw_reorder.py
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('vlt_all')
|
||||
|
||||
test.compile(verilator_flags2=["--stats"])
|
||||
|
||||
test.file_grep(test.stats, r'Optimizations, Split always\s+(\d+)', 0)
|
||||
|
||||
# Important: if reorder succeeded, we should see no dly vars.
|
||||
# Equally important: twin test t_alw_noreorder should see dly vars,
|
||||
# is identical to this test except for disabling the reorder step.
|
||||
for filename in (test.glob_some(test.obj_dir + "/" + test.vm_prefix + "*.h") +
|
||||
test.glob_some(test.obj_dir + "/" + test.vm_prefix + "*.cpp")):
|
||||
test.file_grep_not(filename, r'dly__t__DOT__v1')
|
||||
test.file_grep_not(filename, r'dly__t__DOT__v2')
|
||||
test.file_grep_not(filename, r'dly__t__DOT__v3')
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--stats"],
|
||||
);
|
||||
|
||||
if ($Self->{vlt_all}) {
|
||||
file_grep($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/, 4);
|
||||
}
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
21
test_regress/t/t_alw_split.py
Executable file
21
test_regress/t/t_alw_split.py
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--stats"])
|
||||
|
||||
if test.vlt_all:
|
||||
test.file_grep(test.stats, r'Optimizations, Split always\s+(\d+)', 4)
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
16
test_regress/t/t_alw_split_cond.py
Executable file
16
test_regress/t/t_alw_split_cond.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2024 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
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile()
|
||||
|
||||
test.passes()
|
@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ["--stats",
|
||||
$Self->wno_unopthreads_for_few_cores()]
|
||||
);
|
||||
|
||||
if ($Self->{vlt_all}) {
|
||||
file_grep($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/, 12);
|
||||
}
|
||||
|
||||
execute(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user