Clock cycles

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

Reply to
arshadnatasha
Loading thread data ...

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 
 Click to see the full signature
Reply to
Tim Wescott

How are you measuring its execution time?

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

Reply to
Don Y

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

--

-TV
Reply to
Tauno Voipio

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/
Reply to
Boudewijn Dijkstra

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

Reply to
John Speth

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.