From 88a9e8affffe41add884bca5dba28ff4f37c9e88 Mon Sep 17 00:00:00 2001 From: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> Date: Mon, 12 Sep 2016 15:28:43 +0200 Subject: [PATCH] patmos: synchronous clock --- arch/patmos/CMakeLists.txt | 4 +++- arch/patmos/irq.cc | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/patmos/CMakeLists.txt b/arch/patmos/CMakeLists.txt index c9f4b7d..8a81981 100644 --- a/arch/patmos/CMakeLists.txt +++ b/arch/patmos/CMakeLists.txt @@ -1,4 +1,6 @@ -SET(PASIM_FREQ 10 CACHE INTERNAL STRING) +# -1: synchroneous interrupts with executed instructions + +SET(PASIM_FREQ -1 CACHE INTERNAL STRING) set(SRCS crt0.c diff --git a/arch/patmos/irq.cc b/arch/patmos/irq.cc index 7fa00cf..4385b8a 100644 --- a/arch/patmos/irq.cc +++ b/arch/patmos/irq.cc @@ -46,8 +46,7 @@ void IRQ::set_timer_interval(int ms) { uint64_t time_cur = (((uint64_t)u) << 32) | l; // Time til next interrupt - const int TIMER_FREQUENCY = 1000; - uint64_t time_inter = (ms * 1000000U) / TIMER_FREQUENCY; + uint64_t time_inter = 100000; uint64_t time_new = time_cur + time_inter; -- GitLab