From 7a90f4f4eccbfb0ec3d81a1f19f351b19e6dab36 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 18 Aug 2014 23:46:58 +0800 Subject: [PATCH] runtime: start RTIO counter at first rtio_set --- artiq/devices/runtime.py | 2 +- soc/runtime/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/devices/runtime.py b/artiq/devices/runtime.py index eb043be08..8bc4b3ce8 100644 --- a/artiq/devices/runtime.py +++ b/artiq/devices/runtime.py @@ -65,7 +65,7 @@ class LinkInterface: class Environment(LinkInterface): def __init__(self, ref_period): self.ref_period = ref_period - self.initial_time = 8000 + self.initial_time = 2000 def emit_object(self): tm = lt.TargetMachine.new(triple="or1k", cpu="generic") diff --git a/soc/runtime/main.c b/soc/runtime/main.c index 01d9a59ac..cf907c132 100644 --- a/soc/runtime/main.c +++ b/soc/runtime/main.c @@ -142,6 +142,7 @@ static void gpio_set(int channel, int value) static void rtio_set(long long int timestamp, int channel, int value) { + rtio_reset_write(0); rtio_chan_sel_write(channel); rtio_o_timestamp_write(timestamp); rtio_o_value_write(value); @@ -224,7 +225,6 @@ int main(void) if(load_elf(syscalls, kbuf, length, kcode, sizeof(kcode))) { flush_cpu_icache(); dds_init(); - rtio_reset_write(0); k(); rtio_reset_write(1); send_sync();