Skip to content
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

Simulator exit #368

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marnovandermaas
Copy link
Contributor

@marnovandermaas marnovandermaas commented Dec 10, 2024

This PR allows the simulator to exit when the following magic string is sent over the UART:
Safe to exit simulator.\xd8\xaf\xfb\xa0\xc7\xe1\xa9\xd7

Closes: #365

Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
a78922f14a8cc20c7ee569f322a04626f2ac6127

Signed-off-by: Marno van der Maas <[email protected]>
@marnovandermaas
Copy link
Contributor Author

One thing to note with this PR is that the magic string will exit the simulator on any of the UARTS including the RS-485 one. I don't think that's a problem, but if it is we can parametrise the uartdpi.sv.

Copy link
Contributor

@alees24 alees24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason for copying the string into the uartdpi state as opposed to just indexing a constant string; intending to support it being reprogrammed while the DPI model is active?

@alees24
Copy link
Contributor

alees24 commented Dec 10, 2024

As discussed in person, and annotated here just for future consideration....a simple register/IP block on the Sonata bus that provided power down/suspend/reset on a physical system (we still have a requirement for a reset block) could also provide shutdown in simulation more elegantly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simulation exit procedure
2 participants