diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-12-07 20:06:56 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-12-07 20:06:56 -0600 |
| commit | d8d687ad8052809f66c0b5a36d4ca74d0a3b202c (patch) | |
| tree | e17f38a7be0bc9353054c284ec1659619a66ed9c | |
| parent | a7adc0af074826a4c68c7395d2abfd4b931955df (diff) | |
Make --no-tty optional in sim
Diffstat (limited to '')
| -rw-r--r-- | sim/gdbstub.py | 2 | ||||
| -rwxr-xr-x | sim/sim.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sim/gdbstub.py b/sim/gdbstub.py index c01a4a7..8d20f39 100644 --- a/sim/gdbstub.py +++ b/sim/gdbstub.py @@ -1,6 +1,7 @@ import sys, socket cycles = None +enable_tty = True start_halted = True def init(): @@ -77,7 +78,6 @@ def halt(): elif data == b's': return 'step' else: - print('unhandled packet:', data, file=sys.stderr) out = b'' reply(out) @@ -280,12 +280,15 @@ mem_dumps = module_get('mem_dumps', []) if init := module_get('init'): init() -exec_args = [verilated, '--headless', '--no-tty', '--dump-regs'] +exec_args = [verilated, '--headless', '--dump-regs'] cycles = module_get('cycles', 1024) if cycles is not None: exec_args.extend(['--cycles', str(cycles)]) +if not module_get('enable_tty', False): + exec_args.append('--no-tty') + for rng in mem_dumps: length = rng.stop - rng.start assert rng.start >= 0 and rng.stop > rng.start \ |
