opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

Come up with reset strategy

Open imphil opened this issue 7 years ago • 10 comments

We need to think about the various reset signals, how they should interact and what they should reset:

  • Power on Reset (PoR)
  • ndmreset (from the debug module)
  • A (potentially available) reset button on the board
  • JTAG SRST (system reset)
  • JTAG TRST (test reset)

ndmreset

All the debug spec has to say about it is this:

This bit controls the reset signal from the DM to the rest of the system. The signal should reset every part of the system, including every hart, except for the DM and any logic required to access the DM. To perform a system reset the debugger writes 1, and then writes 0 to deassert the reset.

-- Debug Spec 0.13.1, p. 25

imphil avatar Apr 05 '19 10:04 imphil

Thanks for bringing this up. I'll assign myself and start with a section on it for the Jasmine spec. We'll want to have alert-handler-based resets as well (including watchdog)

sjgitty avatar Apr 10 '19 04:04 sjgitty

@imphil would you be okay with Chris and I huddling and coming up with some proposal we can then review together?

tjaychen avatar Jun 28 '19 23:06 tjaychen

Absolutely, please go ahead.

imphil avatar Jul 01 '19 15:07 imphil

hi all, is there any reason we have to support SRST? From what I understand, SRST is not necessarily a part of the normal JTAG standard. I know TRST is also optional, but I'd like to support that since it has a lot of tester control benefits. My general feeling also, is that SRST falls very close in functionality to ndmreset.

tjaychen avatar Jul 01 '19 23:07 tjaychen

SRST is just the most reliable way to get a system to reset.

As OpenOCD puts it:

In the best case, OpenOCD can hold SRST, then reset the TAPs via TRST and send commands through JTAG to halt the CPU at the reset vector before the 1st instruction is executed. Then when it finally releases the SRST signal, the system is halted under debugger control before any code has executed.

(http://openocd.org/doc/html/Reset-Configuration.html)

However, we should be fine without SRST.

imphil avatar Jul 02 '19 08:07 imphil

sounds good. well let me at least define what it should do, and we can later discuss whether something should always be included.

tjaychen avatar Jul 02 '19 22:07 tjaychen

there's been work on getting this topic sorted out, but nothing merged so far, so keeping this issue open until it is.

imphil avatar Aug 22 '19 12:08 imphil

Thanks for the feedback on the doc Philipp, I will respond later today

On Thu, Aug 22, 2019, 05:46 Philipp Wagner [email protected] wrote:

there's been work on getting this topic sorted out, but nothing merged so far, so keeping this issue open until it is.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/70?email_source=notifications&email_token=AAH2RSQ6JLRXNISS2QZ7V3TQF2DDZA5CNFSM4HD2VNHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4465SI#issuecomment-523890377, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH2RSSC6S72I3ROJ2TDYO3QF2DDZANCNFSM4HD2VNHA .

tjaychen avatar Aug 22 '19 16:08 tjaychen

I think the major points that are not resolved are #93 and the tap controller daisy chaining.

The latter I've pinged Chris for his thinking, and added some of my own notes today. The former I hope to put my thoughts down later this week.

tjaychen avatar Sep 04 '19 03:09 tjaychen

The doc is written up and will be transferred over to md https://docs.google.com/document/d/1sQv0z2rqDUIWilPP7_U62KUfvO-_0tFWwRIGy3EF6Jw/edit?usp=sharing

I will close this issue now.

tjaychen avatar Oct 11 '19 22:10 tjaychen