CPU cycles

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
2,567件の閲覧回数
spa
Contributor I
Hello all,
I am using code warrior development environment for HC08 and HC12. When debugging the applications by means of the full chip simulator I can rget 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 are these factors for HC08, HCS08, HC12, HCS12?
Thank you very much...
Spa
ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
732件の閲覧回数
CrasyCat
Specialist III
Hello
 
For HC12, HCS12 you can use the full chip simulator to get an idea of the execution time for a function or a portion of a function.
I would do it as follows:
  - Set a breakpoint at the beginning of the function.
  - run to that function
  - In the status bar (on the bottom of HI-WAVE window, double click on the cycle count. This will
    set the cycle count in the status bar to 0.
  - Point to the end of the function (or end of sequence you want to measure), click with right mouse button
    and select "Run to Cursor"
  - When application is stopped, you see the number of cycle needed to reach that instruction in the
    status bar.
Number of cycle there are number of CPU Cycles.
 
Note that for HC08 you cannot use the status bar:smileysad:.
You have to enable trace in the Trace component to get cycle counts.
 
CrasyCat

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
733件の閲覧回数
CrasyCat
Specialist III
Hello
 
For HC12, HCS12 you can use the full chip simulator to get an idea of the execution time for a function or a portion of a function.
I would do it as follows:
  - Set a breakpoint at the beginning of the function.
  - run to that function
  - In the status bar (on the bottom of HI-WAVE window, double click on the cycle count. This will
    set the cycle count in the status bar to 0.
  - Point to the end of the function (or end of sequence you want to measure), click with right mouse button
    and select "Run to Cursor"
  - When application is stopped, you see the number of cycle needed to reach that instruction in the
    status bar.
Number of cycle there are number of CPU Cycles.
 
Note that for HC08 you cannot use the status bar:smileysad:.
You have to enable trace in the Trace component to get cycle counts.
 
CrasyCat
0 件の賞賛
732件の閲覧回数
spa
Contributor I
Hello,
thanks for your feedback! Do you also know how many clock cycles correspond to 1 CPU cycle for HC08, S08, RS08, HC12, HCS12?
Many thanks
Spa
0 件の賞賛
732件の閲覧回数
CrasyCat
Specialist III
Hello
 
What do you mean with clock cycle? Do you mean bus cycles, oscillator cycles?
In any case, the conversion between CPU cycles and bus or oscillator cycles depends on your configuration (oscillator frequency, PPL settings, ....).
 
CrasyCat
0 件の賞賛