CPU cycles vs. Clock cycles
‎09-19-2006
08:53 AM
2,275 Views

spa
Contributor I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I am using code warrior development environment for HC08. When debugging the applications by means of the full chip simulator I can get a feeling of the execution time by reading the amount of "CPU cycles" needed (in the register window).
By the way, are the "CPU cycles" corresponding to the number of clocks required to run the application or shall I multiply the CPU cycles by a certain factor to get the number of CLOCK CYCLES?
If so, which is this factor for HC08, S08, RS08?
Thank you very much...
Spa
2 Replies
‎09-21-2006
05:39 PM
941 Views

jah
Contributor I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
for example with a 8mhz clock on a mc9s08rd32dwe part:
one NOP gives about ~3.04microsec delay
one NOP gives about ~3.04microsec delay
Message Edited by jah on 2006-09-21 12:41 PM
‎09-20-2006
07:58 PM
941 Views

alex_spotw
Contributor III
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
The HCS08 architecture does not have a fix ratio between number of clock cycles and CPU cycles. It depends of the instruction being executed: some instructions take 2,3, up to 7 clock cycles to execute.
IF you check the CPU Manual, it gives a list of all assembly instructions with their resepctive number of clock cycles to execute.
Regards,
Alex
The HCS08 architecture does not have a fix ratio between number of clock cycles and CPU cycles. It depends of the instruction being executed: some instructions take 2,3, up to 7 clock cycles to execute.
IF you check the CPU Manual, it gives a list of all assembly instructions with their resepctive number of clock cycles to execute.
Regards,
Alex
