• 沒有找到結果。

5.  結果與討論

5.2.  耗能評估結果

本計畫提出之 mProfiler 所測得的耗能結果如表 1 和表 2 所示,其分別列出 ARM11 MPCore 處理器 (包含 4 顆 MP11 處理器核心) 與 PLL 的平均電壓、平均電流與總耗能 值,這三種數值的計算方式請參考章節 4.3 的說明。以平均電壓值而言,處理器和 PLL 都 約莫是 1.2 V,而平均電流的部份處理器是 470 mA 左右,而 PLL 的則是 190 mA 左右。

本計畫在實驗過程中,也有嘗試關閉部份 ARM11 MPCore 處理器中的核心,然而,

量測出來的耗能結果並不如預期,表 3 列出在系統閒置的情況下,變動處理器核心數量取 得之平均電壓值與平均電流值,從表中可以看出無論系統中目前有幾顆處理器核心在運作,

平均電壓都維持在 1.2 V 左右,而平均電流的部份,原本預期減少一顆核心運作能夠減少 大約四分之一左右的電流值 (即 110 mA 左右),但從表 3 中可以看出每關閉一顆核心實際 上只少了 (1 mA ~ 2 mA 左右),目前推估這個狀況發生的原因是因為本計畫採用的 ARM11 MPCore 發展板上並沒有 power controller 硬體元件可以將輸入單一處理器核心的 電源移除,會這麼認為是因為雖然 ARM 提供的文件[25] 中有提到每顆 MP11 處理器核 心都有四種功率模式 (power mode) (請參考圖 6 ),且每顆處理器核心都具有獨立的 voltage domain,但即使 mProfiler 依據文件[25] 設定 SCU CPU Status Register,都無法成 功把處理器核心從平常模式 (normal mode) 切換至斷電模式 (power-off mode) 或是休眠模 式 (dormant mode) 並降低應有的電流值,只能把處理器核心切換至 WFI (wait for interrupt) 模式,並降低如表 3 所示的電流幅度。由於無法關閉處理器核心的電源,因此我們目前無 法提供調整處理器核心數量並執行同一件工作所需耗電量的實驗結果。

表 1 處理器之平均電壓、平均電流與總耗能

Processor (4-Core)

Average Voltage (uV) Average Current (uA) Total Energy (uJ) 1233549.394 469692.606 191203.41

表 2 PLL 之平均電壓、平均電流與總耗能

PLL

Average Voltage (uV) Average Current (uA) Total Energy (uJ)

表 3 變動處理器核心數量取得之平均電壓值與平均電流值

The number of cores Average voltage (uV) Average current (uA)

4 1230193.100 440731.588

3 1230057.070 439127.044

2 1230116.850 437874.348

1 1229793.550 436677.284

圖 6 MP11 CPU power modes [25]

目前 mProfiler 所提供的總耗能值,都是藉由週期性地讀取系統平台上 ADC 提供的 電壓值、電流值計算而成,使用 ADC 來評估耗能和透過建立功率模型 (power model) 或 能量模型 (energy model) 來評估耗能的方式比起來,使用 ADC 的優點是 (1) 較為簡單,

因為不必知道硬體事件 (如: pipeline stall) 的耗電量,(2) 較接近硬體的實際耗電,因為是 對硬體做直接量測;但其缺點是 (1) 因為需藉由軟體週期性的累計耗電量,因此容易造成 系統上額外的效能和耗能負擔,(2) 也因為是由軟體累計耗電量,因此取樣頻率無法超過處 理器的運作頻率,使得系統中的每個事件無法被精準掌握,(3) 量測的目標會受到硬體限制,

如在 ARM11 MPCore 開發平台上的 ADC 僅提供量測一整個處理器 (包含 4 顆處理器 核心) 的耗電量,無法分開量測各個處理器核心,使得 mProfiler 無法進一步將系統的耗能 分別歸類給不同的執行緒或是不同的處理器核心。由於使用 ADC 評估耗電有上述缺點,

因此本計畫的第二年考慮透過建立功率模型 (power model) 或能量模型 (energy model) 的 方式來評估目標程式的耗電量。

參考文獻

[8] Berkeley RAMP project, http://ramp.eecs.berkeley.edu/

[9] John L. Hennessy and David A. Patterson, "Computer Architecture – A Quantitative Approach," 3rd edition, Morgan Kaufmann Publishers, 2003, pp. 42-44.

[10] J. Flinn and M. Satyanarayanan, “Powerscope: A Tool for Profiling the Energy Usage of Mobile Applications,” Proc. IEEE Workshop Mobile Computing Systems and Applications (WMCSA 1999), IEEE CS Press, Los Alamitos, Calif., 1999, pp. 2-10.

[11] D. Shin et al., “Energy-Monitoring Tool for Low-Power Embedded Programs,” IEEE Design and Test of Computers, 19(4), 2002.

[12] D. Brooks, V. Tiwari, and M. Martonosi, “Wattch: A Framework for Architectural-Level Power Analysis and Optimizations,” Proceedings of the 27th International Symposium on Computer Architecture (ISCA), June 2000.

