Commit 07bc589c authored by Jędrzej Boczar's avatar Jędrzej Boczar

fix/Vivado: don't instantiate wishbone.Converter in add_adapter when not needed

Fixes an issue with Vivado which crashes with SIGSEGV when building litex-buildenv at:
and litex bumped to 4a18b828,
with options:
    CPU=mor1kx; CPU_VARIANT=linux; PLATFORM=arty; FIRMWARE=linux; TARGET=net
The only difference in Verilog is that we avoid creating new Interface and doing
`new_interface.connect(interface)`, so this shouldn't make any difference, but
this somehow generates the error in Vivado (tested on v2018.3 and v2019.2).
parent 4a18b828
......@@ -282,12 +282,15 @@ class SoCBusHandler(Module):
assert direction in ["m2s", "s2m"]
if isinstance(interface, wishbone.Interface):
if interface.data_width != self.data_width:
new_interface = wishbone.Interface(data_width=self.data_width)
if direction == "m2s":
converter = wishbone.Converter(master=interface, slave=new_interface)
if direction == "s2m":
converter = wishbone.Converter(master=new_interface, slave=interface)
self.submodules += converter
new_interface = interface
elif isinstance(interface, axi.AXILiteInterface):
# Data width conversion
intermediate = axi.AXILiteInterface(data_width=self.data_width)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment