Quote:
Originally Posted by euhlmann
Looking at some old logs still on my computer from build season, it looks like 50-70% is "reasonable". The Rio is not all that powerful...
|
That made me laugh. Back when I was a student, we were excited about a 10 MHz Microchip processor that you could program in C (instead of Basic), and it was pretty fast. Now I'm dating myself...
The roboRIO is actually very fast. It is a dual core A15 clocked about 1 ghz with a FPGA attached to it and 256 MB of ram. That's a serious amount of CPU power. An A15 is also an out of order processor, and (if I'm reading right), triple issue, and has vectorized floating point math. That means that it can execute 3 instructions in parallel per core, and will re-order instructions to be more efficient. It's not quite as fast as a brand new cell-phone processor, but it's actually pretty close.
The challenge, as Thad aptly put it, is that it takes about 50% of the CPU to interact with the services running on the roboRIO to talk to the field and the CAN bus. That's before you write a line of code. There are also certain calls which use a bunch of CPU. Setting solenoids is one of them. Reading joystick values/DS values is another. If you are worried about CPU usage, you want to minimize those calls. You can benchmark the various calls to see how much CPU they use.
We run our roboRIO at about 80-90% CPU. About 50% of the CPU is taken up by code outside our control.