Merge pull request #1997 from FlyGoat/axi-id-fixes

integration/soc: data_width_convert: Inherit more bus properties
This commit is contained in:
enjoy-digital 2024-06-24 09:00:31 +02:00 committed by GitHub
commit 5aad0d6aca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 5 deletions

View File

@ -346,11 +346,24 @@ class SoCBusHandler(LiteXModule):
axi.AXILiteInterface : axi.AXILiteConverter,
axi.AXIInterface : axi.AXIConverter,
}[interface_cls]
adapted_interface = interface_cls(
data_width = self.data_width,
address_width = self.address_width,
addressing = interface.addressing,
)
args = {
'data_width': self.data_width,
'address_width': self.address_width,
'addressing': interface.addressing,
'bursting' : interface.bursting,
}
if isinstance(interface, axi.AXIInterface):
args.update({
'version' : interface.version,
'id_width': interface.id_width,
'aw_user_width': interface.aw.user_width,
'w_user_width': interface.w.user_width,
'b_user_width': interface.b.user_width,
'ar_user_width': interface.ar.user_width,
'r_user_width': interface.r.user_width,
})
adapted_interface = interface_cls(**args)
if direction == "m2s":
master, slave = interface, adapted_interface
elif direction == "s2m":