Skip to content

Commit

Permalink
[Integration tests] Verilator 1.102 memory bug caused random DPI fails
Browse files Browse the repository at this point in the history
A Verilator bug was causing sporadic ESI cosim failures. Upgrading Verilator
fixes it.
  • Loading branch information
teqdruid committed Mar 7, 2021
1 parent e2f3f69 commit 13af09d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightlyIntegrationTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
needs: build-llvm
runs-on: ubuntu-latest
container:
image: ghcr.io/circt/images/circt-integration-test:v3
image: ghcr.io/circt/images/circt-integration-test:v4
strategy:
matrix:
build-assert: [ON, OFF]
Expand Down
6 changes: 3 additions & 3 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ the right thing.

[Verilator](https://github.com/verilator/verilator) can be used to check
SystemVerilog code. To run the tests, build or install a **recent** version
of Verilator (at least v4.034). (Some Linux distributions have *ancient*
versions.) If Verilator is in your PATH, `build check-circt` should run the
tests which require Verilator.
of Verilator (at least v4.034, ideally v1.110 or later to avoid a known bug).
(Some Linux distributions have *ancient* versions.) If Verilator is in your
PATH, `build check-circt` should run the tests which require Verilator.

We provide a script `utils/get-verilator.sh` to automate the download and
compilation of Verilator into a known location. The testing script will check
Expand Down
4 changes: 2 additions & 2 deletions lib/Dialect/ESI/cosim/cosim_dpi_server/DpiEntryPoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ static int validateSvOpenArray(const svOpenArrayHandle data,
int elemSize = numElems == 0 ? 0 : (totalBytes / numElems);
if (numElems * expectedElemSize != totalBytes) {
printf("DPI-C: ERROR: passed array argument that doesn't have expected "
"element-size: expected=%d actual=%d\n",
expectedElemSize, elemSize);
"element-size: expected=%d actual=%d numElems=%d totalBytes=%d\n",
expectedElemSize, elemSize, numElems, totalBytes);
return -4;
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion utils/get-verilator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
##===----------------------------------------------------------------------===##

EXT_DIR=$(cd "$(dirname "$BASH_SOURCE[0]")/../ext" && pwd)
VERILATOR_VER=4.102
VERILATOR_VER=4.110

echo $EXT_DIR
cd $EXT_DIR
Expand Down

0 comments on commit 13af09d

Please sign in to comment.