Implement basic CSR infrastructure and Zicsr instruction support#248
Implement basic CSR infrastructure and Zicsr instruction support#248Dazhou-20383 wants to merge 5 commits into
Conversation
| funct3 = instr[14:12]; | ||
|
|
||
| end | ||
| `ifdef UTOSS_RISCV__ZICSR_ENABLED |
There was a problem hiding this comment.
thanks for making sure to gate everything on this flag; can you add it to our build-config here:
Lines 18 to 25 in 2a95e8f
| end | ||
| default: begin | ||
| csr_write_enable = 1'b0; | ||
| csr_write_data = data_t'(0); |
There was a problem hiding this comment.
directly determine csr_write_enable in decode could potentially cause hazards (update CSRfile too early). Maybe do something like csr_write_enable_D and pass it to the next stage?
| `include "src/headers/types.svh" | ||
|
|
||
| module CSRFile | ||
| ( input csr_addr_t addr |
There was a problem hiding this comment.
probably need separate read_addr and write_addr, since CSRfile reading and writing can be done in different addr if they are in different stages at the same time
DanielTaoHuang123
left a comment
There was a problem hiding this comment.
probably need to change csr_write_enable in decode and separate addr in CSRfile. read the comments for details
Add initial Zicsr CSR support
Added:
Design notes:
Future work: