aboutsummaryrefslogtreecommitdiff
path: root/debug/targets.py
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2023-10-17 09:47:39 -0700
committerGitHub <noreply@github.com>2023-10-17 09:47:39 -0700
commita176b65b40b9a2bcd5ce24334722036f82677eb5 (patch)
tree7fc2ba1a4271384fa5e3a2c9e79452a64c7961f8 /debug/targets.py
parent7453fe9e17421cfd26c3976449e5d4bd8df0ef31 (diff)
parent4dfd2e7b4b6ef3f1dc134d299cc2ea4d2bbadab1 (diff)
downloadriscv-tests-a176b65b40b9a2bcd5ce24334722036f82677eb5.zip
riscv-tests-a176b65b40b9a2bcd5ce24334722036f82677eb5.tar.gz
riscv-tests-a176b65b40b9a2bcd5ce24334722036f82677eb5.tar.bz2
Merge pull request #514 from lz-bro/timer_configurable
Make CLINT address configurable
Diffstat (limited to 'debug/targets.py')
-rw-r--r--debug/targets.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/debug/targets.py b/debug/targets.py
index 3f63e79..081e2c6 100644
--- a/debug/targets.py
+++ b/debug/targets.py
@@ -93,9 +93,12 @@ class Target:
# before starting the test.
gdb_setup = []
- # Supports mtime at 0x2004000
+ # Supports mtime default at clint_addr + 0x4000
supports_clint_mtime = True
+ # CLINT register address, set to the default value of spike.
+ clint_addr = 0x02000000
+
# Implements custom debug registers like spike does. It seems unlikely any
# hardware will every do that.
implements_custom_test = False
@@ -189,6 +192,7 @@ class Target:
Target.temporary_files.append(self.temporary_binary)
args = list(sources) + [
+ f"-DCLINT={self.clint_addr}",
"programs/entry.S", "programs/init.c",
f"-DNHARTS={len(self.harts)}",
"-I", "../env",