forked from M-Labs/artiq
1
0
Fork 0

sawg: round to int64

This commit is contained in:
Robert Jördens 2016-12-02 14:33:26 +01:00
parent 3d4723353e
commit 87bd2072e8
1 changed files with 3 additions and 2 deletions

View File

@ -12,9 +12,10 @@ class Spline:
self.core = core_device self.core = core_device
self.channel = channel self.channel = channel
self.width = width self.width = width
self.scale = (1 << width) * scale self.scale = float((int64(1) << width) * scale)
self.time_width = time_width self.time_width = time_width
self.time_scale = (1 << time_width) * core_device.coarse_ref_period self.time_scale = float((1 << time_width) *
core_device.coarse_ref_period)
@portable(flags={"fast-math"}) @portable(flags={"fast-math"})
def to_mu(self, value: TFloat) -> TInt32: def to_mu(self, value: TFloat) -> TInt32: