Python Utilities
VCD Output
Simulation State Dump
- yasimavr.utils.sim_dump.sim_dump(simloop: AbstractSimLoop, stream: Optional[TextIOBase] = None) str | None
Dump the current state of a simulation into a I/O stream.
- Parameters:
simloop (AbstractSimLoop) – instance of AbstractSimLoop to dump
stream (io.TextIOBase) – writable stream instance or None
If stream is None, the state is dumped into a string buffer and the string is returned. If stream is not None, the state is written into it and None is returned.
GDB Stub
- class yasimavr.utils.gdb_server.GDB_Stub(conn_point, fw_source, simloop=None, device=None)
This class implements a stub that acts as an interface between yasimavr and the GNU Debugger. It is designed on top of a TCP server and implements the relevant parts of the Remote Serial Protocol.
Source: https://www.sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html
- Parameters:
conn_point (tuple[str, int]) – Tuple (IP, port) for the socket to listen for GDB connections
fw_source (str) – path to the firmware source code
simloop (AsyncSimLoop) – Simulation loop to connect to
device (Device) – Device simulation model to connect to
Note
At least one of simloop or device should be specified.
If simloop is provided, the stub will take control of it. If device is provided, the stub will create a simulation loop for it and dispose of it on shutdown.