[dv] Add RISCV-DV patch to fix csr_test

The assembly for the  CSR test is generated by a script from RISCV-DV. A
.org directive is required to put the generated code at the correct
start address for the instantiated Ibex core.
This commit is contained in:
Greg Chadwick 2021-02-01 17:39:41 +00:00
parent aa3067cf43
commit 860b085e25
2 changed files with 13 additions and 0 deletions

View file

@ -15,4 +15,5 @@
"sample/sample_rv32imc_test.tar.gz",
]
patch_dir: "patches/google_riscv-dv"
}

View file

@ -0,0 +1,12 @@
diff --git a/scripts/gen_csr_test.py b/scripts/gen_csr_test.py
index 9a51a1a9..76c6bd19 100644
--- a/scripts/gen_csr_test.py
+++ b/scripts/gen_csr_test.py
@@ -214,6 +214,7 @@ def gen_setup(test_file):
test_file.write(".section .text.init\n")
test_file.write(".globl _start\n")
test_file.write(".option norvc\n")
+ test_file.write(".org 0x80\n")
test_file.write("_start:\n")