riscv-debug-spec icon indicating copy to clipboard operation
riscv-debug-spec copied to clipboard

How to halt or resume multiple harts simultaneously?

Open zhangdujiao opened this issue 1 year ago • 4 comments

For multi-hart System-on-Chip (SoC) system, which every Debug Module (DM) corresponds to one hart, how can multiple harts be simultaneously halted or resumed synchronously? Thanks!

zhangdujiao avatar Apr 25 '24 07:04 zhangdujiao

AFAIU, the debug spec does not cover this. The functionality you need may be supported by a custom mechanism. One should also be mindful whether the DMs share a single TAP (more precisely, DMs are on the same DMI bus) or not.

en-sc avatar Apr 25 '24 08:04 en-sc

One should also be mindful whether the DMs share a single TAP (more precisely, DMs are on the same DMI bus) or not.

thanks. yes, assuming all DMs are on the same DMI bus.

zhangdujiao avatar Apr 25 '24 08:04 zhangdujiao

The debug spec doesn't say. You could probably rig something up with halt groups, resume groups, and external triggers. In this case the external triggers would somehow connect to the harts on other DMs. Section 3.6 talks about the basic mechanisms.

rtwfroody avatar Apr 25 '24 16:04 rtwfroody

Section 3.6 talks about the basic mechanisms

thanks! DM external trigger which can be programmed in a group, just the same as hart. So, by external trigger firing, a group of hart can be halted or resumed together.

zhangdujiao avatar Apr 30 '24 07:04 zhangdujiao