Font Size: a A A

The Compile System Of A Functional Programming Language Based On The Loongson2F Platform

Posted on:2016-04-24Degree:MasterType:Thesis
Country:ChinaCandidate:C Y HeFull Text:PDF
GTID:2308330461951510Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
General purpose processor is the strategic industry related to the fate of the country, and its development is directly related to the national security and the technological innovation capability, which is the country’s core interests. The Loongson 2F series processors was developed by ICT(Institute of Computing Technology, Chinese Academy of Science) since 2001, after ten years of accumulation and development, the product line now including Loongson-1, Loongson-2 and Loognson-3 three series, covering small, medium and large CPU and IP core. As the industrial base and leading enterprises of Loognson processor, Jiangsu Lemote technology Co., Ltd. has been committed to the development and the maket promotion of the products related to Loognson processor, which has independently developed Loognson based desktop computers(), cluster computers(), touch control terminal kiosk, mobile tablet compile and education cloud computing platform series products.U-Boot is an open-source firmware developed by Germany DENX group, which applicable to a variety of embedded CPU and support MIPS, x86, ARM, XScale, Power PC and other processor architectures. U-Boot firmware has the dual function of BIOS and bootloader, so it has been widely used in the embedded development area. U-Boot firmware not only supports the embedded Linux system, but also supports booting Net BSD, Vx Works, QNX, RTEMS, ARTOS, Lynx OS and other embedded operating systems.Unlike the common imperative programming languages, which are based on “Turing machine”, functional programming language is based on “lambda calculus” and “recursive function theory”. Although their ability to solve problems is the same in the theory, but because all the expressions in functional programming language has no “side effects”, led to its far superior in terms of unit testing, code debug, parallel and hot deployment compare to common imperative programming languages.Based on the characteristics of Loongson2 F processor and Lemote 8089 D hardware platform, this paper proposed the scheme of porting U-Boot to the target platform through the contrast and analysis of the U-Boot firmware and the PMON 2000 firmware. After analyzing the U-Boot firmware’s code structure and booting process, the concrete implementation of the port process is given. According to the characteristics, the problem of using common graphic cards in non-x86 architecture is solved by integrating the VGA BIOS simulator to the U-Boot firmware. This paper describes the origins and features of lambda calculus, which is the basis of the functional programming language, and presents a functional programming language ZL based on the lambda calculus. After introducing the syntax and the sample programs of the ZL language, this paper designed and implemented a compile system top-down and described the entire compilation process in detail. Based on the concept of hierarchical abstraction, the compilation process is divided into the following four sub process: from ZL to the lambda calculus, from the calculus to the super combinator, from the super combinator to the virtual machine code and from the virtual machine code to the machine code of the target platform. This system now can successfully compile the ZL programs into the target platform’s machine code.
Keywords/Search Tags:Loongson 2F, Firmware, U-Boot, Functional programming language, Compile system
PDF Full Text Request
Related items