seL4/Genode on zynq7000; TTC Timer Component
stefan.kalkowski at genode-labs.com
Tue Oct 29 10:58:51 CET 2019
On Mon, Oct 28, 2019 at 06:05:19PM +0100, Alexander Weidinger wrote:
> Hello Genodians,
> we adapted the zynq7000 target to run with Genode/seL4, which was
> done accordingly to the imx6 and imx7 targets already existing in Genode.
> Since we are in need for a timer component and the seL4 doesn't provide
> a "l4_ipc_sleep()" call, like it is used for the generic timer component
> in Fiasco.OC, we started implementing a timer[1,2] based on the TTC of
> the Zynq7000. By now we have it up and running but with a high
> deviation the longer it runs (already 30 seconds deviation after only 2
> This deviation originates from a few problems we have:
> - The timers in TTC only provide a 16 Bit width -> high number of IRQs
> when trying to achieve high precision
> - The input clock is 133MHz and can only be prescaled by a division of
> 2^(n+1) with 0 < n <= 16 -> hard to work with?
As far as I understood the manual correctly, there are three different
reference clocks you can choose from.
> Currently we implement it similar to the imx6 timer, by generating IRQs
> when a match in the MATCH0 register is acknowledged.
> I'm not very experienced in this topic and any help is appreciated on
> how to resolve the deviation issues or how to implement it in a better
> way - e.g. by using a different hardware timer which I didn't discover
> in the TRM.
> Additionally I'd like to know if there is an easy way to configure the
> maximum RAM of a platform in seL4/Genode apart from limiting it in
You hard-coded TICKS_PER_MS to "519", according to your comment in 
Line 88 the prescale value N calculates to: count/2^(N+1)
But you set the prescale value to "8". That means count/2^(8+1) =
count/512. And 519 * 512 * 1000 ~= 266 MHz, isn't it?
I strongly assume you are working with wrong assumptions regarding
your clocking values.
> Best regards,
> PS: As Zynq7000 platform we use the Digilent Zybo.
> Genode users mailing list
> users at lists.genode.org
https://github.com.skalk | https://genode.org
More information about the users