Skip to content

Commit

Permalink
Add more details about the CSR access overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Jan 7, 2025
1 parent 6c6a1e5 commit 9f7528f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/VexiiRiscv/Tutorial/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -748,4 +748,10 @@ Will print the following in the terminal
[info] 00000136
Note, we added the --performance-counters=0 VexiiRiscv argument, as the mcycle isn't implemented otherwise.
The RISC-V architecture specifies various 64 bits counters which aren't cheap in FPGA, so VexiiRiscv do not implement them by default.
The RISC-V architecture specifies various 64 bits counters which aren't cheap in FPGA, so VexiiRiscv do not implement them by default.

Note, there is some cycles overhead to execute a CSR instruction :

- In VexiiRiscv, the instruction dispatcher willwait that the execute pipeline is empty before dispatching a CSR access.
- In VexiiRiscv, the CSR access themself are executed inside a little state machine which takes a few cycle to decode/read/write the CSR instruction.
- In VexiiRiscv, all the performance counters aswell as mcycle/minstret CSR are implemented using a shared memory (to save area). Accessing that memory takes a few cycles.

0 comments on commit 9f7528f

Please sign in to comment.