基于CK-CPU的Android SDK研究與設(shè)計(jì)
發(fā)布時(shí)間:2018-07-03 07:01
本文選題:CK-CPU + Android; 參考:《浙江大學(xué)》2014年碩士論文
【摘要】:隨著Android系統(tǒng)的日益推廣,基于Android SDK的應(yīng)用開(kāi)發(fā)變得越來(lái)越流行。Android SDK軟件開(kāi)發(fā)工具包包含了一套完備的開(kāi)發(fā)工具,其中包括Android系統(tǒng)底層的二進(jìn)制映像、調(diào)試器、手機(jī)模擬器、文檔、示例代碼和教程等內(nèi)容。CK-CPU是杭州中天微系統(tǒng)有限公司在國(guó)家863、核高基重大專項(xiàng)等政府重大科技項(xiàng)目支持下研發(fā)的自主知識(shí)產(chǎn)權(quán)嵌入式CPU核,采用自主設(shè)計(jì)的16/32位混編指令集,具有低功耗、高性能、高代碼密度以及易使用等優(yōu)點(diǎn)。本文在仔細(xì)分析了Android SDK的基礎(chǔ)上,將該課題的研究?jī)?nèi)容總結(jié)為以下兩點(diǎn):CK-CPU的Android模擬器emulator-csky的開(kāi)發(fā);整合AndroidSDK的各種工具集資源,使用戶可以基于該平臺(tái)方便的開(kāi)發(fā)Android應(yīng)用程序并且完成調(diào)試的工作。 Android模擬器是基于動(dòng)態(tài)二進(jìn)制翻譯技術(shù)的手機(jī)模擬器,可以無(wú)需使用物理設(shè)備即可開(kāi)發(fā)、測(cè)試Android應(yīng)用程序。動(dòng)態(tài)二進(jìn)制翻譯技術(shù)是在程序運(yùn)行過(guò)程中對(duì)源程序進(jìn)行翻譯的技術(shù),它可以克服靜態(tài)翻譯的不足,利用動(dòng)態(tài)信息對(duì)源程序進(jìn)行優(yōu)化翻譯。模擬器emulator-csky的設(shè)計(jì)是本課題研究的重點(diǎn)與難點(diǎn),我們重點(diǎn)研究了模擬器的架構(gòu)和各個(gè)模塊的實(shí)現(xiàn)原理,將模擬器分成四個(gè)部分分別設(shè)計(jì),分別是CK-CPU模擬、動(dòng)態(tài)翻譯引擎、設(shè)備管理模塊以及外圍IP的實(shí)現(xiàn)。在模擬csky處理器的過(guò)程中,我們用軟件模擬了硬件MMU、異常處理和標(biāo)志位;動(dòng)態(tài)翻譯引擎tcg負(fù)責(zé)將CK-CPU指令集翻譯成微指令,最后生成目標(biāo)機(jī)機(jī)器碼,并介紹了翻譯的基本單元tb和tb管理機(jī)制;設(shè)備管理模塊負(fù)責(zé)管理設(shè)備的創(chuàng)建和消除,在本節(jié)中我們介紹了模擬器的設(shè)備管理qdev機(jī)制:最后一個(gè)部分是外圍IP的模擬,我們模擬了定時(shí)器、中斷控制器、MAC、UART和LCD控制器等外圍設(shè)備,將這些設(shè)備掛載到模擬的總線上,和其它三個(gè)部分一起形成了完備的模擬器系統(tǒng)。針對(duì)動(dòng)態(tài)二進(jìn)制翻譯過(guò)程中庫(kù)函數(shù)的包裝,本文提出了一種庫(kù)函數(shù)的自動(dòng)包裝技術(shù),能夠有效的提升動(dòng)態(tài)二進(jìn)制翻譯系統(tǒng)的效率。我們?cè)谖恼碌淖詈蠼榻B了基于CK-CPU的Android SDK開(kāi)發(fā)例程,發(fā)了一個(gè)簡(jiǎn)單的"Hello World"應(yīng)用程序。
[Abstract]:With the increasing promotion of Android system, the application development based on Android SDK has become more and more popular. The software development toolkit of Android SDK includes a set of complete development tools, including the binary image, debugger and mobile simulator of Android system. Documents, sample codes, tutorials, etc. CK-CPU is an embedded CPU core of independent intellectual property rights developed by Hangzhou Zhongtian Microsystems Co., Ltd., with the support of major government scientific and technological projects such as the National 863, Nuclear High Foundation, and other major scientific and technological projects. It has the advantages of low power consumption, high performance, high code density and easy to use. Based on the detailed analysis of the Android SDK, this paper summarizes the research contents of this topic as follows: the development of Android simulator emulator-csky of the following two points: the integration of various tools resources of the Android SDK, Android simulator is a mobile phone simulator based on dynamic binary translation technology, which can be developed without physical devices. Test the Android application. Dynamic binary translation is a technique for translating source programs in the process of program operation. It can overcome the shortcomings of static translation and optimize the translation of source programs by using dynamic information. The design of simulator emulator-csky is the focus and difficulty of this research. We focus on the architecture of simulator and the realization principle of each module. The simulator is divided into four parts, namely, CK-CPU simulation, dynamic translation engine. Implementation of device management module and peripheral IP. In the process of simulating csky processor, we use software to simulate hardware MMU, exception handling and flag bit, dynamic translation engine tcg is responsible for translating CK-CPU instruction set into microinstruction, finally generating target machine code. In this section, we introduce the device management qdev mechanism of simulator. The last part is the simulation of peripheral IP. We simulate the peripheral devices, such as timer, interrupt controller, MACU UART and LCD controller, and mount these devices onto the analog bus, and form a complete simulator system together with the other three parts. In view of the packaging of library functions in the process of dynamic binary translation, this paper proposes an automatic packaging technology of library functions, which can effectively improve the efficiency of dynamic binary translation systems. At the end of the article, we introduce the Android SDK development routine based on CK-CPU and send a simple "Hello World" application.
【學(xué)位授予單位】:浙江大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2014
【分類號(hào)】:TP311.52
【參考文獻(xiàn)】
相關(guān)期刊論文 前3條
1 楊浩;唐鋒;謝海斌;武成崗;馮曉兵;;二進(jìn)制翻譯中的庫(kù)函數(shù)處理[J];計(jì)算機(jī)研究與發(fā)展;2006年12期
2 謝海斌;張兆慶;武成崗;馮曉兵;;二進(jìn)制翻譯中系統(tǒng)庫(kù)函數(shù)的分類處理方法[J];計(jì)算機(jī)應(yīng)用研究;2008年04期
3 姚昱e,
本文編號(hào):2092828
本文鏈接:http://www.sikaile.net/falvlunwen/zhishichanquanfa/2092828.html
最近更新
教材專著