Clock cycles

Feb 24, 2017 6 Replies

Hi all:



I have been stuck on this problem for a while - can someone help me figure this out? For the following instruction, the instruction set manual says it should take 5 clock cycles, whereas according to my measurements using an oscilloscope, I should get 4 clock cycles. What could be the reason for the difference? I am using TelosB.


add #1, -4(r4)


--------------------------------------- Posted through

formatting link



You don't say what processor.

If it's pipelined, it's going to be hard to assign a one-and-only number of clock cycles, because the number taken will depend on _everything_.

Tim Wescott Wescott Design Services http://www.wescottdesign.com I'm looking for work -- see my website!

How are you measuring its execution time?

Have you tried: add #9, -4(r4) and: add #1, -12(r4)

The TelosB data sheet says that the processor is a MSP430 8 MHz.

-TV

Op Fri, 24 Feb 2017 14:52:51 +0100 schreef arshadnatasha :

Have you measured other instructions, like NOP?

(Remove the obvious prefix to reply privately.) Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/

This exercise totally baffles me. How can you precisely and directly measure a single instruction execution time? There are numerous ways to indirectly measure it and calculate a probable mean.

JJS

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required