Skip to content
This repository was archived by the owner on Feb 22, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: '📦 Install Sail RISC-V reference model'
run: |
mkdir $GITHUB_WORKSPACE/sail-riscv
wget -q https://github.com/riscv/sail-riscv/releases/download/0.8/sail-riscv-Linux-x86_64.tar.gz
wget -q https://github.com/riscv/sail-riscv/releases/download/0.9/sail-riscv-Linux-x86_64.tar.gz
tar -xzf $GITHUB_WORKSPACE/sail-riscv-Linux-x86_64.tar.gz -C $GITHUB_WORKSPACE/sail-riscv
ls -al $GITHUB_WORKSPACE/sail-riscv/sail-riscv-Linux-x86_64/bin
echo $GITHUB_WORKSPACE/sail-riscv/sail-riscv-Linux-x86_64/bin >> $GITHUB_PATH
Expand All @@ -42,6 +42,7 @@ jobs:
run: |
echo "upstream RISCOF is broken! https://github.com/riscv-software-src/riscof/issues/122"
pip3 install git+https://github.com/riscv/riscof.git@d38859f85fe407bcacddd2efcd355ada4683aee4
pip3 install jsoncomment

- name: '📦 Install GHDL'
uses: ghdl/setup-ghdl@v1
Expand Down
8 changes: 7 additions & 1 deletion plugin-sail_cSim/riscof_sail_cSim.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import random
import string
import json
from jsoncomment import JsonComment
from string import Template

import riscof.utils as utils
Expand Down Expand Up @@ -110,7 +111,9 @@ def runTests(self, testList, cgf_file=None, header_file= None):

try:
sail_config = subprocess.run(["sail_riscv_sim", "--print-default-config"], check= True, text=True, capture_output=True)
sail_config = json.loads(sail_config.stdout)
# Sail 0.9 generates non compliant JSON (contains C style inline comments)
parser = JsonComment(json)
sail_config = parser.loads(sail_config.stdout)
except subprocess.CalledProcessError as e:
print("sail_riscv_sim --print-default-config failed:", e.stderr)
exit(1)
Expand All @@ -131,6 +134,9 @@ def runTests(self, testList, cgf_file=None, header_file= None):
sail_config["extensions"]["Sv32"]["supported"] = True
sail_config["extensions"]["Zcf"]["supported"] = True

# Disabling "Svrsw60t59b" since it is conflicting with disabled "Sv39"
sail_config["extensions"]["Svrsw60t59b"]["supported"] = False

# For User-configuration: Replace this variable with your configuration. "/home/riscv-arch-test/custom_sail_config.json"
sail_config_path = os.path.join(self.pluginpath, 'env', 'sail_config.json')

Expand Down