From 01057dfb6dae4a5b724b352be66a0d39082a1fd3 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Wed, 30 Nov 2016 11:21:25 +0100 Subject: [PATCH] test/sawg: check 48 bit frequency --- artiq/test/gateware/test_sawg_fe.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/artiq/test/gateware/test_sawg_fe.py b/artiq/test/gateware/test_sawg_fe.py index d18e1876d..2cb41eb04 100644 --- a/artiq/test/gateware/test_sawg_fe.py +++ b/artiq/test/gateware/test_sawg_fe.py @@ -1,6 +1,7 @@ import unittest import migen as mg +from numpy import int32 from artiq.coredevice import sawg from artiq.language import (at_mu, now_mu, delay_mu, delay, @@ -54,17 +55,20 @@ class SAWGTest(unittest.TestCase): d.offset.set(.9) delay_mu(2) d.frequency0.set64(.1) + d.frequency1.set64(.1) delay_mu(2) d.offset.set(0) + v = int(round((1 << 48) * .1)) self.assertEqual( self.rtio_manager.outputs, [ - (0, 1, 0, int(round( + (0., 1, 0, int(round( (1 << self.driver.offset.width - 1)*.9))), - (2, 8, 0, [int(round( + (2., 8, 0, [int(round( (1 << self.driver.frequency0.width) / self.channel.parallelism*.1)), 0]), - (4, 1, 0, 0), + (2., 3, 0, [int32(v), int32(v >> 32)]), + (4., 1, 0, 0), ]) def run_channel(self, events):