2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-18 16:06:30 +08:00

wrpll: fix mulshift

This commit is contained in:
Sebastien Bourdeauducq 2020-10-16 22:05:20 +08:00
parent 90017da484
commit 3f076bf79b

View File

@ -552,7 +552,8 @@ class ProcessorImpl(Module):
if pd.multiplier_shifts:
if len(pd.multiplier_shifts) != 1:
raise NotImplementedError
multiplier = OpUnit(lambda a, b: a * b >> pd.multiplier_shifts[0],
# work around Migen's mishandling of Verilog's cretinous operator width rules
multiplier = OpUnit(lambda a, b: Cat(a, C(0, pd.data_width)) * Cat(b, C(0, pd.data_width)) >> pd.multiplier_shifts[0],
pd.data_width, pd.multiplier_stages)
else:
multiplier = NopUnit(pd.data_width)