I was going through the selection criteria of CPU (MCU/MPU/FPGA) and observed that core frequency is one important parameter while selecting a CPU. But I was unable to get information regarding, how to estimate the core frequency of a CPU for one application. Can someone explain how to determine the core frequency of a CPU?

  • 1
    \$\begingroup\$ As for any parameter for a future system, you use a mixture of experience (guesstimates), experiments, and calculations. Other than that your question is much too broad to answer (= one could easily write a book about it). \$\endgroup\$ – Wouter van Ooijen Mar 1 '15 at 20:24

The required clock speed/efficiency (calculations per second) of your processor is based on the complexity and efficiency of your program. A simple but poorly programmed application could need a super computer compared to how another programmer can do it! The complexity, and things that need to be done are the main factor to dictate how fast it needs to be.

Datasheets often quote how many MIPS they can do, "Million Instructions Per Second" which can help you work out how powerful it is, and if it will do what you want. You application may need 400,000 instructions to be completed in only 10 milliseconds, and repeated at 100Hz. You would need at least 40 MIPS (400k * 100hz) at a particular clock rate to achieve this without delay/lag/lost cycles.

Microprocessors have different architectures, and clock speed isn't always directly equal to how many instructions it can pump out. Each architecture may use a single clock cycle very differently, some can even do "two" instructions per clock cycle, by looking ahead and pipe-lining the next instruction/s or executing concurrent instructions on different cores. There may be some really slow ones which can take more than 1 clock cycle to do something, but it may be a really good MCU in other ways.

You cannot properly specify how fast you need to go, without actually knowing what your application is going to be. You can also find out what compiler to use, and compile a test program that may represent your final application, and then use a dis-assembler program to look at the compiled assembly code and count the cycles used for various instructions in your critical application areas. Instructions and their cycle-count are usually shown in the datasheet.

Once you know in general how many clock cycles it SHOULD take (without interrupts or anything nasty jumping in) in your critical application sections, you then have a "minimum" requirement. I suggest you double or triple that just in case, and select a microprocessor which gives you a bit of head room and margin for error.

Other people just go with "what they know" in terms of "this one worked last time" but that's more gut instinct than engineering ;). Also the "that looks like a good one" is common.


Not the answer you're looking for? Browse other questions tagged or ask your own question.