mirror of https://github.com/m-labs/artiq.git
dds: use fast math for asf computations
This commit is contained in:
parent
36f8aa8d9e
commit
f571b3e1a1
|
@ -125,12 +125,12 @@ class _DDSGeneric:
|
||||||
word."""
|
word."""
|
||||||
return pow/2**self.pow_width
|
return pow/2**self.pow_width
|
||||||
|
|
||||||
@portable
|
@portable(flags=["fast-math"])
|
||||||
def amplitude_to_asf(self, amplitude):
|
def amplitude_to_asf(self, amplitude):
|
||||||
"""Returns amplitude scale factor corresponding to given amplitude."""
|
"""Returns amplitude scale factor corresponding to given amplitude."""
|
||||||
return round(amplitude*0x0fff)
|
return round(amplitude*0x0fff)
|
||||||
|
|
||||||
@portable
|
@portable(flags=["fast-math"])
|
||||||
def asf_to_amplitude(self, asf):
|
def asf_to_amplitude(self, asf):
|
||||||
"""Returns the amplitude corresponding to the given amplitude scale
|
"""Returns the amplitude corresponding to the given amplitude scale
|
||||||
factor."""
|
factor."""
|
||||||
|
|
Loading…
Reference in New Issue