forked from M-Labs/artiq
wrpll: fix mulshift
This commit is contained in:
parent
90017da484
commit
3f076bf79b
|
@ -552,7 +552,8 @@ class ProcessorImpl(Module):
|
||||||
if pd.multiplier_shifts:
|
if pd.multiplier_shifts:
|
||||||
if len(pd.multiplier_shifts) != 1:
|
if len(pd.multiplier_shifts) != 1:
|
||||||
raise NotImplementedError
|
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)
|
pd.data_width, pd.multiplier_stages)
|
||||||
else:
|
else:
|
||||||
multiplier = NopUnit(pd.data_width)
|
multiplier = NopUnit(pd.data_width)
|
||||||
|
|
Loading…
Reference in New Issue