Conversation
| @@ -0,0 +1,22 @@ | |||
| To install riscv-dv: | |||
There was a problem hiding this comment.
we'll need to move this into the ci and dev dockerfiles
| RISCV_DV_TARGET ?= rv32i | ||
| RISCV_DV_ISA ?= rv32i_zicsr |
There was a problem hiding this comment.
what's the difference between these two parameters? also we should probably feed thes from RISCOF_ISA_STRING
There was a problem hiding this comment.
RISCV_DV_TARGET is the target machine that riscv-dv generates instructions for (can be rv32i, rv32imafdc, rv32imc, rv32imcb)
RISCV_DV_ISA is the format that is fed to the GCC when compiling it (-march) saying what instructions the compiiler is allowed to accept (I.e. it will error if there is an opcode that is outside of what you pass here). I think we can probably just default it to being the same as the target but with _zicsr_zifencei appended and it should be able to handle everything fine.
I'm not really sure how to derive the target from the UTOSS_RISCV_CONFIG since they don't support all the targets by default and tell you to add more by yourself if you want a custom configuration (might be a good idea):
If you want to have a custom setting for your processor, you can make a copy of existing target directory as the template, and modify riscv_core_setting.sv to match your processor capability. You can then run the generator with --custom_target <target_dir>:
Maybe we can make the script find the best matching available one automatically? I tried making an implementation of this in my current commit.
There was a problem hiding this comment.
I'm not really sure how to derive the target from the UTOSS_RISCV_CONFIG since they don't support all the targets by default
when i go to their docs, i see that they say
Supported instruction set: RV32IMAFDC, RV64IMAFDC
So I'd expect them to support all combinations of these. They do not seem to have B extension here, so we could exclude configs with B extension form the matrix in github actions. So I feel like you can send the downcased version of UTOSS_RISCV_CONFIG as --target for riscv-dv? unless im missing something
There was a problem hiding this comment.
re:
RISCV_DV_TARGET is the target machine that riscv-dv generates instructions for (can be rv32i, rv32imafdc, rv32imc, rv32imcb)
RISCV_DV_ISA is the format that is fed to the GCC when compiling it (-march) saying what instructions the compiiler is allowed to accept (I.e. it will error if there is an opcode that is outside of what you pass here). I think we can probably just default it to being the same as the target but with _zicsr_zifencei appended and it should be able to handle everything fine.
Interesting, in my head these are kind of the same thing, especially with the _zicsr part -- like once this is imeplemented it would be part of the UTOSS_RISCV_CONFIG; i guess we'll cross that river when we get there though.
There was a problem hiding this comment.
I'm not really sure how to derive the target from the UTOSS_RISCV_CONFIG since they don't support all the targets by default
when i go to their docs, i see that they say
Supported instruction set: RV32IMAFDC, RV64IMAFDC
So I'd expect them to support all combinations of these. They do not seem to have B extension here, so we could exclude configs with B extension form the matrix in github actions. So I feel like you can send the downcased version of
UTOSS_RISCV_CONFIGas--targetfor riscv-dv? unless im missing something
For the target I'm pretty sure it just looks in the target directory for a folder matching the --target (https://github.com/chipsalliance/riscv-dv/tree/master/pygen/pygen_src/target) and sets the config file found in that folder.
|
could you also configure this to run in ci? does not have to be scheduled yet -- just maybe a trial run |
Note that the current script doesn't put everything possible in the compare CSV as the logger is missing some of it, so we might need to add more later. The address mismatch is also still an issue so it will fail if there is ever an AUIPC (which is pretty much always) Also it seems like the pyflow part of the riscv-dv library is a little outdated so for the B extension it produces instructions that are no longer in the spec |
🔧 DE1-SoC Synthesis Report Summary Diff
Comparing synthesis results from main branch vs. this PR |
| make riscv_dv | ||
| ``` | ||
|
|
||
| TODO: Delete this README and add to wiki? No newline at end of file |
#163
Integrates riscv-dv testing framework
Added makefile target "riscv_dv" that runs the Python script. The Python script runs the run.py file provided by the framework, compiles using gcc with the linker script from riscof, runs using the riscof dut_sim, runs utoss_log_trace_to_csv which converts the logs to a CSV format, and runs a provided script to compare the CSV with the SAIL simulator reference model.
See the README for instructions on installing