Merge pull request #597 from antmicro/jboc/litex-buildenv-add-adapter-fix
Fix Vivado crash when using 1:1 wishbone.Converter
This commit is contained in:
commit
9fc488bdf6
|
@ -282,12 +282,15 @@ class SoCBusHandler(Module):
|
||||||
assert direction in ["m2s", "s2m"]
|
assert direction in ["m2s", "s2m"]
|
||||||
|
|
||||||
if isinstance(interface, wishbone.Interface):
|
if isinstance(interface, wishbone.Interface):
|
||||||
new_interface = wishbone.Interface(data_width=self.data_width)
|
if interface.data_width != self.data_width:
|
||||||
if direction == "m2s":
|
new_interface = wishbone.Interface(data_width=self.data_width)
|
||||||
converter = wishbone.Converter(master=interface, slave=new_interface)
|
if direction == "m2s":
|
||||||
if direction == "s2m":
|
converter = wishbone.Converter(master=interface, slave=new_interface)
|
||||||
converter = wishbone.Converter(master=new_interface, slave=interface)
|
if direction == "s2m":
|
||||||
self.submodules += converter
|
converter = wishbone.Converter(master=new_interface, slave=interface)
|
||||||
|
self.submodules += converter
|
||||||
|
else:
|
||||||
|
new_interface = interface
|
||||||
elif isinstance(interface, axi.AXILiteInterface):
|
elif isinstance(interface, axi.AXILiteInterface):
|
||||||
# Data width conversion
|
# Data width conversion
|
||||||
intermediate = axi.AXILiteInterface(data_width=self.data_width)
|
intermediate = axi.AXILiteInterface(data_width=self.data_width)
|
||||||
|
|
Loading…
Reference in New Issue