From a41009f92abad1985bb681068ce910ef3a16ef5e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 3 Dec 2014 18:16:18 +0800 Subject: [PATCH] coredevice/comm_dummy: support clock-switching functions --- artiq/coredevice/comm_dummy.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/artiq/coredevice/comm_dummy.py b/artiq/coredevice/comm_dummy.py index 383eb694a..e6933f086 100644 --- a/artiq/coredevice/comm_dummy.py +++ b/artiq/coredevice/comm_dummy.py @@ -1,13 +1,13 @@ from operator import itemgetter -from fractions import Fraction +from artiq.language.units import ms, ns from artiq.coredevice.runtime import LinkInterface class _RuntimeEnvironment(LinkInterface): def __init__(self, ref_period): - self.ref_period = ref_period - self.initial_time = 0 + self.internal_ref_period = ref_period + self.warmup_time = 1*ms def emit_object(self): return str(self.llvm_module) @@ -15,7 +15,10 @@ class _RuntimeEnvironment(LinkInterface): class Comm: def get_runtime_env(self): - return _RuntimeEnvironment(Fraction(1, 1000000000)) + return _RuntimeEnvironment(1*ns) + + def switch_clock(self, external): + pass def load(self, kcode): print("================")