stdlib: Add get_last_exit_event_code to get m5 exit status code (#890)

Change-Id: I7319437dff24e31f343e71b6b8993f833b62147c
This commit is contained in:
Yu-Cheng Chang
2024-02-24 01:09:28 +08:00
committed by GitHub
parent 816ef46c78
commit 47f3ad45d3

View File

@@ -470,6 +470,12 @@ class Simulator:
""" """
return self._last_exit_event.getCause() return self._last_exit_event.getCause()
def get_last_exit_event_code(self) -> int:
"""
Returns the last exit event status code
"""
return self._last_exit_event.getCode()
def get_current_tick(self) -> int: def get_current_tick(self) -> int:
""" """
Returns the current tick. Returns the current tick.