Wishbone Bus
- class torii.lib.soc.wishbone.bus.CycleType(value)
Wishbone Registered Feedback cycle type.
- class torii.lib.soc.wishbone.bus.BurstTypeExt(value)
Wishbone Registered Feedback burst type extension.
- class torii.lib.soc.wishbone.bus.Interface(*, addr_width: int, data_width: int, granularity: int | None = None, features: Iterable[Literal['rty', 'err', 'stall', 'lock', 'cti', 'bte']] = frozenset({}), name: str | None = None)
Wishbone interface.
See the Wishbone specification for description of the Wishbone signals. The
RST_I
andCLK_I
signals are provided as a part of the clock domain that drives the interface.Note that the data width of the underlying memory map of the interface is equal to port granularity, not port size. If port granularity is less than port size, then the address width of the underlying memory map is extended to reflect that.
- Parameters:
addr_width (int) – Width of the address signal.
data_width (int) – Width of the data signals (“port size” in Wishbone terminology). One of 8, 16, 32, 64.
granularity (int) – Granularity of select signals (“port granularity” in Wishbone terminology). One of 8, 16, 32, 64.
features (iter(str)) – Selects the optional signals that will be a part of this interface.
name (str) – Name of the underlying record.
- Variables:
depending (The correspondence between the Torii-SoC signals and the Wishbone signals changes)
target. (on whether the interface acts as an initiator or a)
adr (Signal(addr_width)) – Corresponds to Wishbone signal
ADR_O
(initiator) orADR_I
(target).dat_w (Signal(data_width)) – Corresponds to Wishbone signal
DAT_O
(initiator) orDAT_I
(target).dat_r (Signal(data_width)) – Corresponds to Wishbone signal
DAT_I
(initiator) orDAT_O
(target).sel (Signal(data_width // granularity)) – Corresponds to Wishbone signal
SEL_O
(initiator) orSEL_I
(target).cyc (Signal()) – Corresponds to Wishbone signal
CYC_O
(initiator) orCYC_I
(target).stb (Signal()) – Corresponds to Wishbone signal
STB_O
(initiator) orSTB_I
(target).we (Signal()) – Corresponds to Wishbone signal
WE_O
(initiator) orWE_I
(target).ack (Signal()) – Corresponds to Wishbone signal
ACK_I
(initiator) orACK_O
(target).err (Signal()) – Optional. Corresponds to Wishbone signal
ERR_I
(initiator) orERR_O
(target).rty (Signal()) – Optional. Corresponds to Wishbone signal
RTY_I
(initiator) orRTY_O
(target).stall (Signal()) – Optional. Corresponds to Wishbone signal
STALL_I
(initiator) orSTALL_O
(target).lock (Signal()) – Optional. Corresponds to Wishbone signal
LOCK_O
(initiator) orLOCK_I
(target). torii-soc Wishbone support assumes that initiators that don’t want bus arbitration to happen in between two transactions need to uselock
feature to guarantee this. An initiator without thelock
feature may be arbitrated in between two transactions even ifcyc
is kept high.cti (Signal()) – Optional. Corresponds to Wishbone signal
CTI_O
(initiator) orCTI_I
(target).bte (Signal()) – Optional. Corresponds to Wishbone signal
BTE_O
(initiator) orBTE_I
(target).
- class torii.lib.soc.wishbone.bus.Decoder(*args: Any, src_loc_at: int = 0, **kwargs: Any)
Wishbone bus decoder.
An address decoder for subordinate Wishbone buses.