[13] W. Ye, N. Vijaykrishan, M. Kandemir, and M. J. Irwin, “The Design and Use of Simple-Power: A Cycle-Accurate Energy Estimation Tool,” Proceedings of the Design Automation Conference, June 2000.

[14] The SimpleScalar-Arm Power Modeling Project.

http://www.eecs.umich.edu/~tnm/power/

[15] V. Tiwari, S. Malik, and A. Wolfe, “Power analysis of embedded software: A first step toward software power minimization,” IEEE Trans.VLSI Syst., vol. 2, pp. 437–445, Dec.

1994.

[16] V. Tiwari, S. Malik, A. Wolfe, and M.T.C. Lee, “Instruction level power analysis and optimization of software,” J. VLSI Signal Processing, vol. 13, no. 2, pp. 1-18, 1996.

[17] A. Sinha and A.Chandrakasan, “JouleTrack – A Web Based Tool for Software Energy Profiling,” Proc. 38th Design Automation Conference, June 2001.

[18] T. K. Tan, A. Raghunathan, G. Lakshminarayana, and N. K. Jha, “Highlevel Software Energy Macro-modelling,” in Proc. ACM/IEEE Design Automation Conference, Las Vegas, Nevada, USA, June 2001.

[19] G. Qu, N. Kawabe, K. Usami, and M. Potkonjak, “Function-level power estimation

810–813

[20] T. Tan, A. Raghunathan, and N. Jha, "Embedded Operating System Energy Analysis and Macro-Modeling," International Conference on Computer Design, pp. 515-222, 2002.

[21] A. Acquaviva, L. Benini, and A. Ricco', "Energy Characterization of Embedded Real-Time Operating Systems," in L. Benini, M. Kandemir, J. Ramanujam, Compilers and Operating Systems for Low Power, Kluwer Academic Publishers 2003.

[22] R. Dick, G. Lakshminarayana, A. Raghunathan, and N. Jha, "Analysis of Power Dissipation in Embedded Systems using Real-Time Operating Systems," IEEE Transactions on CAD, Vol. 22, no. 5, pp. 615-627, May 2003.

[23] RealView™ Emulation Baseboard HBI-0140 Rev D User Guide , ARM, October 2007.

[24] Core Tile for ARM11 MPCore HBI-0146 User Guide, ARM, September 2006.

[25] ARM11 MPCore Processor Revision r1p0 Technical Reference Manual, ARM, February 2008.

[26] Daniel P. Bovet, Marco Cesati, “Understanding the Linux Kernel,” 3rd edition, O'Reilly, November 2005.

[27] M.-L. Li, R. Sasanka, S.V. Adve, Y.-K. Chen, and E. Debes, "The ALPBench Benchmark Suite for Complex Multimedia Applications," in the Proceedings of the IEEE International Symposium on Workload Characterization (IISWC-2005), October 2005.

[28] Chun-Hao Hsu, Jian-Jhen Chen, and Shiao-Li Tsao, "Evaluation and Modeling of Power Consumption of a Heterogeneous Dual-Core Processor," in the 13th International Conference on Parallel and Distributed Systems (ICPADS), Hsinchu, Taiwan, Dec. 2007.

(EI)

計畫成果自評

本計畫於第一年執行期間提出一套多核心嵌入式系統之效能分析與耗能評估方式,且 將其實作成一套適用於多核心嵌入式系統的效能與耗能之監測與分析工具「mProfiler」,藉 此幫助多核心嵌入式系統開發者有效掌握多執行緒程式的效能與耗能,該工具除了提供軟 體執行緒層級平行度、負載平衡與軟體效能瓶頸等三項效能分析之外,也提供處理器的耗 能評估,讓多核心嵌入式系統開發者可以依據此工具的分析結果,對多核心嵌入式系統的 軟硬體設計進行最佳化的改良。除此之外,mProfiler 也可以再被進一步的擴充,使其具有 自動找尋最佳化能源效率 (energy efficiency) 之多核心處理器架構的功能,如自動找出目標 嵌入式程式在何種多核心處理器平台上運作能讓程式的能源效率最佳化,透過本計畫第一 年開發的 mProfiler 可以有效找出任一多執行緒嵌入式工作的執行緒層級平行度、執行緒間 的溝通機制負擔、每個執行緒的工作量、負載平衡狀況、以及處理器消耗的功率等資訊,

有了上述的參考資訊便可以推算出最適合該嵌入式軟體的多核心處理器平台,進而達到高 能源效率的目的。

本計畫第一年期間,我們已提出一個適用於異質雙核心處理器 TI OMAP5912 的耗能 模型 (power model) ,並發表至國際學術研討會[28] ,而本計畫於 ARM11 MPCore 平台 上開發之適用多核心嵌入式系統的效能與耗能之監測與分析工具「mProfiler」,也將在近期 內整理成為論文並提出發表。

本計畫第二年預期將會利用 FPGA 處理器平台取代第一年使用之多核心處理器晶片 平台,以提供多核心嵌入式系統開發者更具彈性的多核心處理器硬體架構,同時也會繼續 改良第一年提出之 mProfiler 的效能分析與耗能評估方式,讓多核心嵌入式系統開發者能 更快速地開發出高能源效率的軟硬體設計。

相關文件