ILA Backhaul Interface¶
In order to extract data off the device, Torii ILA uses whats called a “backhaul inteface”. It’s effectively an abstraction that is used to provide a consistent interface to interact with the ILA stream regardless if it’s over USB, UART, or some other interface.
- class torii_ila.backhaul.ILABackhaulInterface(ila)¶
This represents the API for all ILA backhaul interfaces to implement.
Backhaul interfaces primarily deal with Sample`s, which are `dict`s that map signal names to :py:class:`torii_ila._bits.bits
- Parameters:
ila (IntegratedLogicAnalyzer) – The ILA to interface to.
- Attributes:
ila (IntegratedLogicAnalyzer) – The instance of the ILA used on the device. This is used to allow the backhaul to automatically configure itself appropriately and also know what signals are being captures and the like.
samples (Iterable[dict[str, bits]] | None) – The collected samples from the ILA.
- refresh()¶
Update the internal sample buffer with samples ingested from the backhaul interface.
- Return type:
- update()¶
Like
refresh()
but appends the ingested samples rather than replacing them.This allows you to build a bigger ILA sample buffer locally out of multiple captures from the device under test. :rtype:
None
Note
Due to the latency and other factors, the signals in the concatenated samples buffers will likely not be contiguous.
- enumerate()¶
Iterate over all of the samples received from our backhaul interface and format them in a way that is easy to consume.
- write_vcd(vcd_file, inject_sample_clock=True, post_step=1)¶
Dump all received ILA samples from the backhaul interface into a VCD file on disk.s
- Parameters:
vcd_file (Path) – The file to write to.
inject_sample_clock (bool) – Add a clock that is timed to the ILA sample clock. (default: True)
post_step (int) –
The number of post-sample steps to append to the VCD. This is used so the last sample value is actually displayed as a transition.
This option is only meaningful if
inject_sample_clock
is true, as we can’t advance the VCD without it. (default: 1)
- Return type: