Skip to content

Commit

Permalink
interconnect/axi: add get_ios to full AXI
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Binkowski committed Dec 18, 2020
1 parent 4092180 commit 18e9023
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions litex/soc/interconnect/axi.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ def __init__(self, data_width=32, address_width=32, id_width=1, clock_domain="sy
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)

Expand Down

0 comments on commit 18e9023

Please sign in to comment.