mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
interconnect/axi: add get_ios to full AXI
This commit is contained in:
parent
4092180662
commit
18e90234b0
1 changed files with 13 additions and 0 deletions
|
@ -142,6 +142,19 @@ class AXIInterface:
|
|||
def connect_to_pads(self, pads, mode="master"):
|
||||
return connect_to_pads(self, pads, mode)
|
||||
|
||||
def get_ios(self, bus_name="wb"):
|
||||
subsignals = []
|
||||
for channel in ["aw", "w", "b", "ar", "r"]:
|
||||
for name in ["valid", "ready"]:
|
||||
subsignals.append(Subsignal(channel + name, Pins(1)))
|
||||
for name, width in getattr(self, channel).description.payload_layout:
|
||||
subsignals.append(Subsignal(channel + name, Pins(width)))
|
||||
|
||||
subsignals.append(Subsignal("rlast", Pins(1)))
|
||||
subsignals.append(Subsignal("wlast", Pins(1)))
|
||||
ios = [(bus_name , 0) + tuple(subsignals)]
|
||||
return ios
|
||||
|
||||
def connect(self, slave, **kwargs):
|
||||
return _connect_axi(self, slave, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue