enjoy-digital / litex

Build your hardware, easily!
Other
3.02k stars 571 forks source link

Implementing reset comming from the CPU jtag #2109

Open Dolu1990 opened 4 weeks ago

Dolu1990 commented 4 weeks ago

Hi,

I didn't found a clean way for the CPU core.py to provide a reset (comming from its jtag debug module) to the SoC

Here is what i mean as a idea reset tree topology :

- power on reset / external async reset
  -> Debug module
  -> Soc reset

- Debug module reset from JTAG (NDM_RESET)   this guy is the subject of this issue.
  -> Soc reset

- Soc reset
  -> CPU / Interconnect / Peripherals 

So far, it has been handled in a hacky way which assumes how the board target is implemented : https://github.com/enjoy-digital/litex/blob/59fc1caac4da47e297db863bca0a9b70a950d8d3/litex/soc/cores/cpu/vexiiriscv/core.py#L522 For Rocket, they keept their NDM_RESET floating (non-functional)

Is there any other way ?