You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then clone the latest riscv-arch-test either manually or by specifying a version with riscof arch-test: $ git clone https://github.com/riscv-non-isa/riscv-arch-test
or $ riscof arch-test --clone --get-version 3.10.0
riscv-arch-test version 3.10.0 and above (including the new pre-releases) added physical memory protection (PMP) tests. These tests use two new features, verify and the PMP schema. To use these tests, you need the latest versions of riscof, riscv-config, and riscv_isac from GitHub. I recommend doing these installs in a fresh python environment to ensure that there is no conflict between older and newer versions.
As of this post, if you then attempt to clone the riscv-arch-test repo using riscof arch-test --clone, the tests will fail because it will clone the repo at riscv/riscv-arch-test@eca49e1, which has a bug. The bug was immediately fixed in the next commit riscv/riscv-arch-test@59075f8, however RISCOF fetches using tags so it will not fetch the latest release with the bug fix. To get around this issue, you can either manually clone the repo or specify a version using the --get-version flag, for example riscof arch-test --clone --get-version 3.10.0. This issue may go away with the next release/pre-release, but I think the mechanism for cloning riscv-arch-test with RISCOF should be improved.
Bug with cloning/updating riscv-arch-test with RISCOF
Upon inspection of RISCOF's code, the following segment handles cloning the riscv-arch-test repo. The issue lies with the repo.tags list because the tags are arranged in alphanumeric order, not release order, so cloning the last tag will not clone the latest release.
This is also why this issue only started to appear despite riscv-arch-test version 3.10.0 (which added the PMP tests) being released last year. At that time the last tag in alphanumeric order was actually 3.9.1 not 3.10.0, so RISCOF wasn't cloning the latest release.
This is moreso a write-up since the recent pre-releases to riscv-arch-test broke my RISCOF setup.
TL;DR
install the latest versions of
riscof,riscv-config, andriscv_isacdirectly from GitHubThen clone the latest riscv-arch-test either manually or by specifying a version with
riscof arch-test:$ git clone https://github.com/riscv-non-isa/riscv-arch-testor
$ riscof arch-test --clone --get-version 3.10.0riscv-arch-test version 3.10.0 and above (including the new pre-releases) added physical memory protection (PMP) tests. These tests use two new features,
verifyand the PMP schema. To use these tests, you need the latest versions ofriscof,riscv-config, andriscv_isacfrom GitHub. I recommend doing these installs in a fresh python environment to ensure that there is no conflict between older and newer versions.Based on Import preprocessing error #128 and riscv_isac dependency not updated #122, the latest version of
riscv_isacin PyPI is outdated, so install it from GitHubpip install riscv_isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isacBased on Unknown field error #140 and Pypi package for riscof doesn’t include latest commits #144, the latest version of
riscv-configin PyPI doesn't support the PMP schema, so install it from GitHubpip install riscv-config @ git+https://github.com/riscv-software-src/riscv-config@devInstall
riscoffrom GitHub for support for theverifyfeature (Support for verify feature and PMP schema support #134) :pip install riscof @ git+https://github.com/riscv-software-src/riscof@devAs of this post, if you then attempt to clone the riscv-arch-test repo using
riscof arch-test --clone, the tests will fail because it will clone the repo at riscv/riscv-arch-test@eca49e1, which has a bug. The bug was immediately fixed in the next commit riscv/riscv-arch-test@59075f8, however RISCOF fetches using tags so it will not fetch the latest release with the bug fix. To get around this issue, you can either manually clone the repo or specify a version using the--get-versionflag, for exampleriscof arch-test --clone --get-version 3.10.0. This issue may go away with the next release/pre-release, but I think the mechanism for cloning riscv-arch-test with RISCOF should be improved.Bug with cloning/updating riscv-arch-test with RISCOF
Upon inspection of RISCOF's code, the following segment handles cloning the riscv-arch-test repo. The issue lies with the
repo.tagslist because the tags are arranged in alphanumeric order, not release order, so cloning the last tag will not clone the latest release.riscof/riscof/arch_test.py
Lines 51 to 56 in aa146d4
This is also why this issue only started to appear despite riscv-arch-test version 3.10.0 (which added the PMP tests) being released last year. At that time the last tag in alphanumeric order was actually 3.9.1 not 3.10.0, so RISCOF wasn't cloning the latest release.