On Feb 1, 2020, at 5:38 PM, 'Patrick Mooney' via Tock Embedded OS Development Discussion <tock...@googlegroups.com> wrote:1. By counting overflows, the 24-bit SysTick timer could be extended
"manually" to 32-bits. The 64-bit machine timer would simply ignore
the upper word. (Simplifying time.now() readings in the process)
2. For alarms scheduled long in the future, the HIL could calculate the
number of overflows which must take place before looking for a match.
In the case of the machine timer, lacking an overflow interrupt, the
otherwise unused high word of the timer/comparator would suffice.
3. When scheduling "short" timers, the greater-than-equals behavior of
the machine timer would catch otherwise "missed" firings. For
strict-equals timers, an explicit comparison with now() could serve
as adequate emulation.
--
You received this message because you are subscribed to the Google Groups "Tock Embedded OS Development Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tock-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tock-dev/CAAErXu8FWjNqDHqPCxMXCjk94nRq6%3D40v7jBiwcH6y%3DdG10PNg%40mail.gmail.com.
On Feb 3, 2020, at 7:53 AM, Patrick Mooney <pat...@oxidecomputer.com> wrote:I think what you’re saying is that if the current counter value (both
in 32 and 64 bit) is 0xf0000000 and software requests a (32-bit) alarm
of 0x000000010, then
- on a (CortexM) 32-bit counter platform the compare will be set to
0x00000010, but
- on a (RISC-V) 64-bit counter platform the compare will be set to
0x100000010 (the high register is 0x1 and the low register is
0x00000010).
My inclination with the RISC-V machine timer would be to to use the
upper word of timercmp only to detect overflow (using a timercmp value
of 0x100000000).
Splitting up the interfaces definitely seems like the right approach.
If the lower (Alarm) interface has overflow disambiguation (perhaps
implicitly scheduling from now() + value), then it should cover both the
existing uC timers and machine timer.
--
You received this message because you are subscribed to the Google Groups "Tock Embedded OS Development Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tock-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tock-dev/CAAErXu-F803sW18m0YjixqJj7Tsc4Zhqqpnrvij4EPERK7WEUg%40mail.gmail.com.
On Mon, 10 Feb 2020 at 12:41, Philip Levis <p...@cs.stanford.edu> wrote:The fact that the Alarm and Timer traits take a width parameter and
frequency type means that we can separate out 1 from 2 and 3.
Considering that those width parameters are effectively discarded by the
higher-level abstractions (muxes) placed on top of Alarm implementations
today, I'm not sure that applies.
--
You received this message because you are subscribed to the Google Groups "Tock Embedded OS Development Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tock-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tock-dev/CAAErXu-2S68CHYneq-8O1P3sHsdMiYPpUSw8TBAu5hS8xSuCEQ%40mail.gmail.com.
On Feb 17, 2020, at 12:52 PM, Patrick Mooney <pat...@oxidecomputer.com> wrote:Let's consider the "worst-case" scenario where we also extend syscalls
to return 64 bits (e.g. instead of returning in register 0 only, use
an extra register for the most significant bits).
Considering the discussion about separating syscall errors from the
results, this would mean 3-word return value, which itself departs from
most ABI conventions (where the result is typically specified as up to
two registers).
Following up that this is a good plan.
--
You received this message because you are subscribed to the Google Groups "Tock Embedded OS Development Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tock-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tock-dev/1385739A-E451-413C-9B9F-AE88C0EAEA3A%40cs.stanford.edu.