Determining Computational Requirements

Thread Starter

Management

Joined Sep 18, 2007
306
What is the most effective means to determining computational requirements for a given hardware/application, e.g. 400MHz, 1GHz, 2.5GHz, etc?

Any general rule of thumbs when analyzing hardware and looking at ones application? Thanks!
 

sirch2

Joined Jan 21, 2013
1,026
Depends a lot on the application and the specific processor. E.g. does your application do a lot of floating point operations and does the processor have a floating point unit.
 
It depends how much processing is to be done and how fast it needs to be.
I have done loads of projects using 4MHz PIC microcontrollers and its amazing how much you can get them to do.
 

John P

Joined Oct 14, 2008
1,808
As Turing proved--before there really was such a thing as a computer--any processor can compute any algorithm, given enough memory. But how fast do you want it done?

You could run the program on your choice of processor (assuming you can cram it in there) and see how long it takes, and decide if that's satisfactory. Actually that's a good initial test: can you compile the program so it fits in the processor's memory? If not, stepping up to a more powerful processor is pretty much compulsory.
 

Potato Pudding

Joined Jun 11, 2010
688
Strictly speaking this is why a CompSci/Engineer student would need to learn combinatorial mathematics. If you think you have never heard of it before you are probably wrong. Multiplication is the simplest form of combinatorics and I expect you have heard of that. But then you get into variable or angular terms. So X*X and X*Y are square and rectangular data structures. X*X*X is cubic. What is the dimensional formula for a triangular or pyramidal data structure? A globe? You learn about permutations and combinations. You do a whole lot of factorial math!

Classically you learn by talking about how cards work. So dealing 5 cards from a 52 card deck you have 52*51*50*49*48 but that includes many different irrelevant orders in which possible hands could be dealt so divide by 5*4*3*2*1 to eliminate the variations of which card is dealt first second etc.

You will learn that many combinations of similar types can be solved with the formula, C(S,R) = S!/(R!*(S-R)!) Where Combinations C for Set of Size S with Rendered subset R, are described in the formula.

What you are asking is how would you count many computations are needed to perform different tasks. A typical example is sorting data. Then you want to fit that into a time window and determine what the processing power requirements are.

That probably doesn't clear anything up.
 

Thread Starter

Management

Joined Sep 18, 2007
306
If you can list tasks that have to be done, what are their characteristics: is it periodic tasks or event driven tasks? what is the algorithmic work the tasks have to do?
And if also you know what are the timing constraints you have to respect you can choose a scheduling algorithm like the rate monotonic one and calculate the computational power your application need.
So lets use a process that will run on a single CPU.

A set of methods will need to be run in a particular order and every 100ms. Before they run, data is taken from a data registry and after they run data is written to a data registry. So it appears this would only require a 10-20Hz CPU, correct? Can't be that simple.

So based on what you say (and others), it will depend on following (1) how efficient are the algorithms (2) how many methods/algorithms (3) what type of math is being performed.

At a high level, it appears that one would have to develop these methods/algorithms on a faster PC and then baseline the needed computation. Is there guidance on how the Math dictates the computation power needed?

Please feel free to poke through the above or ask questions. Appreciate the help.
 

THE_RB

Joined Feb 11, 2008
5,438
If you just need to do some processing every 100mS (10 times a second) and load and store some data with a data table etc that sounds like a very simple application.

A cheap 10 MHz PIC 18 using the HSPLL setting can do 10 million instructions per second, so that is a million instructions per 100mS "event".

So now it comes down to;
1. how much data do you need to load/store for each event?
2. how much processing do you need to do for each event?
 
Top