forked from M-Labs/artiq
1
0
Fork 0

coredevice/comm_dummy: support clock-switching functions

This commit is contained in:
Sebastien Bourdeauducq 2014-12-03 18:16:18 +08:00
parent 5b8f34bae2
commit a41009f92a
1 changed files with 7 additions and 4 deletions

View File

@ -1,13 +1,13 @@
from operator import itemgetter from operator import itemgetter
from fractions import Fraction
from artiq.language.units import ms, ns
from artiq.coredevice.runtime import LinkInterface from artiq.coredevice.runtime import LinkInterface
class _RuntimeEnvironment(LinkInterface): class _RuntimeEnvironment(LinkInterface):
def __init__(self, ref_period): def __init__(self, ref_period):
self.ref_period = ref_period self.internal_ref_period = ref_period
self.initial_time = 0 self.warmup_time = 1*ms
def emit_object(self): def emit_object(self):
return str(self.llvm_module) return str(self.llvm_module)
@ -15,7 +15,10 @@ class _RuntimeEnvironment(LinkInterface):
class Comm: class Comm:
def get_runtime_env(self): def get_runtime_env(self):
return _RuntimeEnvironment(Fraction(1, 1000000000)) return _RuntimeEnvironment(1*ns)
def switch_clock(self, external):
pass
def load(self, kcode): def load(self, kcode):
print("================") print("================")