OSDN Git Service
(root)
/
trx-305dsp
/
dsp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
動作検証済み。DSPの負荷率を%で表示できるようになった。出力はsyslog()
[trx-305dsp/dsp.git]
/
trx305
/
kernel
/
config
/
blackfin
/
cpu_support.S
diff --git
a/trx305/kernel/config/blackfin/cpu_support.S
b/trx305/kernel/config/blackfin/cpu_support.S
index
d95e287
..
b4f0e07
100644
(file)
--- a/
trx305/kernel/config/blackfin/cpu_support.S
+++ b/
trx305/kernel/config/blackfin/cpu_support.S
@@
-84,6
+84,7
@@
#endif
.global _dispatch;
#endif
.global _dispatch;
+.global _idle_cycle;
.global _exit_and_dispatch;
.extern ldf_stack_end;
.extern _reqflg;
.global _exit_and_dispatch;
.extern ldf_stack_end;
.extern _reqflg;
@@
-630,9
+631,16
@@
ivg13Entry.end:
ivg14Entry: // dispatch()の割り込み待ち部
// USE_HW_ERRORは互換性の為だけに残してある。
#if !defined(USE_TIC_CORE) && !defined(USE_HW_ERROR) && !defined(QUICK_HW_ERROR)
ivg14Entry: // dispatch()の割り込み待ち部
// USE_HW_ERRORは互換性の為だけに残してある。
#if !defined(USE_TIC_CORE) && !defined(USE_HW_ERROR) && !defined(QUICK_HW_ERROR)
+ LOADLABEL( p5, _idle_cycle );
+ r0 = cycles; // idle命令前のクロックを取得
csync; // コアタイマーでティックを刻むときにはidle命令を使えない。
idle; // イベント待ち
csync;
csync; // コアタイマーでティックを刻むときにはidle命令を使えない。
idle; // イベント待ち
csync;
+ r1 = cycles; // idle命令後のクロックを取得
+ r1 = r1 - r0; // idle命令滞在時間を算出
+ r0 = [p5]; // 累積idle_cycle値を読み出す
+ r0 = r0 + r1;
+ [p5] = r0; // 累積idle_cycle値を保存
#endif
[--sp] = reti; // 割込みネスト許可
r1 = 0xffff(z); // CPU アンロック用パターン
#endif
[--sp] = reti; // 割込みネスト許可
r1 = 0xffff(z); // CPU アンロック用パターン