Time spent in ticks...
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Oct 14 11:11:56 UTC 2016
----- Am 13. Okt 2016 um 18:21 schrieb Jakob Viketoft jakob.viketoft at aacmicrotec.com:
[...]
> Even though _Watchdog_Tick() "only" takes ~100 us now, it still sound much
> higher than your total tick with a slower system (we're running at 50 MHz).
>
> Is there anything we can do to improve these numbers? Is Clock_isr intended to
> be run uninterrupted as it is now? Can't see that much of the BSP patch code
> has anything to do with the speed of what I'm looking at right now...
It seems that the or1k has no support for add with carry? This makes basic 64-bit operations quite expensive. How fast are the shift instructions on your processor? Does it support 32-integer multiplication instructions?
On the soft-core Nios 2 processor you get for example (nios2-rtems4.12-gcc -O2 -mhw-mulx -mhw-mul -mhw-div):
uint64_t add(uint64_t a, uint64_t b)
{
return a + b;
}
uint64_t mul(uint64_t a, uint64_t b)
{
return a * b;
}
.size rs, .-rs
.align 2
.global add
.type add, @function
add:
add r2, r4, r6
cmpltu r4, r2, r4
add r3, r5, r7
add r3, r4, r3
ret
.size add, .-add
.align 2
.global mul
.type mul, @function
mul:
mul r5, r5, r6
mul r7, r7, r4
mulxuu r3, r4, r6
mul r2, r4, r6
add r5, r5, r7
add r3, r5, r3
ret
.size mul, .-mul
More information about the devel
mailing list