Michael Schaffner | fc73321 | 2020-07-13 19:26:14 -0700 | [diff] [blame] | 1 | [](https://travis-ci.com/pulp-platform/riscv-dbg) |
| 2 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 3 | # RISC-V Debug Support for PULP Cores |
| 4 | |
| 5 | This module is an implementation of a debug unit compliant with the [RISC-V |
| 6 | debug specification](https://github.com/riscv/riscv-debug-spec) v0.13.1. It is |
| 7 | used in the [Ariane](https://github.com/pulp-platform/ariane) and |
| 8 | [RI5CY](https://github.com/pulp-platform/riscv) cores. |
| 9 | |
| 10 | ## Implementation |
| 11 | We use an execution-based technique, also described in the specification, where |
| 12 | the core is running in a "park loop". Depending on the request made to the debug |
| 13 | unit via JTAG over the Debug Transport Module (DTM), the code that is being |
| 14 | executed is changed dynamically. This approach simplifies the implementation |
| 15 | side of the core, but means that the core is in fact always busy looping while |
| 16 | debugging. |
| 17 | |
| 18 | ## Features |
| 19 | The following features are currently supported |
| 20 | |
| 21 | * Parametrizable buswidth for `XLEN=32` `XLEN=64` cores |
| 22 | * Accessing registers over abstract command |
| 23 | * Program buffer |
| 24 | * System bus access (only `XLEN`) |
| 25 | * DTM with JTAG interface |
| 26 | |
| 27 | These are not implemented (yet) |
| 28 | |
| 29 | * Trigger module |
| 30 | * Quick access using abstract commands |
| 31 | * Accessing memory using abstract commands |
| 32 | * Authentication |
| 33 | |
| 34 | ## Tests |
| 35 | |
| 36 | We use OpenOCD's [RISC-V compliance |
| 37 | tests](https://github.com/riscv/riscv-openocd/blob/riscv/src/target/riscv/riscv-013.c), |
Michael Schaffner | fc73321 | 2020-07-13 19:26:14 -0700 | [diff] [blame] | 38 | our custom testbench in `tb/` and |
| 39 | [riscv-tests/debug](https://github.com/riscv/riscv-tests/tree/master/debug). |