mirror of https://github.com/m-labs/artiq.git
fir: force dsp48
This commit is contained in:
parent
8381db279f
commit
641d109786
|
@ -65,6 +65,7 @@ class FIR(Module):
|
||||||
if c == 0 or c in coefficients[i + 1:]:
|
if c == 0 or c in coefficients[i + 1:]:
|
||||||
continue
|
continue
|
||||||
m = Signal((width + shift, True))
|
m = Signal((width + shift, True))
|
||||||
|
m.attr.add("use_multiplier")
|
||||||
self.sync += m.eq(c*reduce(add, [
|
self.sync += m.eq(c*reduce(add, [
|
||||||
xj for xj, cj in zip(x[::-1], coefficients) if cj == c
|
xj for xj, cj in zip(x[::-1], coefficients) if cj == c
|
||||||
]))
|
]))
|
||||||
|
@ -108,6 +109,7 @@ class ParallelFIR(Module):
|
||||||
if c == 0 or c in coefficients[i + 1:]:
|
if c == 0 or c in coefficients[i + 1:]:
|
||||||
continue
|
continue
|
||||||
m = Signal((width + shift, True))
|
m = Signal((width + shift, True))
|
||||||
|
m.attr.add("use_multiplier")
|
||||||
self.sync += m.eq(c*reduce(add, [
|
self.sync += m.eq(c*reduce(add, [
|
||||||
xj for xj, cj in zip(x[-1 - j::-1], coefficients) if cj == c
|
xj for xj, cj in zip(x[-1 - j::-1], coefficients) if cj == c
|
||||||
]))
|
]))
|
||||||
|
|
|
@ -169,6 +169,9 @@ class Phaser(MiniSoC, AMPSoC):
|
||||||
ident=artiq_version,
|
ident=artiq_version,
|
||||||
**kwargs)
|
**kwargs)
|
||||||
AMPSoC.__init__(self)
|
AMPSoC.__init__(self)
|
||||||
|
self.platform.toolchain.attr_translate["use_multiplier"] = \
|
||||||
|
("use_dsp48", "yes")
|
||||||
|
|
||||||
self.platform.toolchain.bitstream_commands.extend([
|
self.platform.toolchain.bitstream_commands.extend([
|
||||||
"set_property BITSTREAM.GENERAL.COMPRESS True [current_design]",
|
"set_property BITSTREAM.GENERAL.COMPRESS True [current_design]",
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue