UNIVERSIDAD PONTIFICIA COMILLAS ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA (ICAI) INGENIERO INDUSTRIAL PROYECTO FIN DE CARRERA SISTEMA DE DESARROLLO PARA UN MICROPROCESADOR ORIENTADO A APLICACIONES AEROESPACIALES DIRECTOR: AUTOR: Jose Daniel Muñoz Frías Alberto Requena Izard MADRID, Junio de 2009
RESUMEN DEL PROYECTO El presente proyecto trata del diseño de un sistema de desarrollo para un microprocesador diseñado por la empresa EADS Astrium CRISA. Se detalla la estructuración de las herramientas realizadas, que facilitan el desarrollo y la simulación de código para los microprocesadores y DSPs (Procesadores de Señales Digitales) de la empresa. Ensamblador Simulador Interfaz gráfica Figura 1. Partes del sistema de desarrollo. El sistema de desarrollo consta de las tres herramientas que se aprecian en la Figura 1, consiguiendo al final crear el paquete de herramientas que permiten al usuario el ensamblado del código y su posterior simulación, todo ello apoyado por una interfaz gráfica que facilita y agiliza el trabajo. Las herramientas han sido diseñadas de manera muy estructurada y modular, teniendo en cuenta que la utilidad del proyecto reside en su capacidad para adaptar fácilmente las herramientas a los distintos proyectos con microprocesadores y DSPs que realiza la empresa CRISA. Es por ello que se ha acompañado de manuales no sólo para explicar su uso, sino también otro que indican como realizar pequeños cambios. También se ha incluido entre los objetivos del proyecto el que las herramientas creadas pudieran funcionar en cualquier sistema operativo.
1 Ensamblador El ensamblador que se ha incluido en el conjunto de herramientas es en esencia uno anteriormente diseñado por D. Juan Antonio Ortega y por D. José Daniel Muñoz Frías, al cual se han realizado pequeñas modificaciones, como son la posibilidad de trabajar con registros de 24 o de 32 bits, para ser más flexibles en el compromiso entre precisión y espacio ocupado, la creación automática de un fichero en VHDL con la memoria ROM, para permitir su síntesis en la FPGA, y la modificación del set de instrucciones para adaptarse al DSP sobre el que se trabaja. 2 Simulador Figura 2. Estructura del simulador. Se ha creado un simulador en lenguaje C++ partiendo de uno existente en lenguaje C. Se ha intentado estructurar de manera que se asemeje al sistema simulado, como se puede apreciar en la Figura 2. El simulador emula el comportamiento del microprocesador o DSP trabajando sobre el código del programa que se va a sintetizar en la FPGA. Permite ejecutar una instrucción, una tarea entera, ir hasta un punto concreto, etcétera. También puede poner puntos de ruptura ( breakpoints ), lo cual facilita la depuración del código.
El simulador puede funcionar mediante ventana de comandos, o bien leyendo ficheros de entrada y creando otros de salida con la información pedida, o también con la interfaz gráfica diseñada. 3 Interfaz gráfica Figura 3. Aspecto de la interfaz gráfica de usuario. Por último se ha realizado una interfaz gráfica para facilitar al usuario el trabajar con el programa, para ello se han usado las herramientas de código abierto CodeBlocks junto con WxWidgets. La comunicación con el simulador se ha conseguido mediante tuberías, un método por el cual se puede mandar información desde un proceso del sistema a otro, y se deja en manos del sistema operativo el llevar la información. Aún así la herramienta creada funciona en cualquiera de los sistemas operativos principales (Windows, Linux o Mac), gracias a las funciones propias de wxwidgets y al haber usado en todo momento funciones de la librería estándar.
PROJECT ABSTRACT The present project deals with the design of a development system for a microprocessor designed by company EADS Astrium CRISA. The structuring of the tools made is detailed, that facilitate the development and the simulation of code for the microprocessors and DSPs (Digital Signal Processor) of the company. Assembler Simulator Graphical interface Figure 1. Development system parts. The development system consists of the three tools that are appraised in the figure 1, being able in the end to create the package of tools that allow the user to assemble the code and its later simulation, all of it supported by a graphical interface that facilitates and accelerates the work. The tools have been designed of a very structured and modular way, considering that the utility of the project resides in its capacity to easily adapt the tools to the different projects with microprocessors and DSPs that the company CRISA makes. It is for that reason that the tools have been accompanied by manuals not only explaining its use, but also how to make small changes. Another of the project objective was for it to be able t o work on any of the major operative Systems.
1 Assembler The assembler included in the current project was designed by Mr. Juan Antonio Ortega and by Mr. Jose Daniel Muñoz Frías, with small modifications, like the possibility of working with registers of 24 or 32 bits, to be more flexible in the commitment between precision and occupied space, the automatic creation of a file in VHDL with the ROM memory, to allow his synthesis in the FPGA, and the modification of the instructions set to adapt to the DSP that the project was working with. 2 Simulator Figure 2. Simulator structure. A simulator using C++ language has been created based of one existing one in language C. It has been structured trying resembled the simulated system, as can be seen in the figure 2. The simulator emulates the behaviour of microprocessor or DSP working on the code of the program that is going to be synthesized in the FPGA. It allows the execution an instruction, a whole task, running until a certain point, etcetera. It can also insert breakpoints, which facilitates the debugging.
The simulator can be used through a command window, automatically indicating input and output files, or also through designed graphical interface. 3 Graphical Interface Figure 3. Graphical User Interface. A graphical user interface has been made to facilitate the use of the programs, using open source programs CodeBlocks and WxWidgets. The communication works through pipes, a method to send information between processes, leaving the work to the operative system. Even so the created tool work in any of main the operating systems (Windows, Linux or Mac), thanks to the functions of wxwidgets and to the use of standard library functions.