EmbeddedRelated.com
Forums
Memfault Beyond the Launch

processor clock cycle per instructions

Started by faz December 4, 2007
faz wrote:
> > Can u pls suggest the method or formula to calculate number of > processor clock cycles for each instructions ?It will be greatful to > knew this as i have referred the Intel data sheets which includes.I am > eager to knew how they r calculating it.
I can. But u hasn't posted here for years. Read the chip specification. Study the spelling. Put blanks after punctuation. Look up the proper spelling for 'pls', 'r'. Learn not to confuse posts for no reason. -- Chuck F (cbfalconer at maineline dot net) <http://cbfalconer.home.att.net> Try the download section. -- Posted via a free Usenet account from http://www.teranews.com
On Tue, 04 Dec 2007 00:07:27 -0800, faz wrote:

> On Dec 4, 12:39 pm, Christof Klaiber <christof.klai...@merath- > maschinen.de> wrote: >> Am Mon, 03 Dec 2007 21:18:36 -0800 schrieb faz: >> >> > Can u pls suggest the method or formula to calculate number of >> > processor clock cycles for each instructions ?It will be greatful to >> > knew this as i have referred the Intel data sheets which includes.I >> > am eager to knew how they r calculating it. >> >> They don't calculate it, they design the cpu accordingly. >> >> /Christof > > Suppose if i have the CPU design then to verify clock cycles per > instructions...I have to run the instruction am i right??I am thinking > of some short cut method without running each instruction since it is my > design i knew all the parameters...Is there any method available??
On the one hand, the operations a CPU needs to undertake to execute an instruction are built in pretty early in the CPU design; this isn't some superficial thing like paint color. On the other hand, while in a non-pipelined CPU an instruction's execution time would be fixed by the operations, in pipelined CPUs a particular instruction's total time is not only longer than it's average cycle time, but both the total time and the 'average' cycle time are heavily dependent on the instructions that are executed before and after the instruction in question. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
faz wrote:

> Hai all, > > Can u pls suggest the method or formula to calculate number of > processor clock cycles for each instructions ?It will be greatful to > knew this as i have referred the Intel data sheets which includes.I am > eager to knew how they r calculating it.
I have seen processors that figure from several instructions per cycle down to several cycles per instruction. The information is all in the data manual for the processor concerned. If you need to be accurate you have no short-cut to counting each type of instruction, multiplying by the cycles each takes and totallising for all instruction types. If you just want an approximate average then look at the mix of instructions you use and how long they take. Whilst not a very precise method it will get you a feel for the ballpark. -- ******************************************************************** Paul E. Bennett...............<email://Paul_E.Bennett@topmail.co.uk> Forth based HIDECS Consultancy Mob: +44 (0)7811-639972 Tel: +44 (0)1235-811095 Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************
faz wrote:

> On Dec 4, 12:39 pm, Christof Klaiber <christof.klai...@merath- > maschinen.de> wrote: > >>Am Mon, 03 Dec 2007 21:18:36 -0800 schrieb faz: >> >> >>>Can u pls suggest the method or formula to calculate number of >>>processor clock cycles for each instructions ?It will be greatful to >>>knew this as i have referred the Intel data sheets which includes.I am >>>eager to knew how they r calculating it. >> >>They don't calculate it, they design the cpu accordingly. >> >>/Christof > > > Suppose if i have the CPU deisgn then to verify clock cycles per > instructions...I have to run the instruction am i right??I am thinking > of some short cut method without running each instruction since it is > my design i knew all the parameters...Is there any method available??
What are you actually trying to do ? If it is your design, then the short-cut is to simply look at your design notes, and it will, of course, be clearly detailed there :) Of course, if you designed a CPU, you WILL need to run each instruction, in order to confirm it DOES work as you hoped. I'm curious: How can you design a CPU, and NOT know the cycles per instruction ? =jg

Memfault Beyond the Launch