1 |
Jack Poulson wrote: |
2 |
> Unluckily, state-space calculations are usually chalk-full of all those |
3 |
> guys. |
4 |
> |
5 |
> Thankfully, C is my language of choice, and I'd be more than happy with |
6 |
> any references at all. |
7 |
> |
8 |
> On 7/14/07, M. Edward (Ed) Borasky <znmeb@×××××××.net> wrote: |
9 |
>> |
10 |
>> Jack Poulson wrote: |
11 |
>> > There flight tests proved the current system inefficient for all of the |
12 |
>> > planned computation and communication with the groundserver. They |
13 |
>> > claimed to be using a 416 Mhz xscale, which seems fairly beefy to me, |
14 |
>> > and I was under the impression that ramming floating point instructions |
15 |
>> > through a fixed-point register was grossly inefficient. |
16 |
>> > |
17 |
>> > However, I am very new to embedded systems, and your question |
18 |
>> > makes me think that the control algorithm itself is the culprit. |
19 |
>> |
20 |
>> In all likelihood you are emulating IEEE floating point in software, |
21 |
>> most likely because fixed point algorithms aren't all that well known |
22 |
>> outside of old fogeys like myself and people with a lust for squeezing |
23 |
>> the ultimate out of embedded hardware. |
24 |
>> |
25 |
>> If you're lucky, it's only 32-bit arithmetic. If you're *real* lucky, |
26 |
>> there are no logs, exponentials or trig functions in the code. If you're |
27 |
>> really really lucky, there aren't even any divides or square roots. :) |
28 |
>> |
29 |
>> By the way, it's been so long since I did any of this stuff that I don't |
30 |
>> know where one can find *current* references on the subject. But if |
31 |
>> you're willing to get your hands dirty in C and/or Forth code, there are |
32 |
>> some rewards waiting for you. You'd be amazed how much interesting stuff |
33 |
>> you can do with table lookup. |
34 |
>> -- |
35 |
>> gentoo-embedded@g.o mailing list |
36 |
>> |
37 |
>> |
38 |
> |
39 |
The general rule is, "if the hardware ALU can't do it, use table lookup." :) |
40 |
|
41 |
Another general rule is "16-bit arithmetic is your friend" |
42 |
|
43 |
But just getting rid of floating point emulation might be all you need |
44 |
at 416 MHz. |
45 |
-- |
46 |
gentoo-embedded@g.o mailing list |