mirror of
https://github.com/verilator/verilator.git
synced 2026-10-05 17:43:31 +02:00
CR, etc.
This commit is contained in:
+25
-1
@@ -41,7 +41,31 @@ if [ "$CI_OS_NAME" = "linux" ]; then
|
||||
fi
|
||||
|
||||
install-wavediff() {
|
||||
cargo install wavetools
|
||||
source ci/docker/buildenv/wavetools.conf
|
||||
local _base_url="https://github.com/hudson-trading/wavetools/releases/download/${WAVETOOLS_VERSION}"
|
||||
local _platform
|
||||
if [ "$CI_OS_NAME" = "linux" ]; then
|
||||
_platform="linux-x86_64"
|
||||
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||
_platform="macos-arm64"
|
||||
elif [ "$CI_OS_NAME" = "windows" ]; then
|
||||
_platform="windows-x86_64"
|
||||
else
|
||||
echo "WARNING: No wavetools binary available for CI_OS_NAME=$CI_OS_NAME, skipping"
|
||||
return 0
|
||||
fi
|
||||
local _tmpdir
|
||||
_tmpdir=$(mktemp -d)
|
||||
local _archive="wavetools-${WAVETOOLS_VERSION}-${_platform}"
|
||||
if [ "$CI_OS_NAME" = "windows" ]; then
|
||||
wget -q -O "${_tmpdir}/${_archive}.zip" "${_base_url}/${_archive}.zip"
|
||||
unzip -o "${_tmpdir}/${_archive}.zip" -d "${_tmpdir}"
|
||||
else
|
||||
wget -q -O "${_tmpdir}/${_archive}.tar.gz" "${_base_url}/${_archive}.tar.gz"
|
||||
tar -xzf "${_tmpdir}/${_archive}.tar.gz" -C "${_tmpdir}"
|
||||
fi
|
||||
sudo cp "${_tmpdir}/${_archive}/wavediff" /usr/local/bin/wavediff
|
||||
rm -rf "${_tmpdir}"
|
||||
}
|
||||
|
||||
if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
||||
|
||||
@@ -53,10 +53,14 @@ RUN apt-get update \
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y cargo && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
RUN cargo install wavetools && \
|
||||
cp -p $HOME/.cargo/bin/wavediff /usr/local/bin/wavediff
|
||||
COPY wavetools.conf /tmp/wavetools.conf
|
||||
ARG WGET_EXTRA_ARGS=
|
||||
RUN . /tmp/wavetools.conf && \
|
||||
wget -q ${WGET_EXTRA_ARGS} -O /tmp/wavetools.tar.gz \
|
||||
"https://github.com/hudson-trading/wavetools/releases/download/${WAVETOOLS_VERSION}/wavetools-${WAVETOOLS_VERSION}-linux-x86_64.tar.gz" && \
|
||||
tar -xzf /tmp/wavetools.tar.gz -C /tmp && \
|
||||
cp /tmp/wavetools-${WAVETOOLS_VERSION}-linux-x86_64/wavediff /usr/local/bin/wavediff && \
|
||||
rm -rf /tmp/wavetools.tar.gz /tmp/wavetools-* /tmp/wavetools.conf
|
||||
|
||||
COPY build.sh /tmp/build.sh
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
WAVETOOLS_VERSION=v0.1.2
|
||||
@@ -1257,6 +1257,7 @@ vpm
|
||||
vpp
|
||||
warmup
|
||||
wavealloca
|
||||
wavediff
|
||||
waveforms
|
||||
whitespace
|
||||
widthed
|
||||
|
||||
@@ -221,7 +221,7 @@ class ProtectVisitor final : public VNVisitor {
|
||||
+ "_protectlib_final(chandle handle__V);\n\n");
|
||||
|
||||
// Local variables
|
||||
// Avoid tracing handle, as it is not a stable value, so breaks vcddiff
|
||||
// Avoid tracing handle, as it is not a stable value, so breaks wavediff
|
||||
// Likewise other internals aren't interesting to the user
|
||||
txtp->add("// verilator tracing_off\n");
|
||||
|
||||
|
||||
@@ -2514,10 +2514,11 @@ class VlTest:
|
||||
|
||||
def vcd_identical(self, fn1: str, fn2: str) -> None:
|
||||
"""Test if two VCD/FST files have logically-identical contents"""
|
||||
cmd = 'wavediff --epsilon ' + fn1 + ' ' + fn2
|
||||
out = VtOs.run_capture(cmd, check=False)
|
||||
if out != "":
|
||||
print(out)
|
||||
cmd = 'wavediff --epsilon 0.0000001 ' + fn1 + ' ' + fn2
|
||||
proc = subprocess.run([cmd], capture_output=True, text=True, shell=True, check=False)
|
||||
if proc.returncode:
|
||||
print(proc.stderr)
|
||||
print(proc.stdout)
|
||||
self.copy_if_golden(fn1, fn2)
|
||||
self.error("VCD miscompares " + fn1 + " " + fn2)
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ EXEMPT_FILES_LIST = """
|
||||
REUSE.toml
|
||||
ci/ci-win-compile.ps1
|
||||
ci/ci-win-test.ps1
|
||||
ci/docker/buildenv/wavetools.conf
|
||||
ci/codecov
|
||||
docs/CONTRIBUTORS
|
||||
docs/_static
|
||||
|
||||
@@ -93,7 +93,6 @@ def run(test, *, verilator_flags2=()):
|
||||
if "enddefinitions" in la:
|
||||
break
|
||||
|
||||
# NOCOMMIT: figure out attr handling
|
||||
test.trace_identical(trace_hier, trace_nonh)
|
||||
# The hierarchical must match the reference
|
||||
test.trace_identical(trace_hier, test.golden_filename)
|
||||
|
||||
@@ -109,7 +109,6 @@ def run(test, *, verilator_flags2=()):
|
||||
if "enddefinitions" in la:
|
||||
break
|
||||
|
||||
# NOCOMMIT: figure out attr handling
|
||||
test.trace_identical(trace_libs, trace_nonl)
|
||||
# The --lib-create must match the reference
|
||||
test.trace_identical(trace_libs, test.golden_filename)
|
||||
|
||||
Reference in New Issue
Block a user