-
Notifications
You must be signed in to change notification settings - Fork 840
Instruction Tracing #3071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Instruction Tracing #3071
Conversation
More testing in real conditions pinpointed some bugs: * `iretire` value was sometimes off by 1 because `counter_o` was not cleared correctly in instr_to_trace * A dimension was redundant in the `itype` field of iti_to_encoder * `valid_o` in cva6_iti was not being cleared when the output was not valid * Reset value fix for enum itype and priv
* Added modularity to the ITI module to ensure compatibility with an instruction-by-instruction encoder configuration (`block_mode = 0`) * Moved the code to corev_apu/instr_tracing/ITI for better project structure * Modified the `iti_test.sh` to accept an executable as an argument * ITI is integrated into `ariane_xilinx.sv` and `ariane_testharness.sv`
* Add `dpti_ctrl.vhd` from Digilent in the `ariane_xilinx.sv` platform * Add in the fpga flow the tcl files to build `xlnx_dpti_clk` needed for the dpti_ctrl * Add `slicer_DPTI.sv` to convert encapsulated packet (320 bits) into slices (8 bits) * Add constraints in `ariane.xdc` and `genesy-2.xdc` to correctly synthesize with Vivado 2018.2 * Modify the Makefile to add dpti in the fpga build
* Adding script for debug and format conversion in /Decapsuler * Adding in /SW the Receiver_DPTI that catch slices, reconstruct encapsulated packet and decapsulate them * Adding json files in /SW/FPGA_auto to custom Vscode in order to automate remote debugging (with openocd, gdb)
* Add Documentation about Instruction Tracing, the work done, the choice made, the work that remains to be done * Upgrading the previous CI Test using the referenceFlow from the E-Trace Specification for greater robustness and modularity
assign rvfi_csr_o.``CSR_NAME``.wdata = CSR_ENABLE_COND ? { {{CVA6Cfg.XLEN-$bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME} } : 0; \ | ||
assign rvfi_csr_o.``CSR_NAME``.rmask = CSR_ENABLE_COND ? 1 : 0; \ | ||
assign rvfi_csr_o.``CSR_NAME``.wmask = (rvfi_csr_o.``CSR_NAME``.rdata != {{CVA6Cfg.XLEN - $bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME}) && CSR_ENABLE_COND; | ||
`define CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, CSR_SOURCE_NAME) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
`define CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, CSR_SOURCE_NAME) \ | |
`define CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, | |
CSR_SOURCE_NAME) \ |
|
||
`CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, | ||
csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) | ||
`CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
`CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) | |
`CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, | |
csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) |
for (i = 0; i < 16; i++) begin | ||
`CONNECT_RVFI_FULL(1'b1, pmpaddr[i], { | ||
csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) | ||
`CONNECT_RVFI_FULL(1'b1, pmpaddr[i], {csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
`CONNECT_RVFI_FULL(1'b1, pmpaddr[i], {csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) | |
`CONNECT_RVFI_FULL(1'b1, pmpaddr[i], { | |
csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) |
❌ failed run, report available here. |
5257789
to
7fd2aa3
Compare
❌ failed run, report available here. |
Co-authored-by: ALLART Come <[email protected]>
❌ failed run, report available here. |
❌ failed run, report available here. |
❌ failed run, report available here. |
❌ failed run, report available here. |
@MaxCThales The PR breaks the GitHub CI. It cannot be integrated. Any ideas ? |
assign rvfi_csr_o.``CSR_NAME``.rmask = CSR_ENABLE_COND ? 1 : 0; \ | ||
assign rvfi_csr_o.``CSR_NAME``.wmask = (rvfi_csr_o.``CSR_NAME``.rdata != {{CVA6Cfg.XLEN - $bits(CSR_SOURCE_NAME)}, CSR_SOURCE_NAME}) && CSR_ENABLE_COND; | ||
// Changing verible formating to fix vivado synthesis errors and warnings | ||
`define CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, CSR_SOURCE_NAME) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
`define CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, CSR_SOURCE_NAME) \ | |
`define CONNECT_RVFI_FULL(CSR_ENABLE_COND, CSR_NAME, | |
CSR_SOURCE_NAME) \ |
|
||
`CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, | ||
csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) | ||
`CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
`CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) | |
`CONNECT_RVFI_FULL(CVA6Cfg.RVS, sstatus, | |
csr.mstatus_extended & SMODE_STATUS_READ_MASK[CVA6Cfg.XLEN-1:0]) |
for (i = 0; i < 16; i++) begin | ||
`CONNECT_RVFI_FULL(1'b1, pmpaddr[i], { | ||
csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) | ||
`CONNECT_RVFI_FULL(1'b1, pmpaddr[i], {csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
`CONNECT_RVFI_FULL(1'b1, pmpaddr[i], {csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) | |
`CONNECT_RVFI_FULL(1'b1, pmpaddr[i], { | |
csr.pmpaddr_q[i][CVA6Cfg.PLEN-3:1], pmpcfg_q[i].addr_mode[1]}) |
Integration of instr_tracing in corev_apu