diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-10-25 09:01:58 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-10-25 09:01:58 -0600 |
| commit | 1fb4b0a22070f9184b8fdcfdb10ef7df31eb9fa4 (patch) | |
| tree | 18f5584eeac09d82fdbc2a65ca38eed6cf217139 /tb/sim/sim.py | |
| parent | 746da8fe47003997ae0b762fe325c7fa8040cafb (diff) | |
Implement explicit sim state dump
Diffstat (limited to 'tb/sim/sim.py')
| -rwxr-xr-x | tb/sim/sim.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tb/sim/sim.py b/tb/sim/sim.py index f94d259..5d3ecd5 100755 --- a/tb/sim/sim.py +++ b/tb/sim/sim.py @@ -264,4 +264,10 @@ for line in output.stdout.split('\n'): if final := module_get('final'): final() +if os.getenv('SIM_DUMP', ''): + dump_regs() + for rng in mem_dumps: + print(f'Memory range 0x{rng.start:08x}..0x{rng.stop:08x}') + print(hexdump(rng.start, read_mem(rng.start, rng.stop - rng.start))) + exit(success=True) |
