integration/soc/add_adapter: Use bus_ prefix for all converter functions for consistency.
This commit is contained in:
parent
53e458f63a
commit
03a0739d13
|
@ -319,8 +319,8 @@ class SoCBusHandler(LiteXModule):
|
||||||
def add_adapter(self, name, interface, direction="m2s"):
|
def add_adapter(self, name, interface, direction="m2s"):
|
||||||
assert direction in ["m2s", "s2m"]
|
assert direction in ["m2s", "s2m"]
|
||||||
|
|
||||||
# Data-Width conversion helper.
|
# Bus-Data-Width conversion helper.
|
||||||
def data_width_convert(interface, direction):
|
def bus_data_width_convert(interface, direction):
|
||||||
# Same Data-Width, return un-modified interface.
|
# Same Data-Width, return un-modified interface.
|
||||||
if interface.data_width == self.data_width:
|
if interface.data_width == self.data_width:
|
||||||
return interface
|
return interface
|
||||||
|
@ -345,8 +345,8 @@ class SoCBusHandler(LiteXModule):
|
||||||
self.submodules += converter
|
self.submodules += converter
|
||||||
return adapted_interface
|
return adapted_interface
|
||||||
|
|
||||||
# Addressing conversion helper.
|
# Bus-Addressing conversion helper.
|
||||||
def addressing_convert(interface, direction):
|
def bus_addressing_convert(interface, direction):
|
||||||
# Same Addressing, return un-modified interface.
|
# Same Addressing, return un-modified interface.
|
||||||
if interface.addressing == self.addressing:
|
if interface.addressing == self.addressing:
|
||||||
return interface
|
return interface
|
||||||
|
@ -407,9 +407,9 @@ class SoCBusHandler(LiteXModule):
|
||||||
|
|
||||||
# Interface conversion.
|
# Interface conversion.
|
||||||
adapted_interface = interface
|
adapted_interface = interface
|
||||||
adapted_interface = data_width_convert(adapted_interface, direction)
|
adapted_interface = bus_data_width_convert(adapted_interface, direction)
|
||||||
adapted_interface = addressing_convert(adapted_interface, direction)
|
adapted_interface = bus_addressing_convert(adapted_interface, direction)
|
||||||
adapted_interface = bus_standard_convert(adapted_interface, direction)
|
adapted_interface = bus_standard_convert(adapted_interface, direction)
|
||||||
|
|
||||||
if type(interface) != type(adapted_interface) or interface.data_width != adapted_interface.data_width:
|
if type(interface) != type(adapted_interface) or interface.data_width != adapted_interface.data_width:
|
||||||
fmt = "{name} Bus {adapted} from {from_bus} {from_bits}-bit to {to_bus} {to_bits}-bit."
|
fmt = "{name} Bus {adapted} from {from_bus} {from_bits}-bit to {to_bus} {to_bits}-bit."
|
||||||
|
|
Loading…
Reference in New Issue