Por favor, use este identificador para citar o enlazar este ítem: http://hdl.handle.net/11531/64349
Título : Extensión Zve32x para RISC-V
Autor : Zabalegui Sanz, Fermín
Muñoz Frías, José Daniel
Martínez Hernantes, Moisés
Universidad Pontificia Comillas, Escuela Técnica Superior de Ingeniería (ICAI)
Fecha de publicación : 2022
Resumen : EXTENSIÓN ZVE32X PARA RISC-V Autor: Martínez Hernantes, Moisés. Director: Zabalegui Sanz, Fermín. Entidad Colaboradora: ICAI – Universidad Pontificia Comillas. RESUMEN DEL PROYECTO 1. Introducción Mediante este Trabajo Fin de Grado se estudiará, diseñará, simulará e implementará la extensión de procesamiento vectorial, Zve32x para la arquitectura RISC-V. Para ello, se partirá de una CPU ya creada, NeoRV32, y se utilizará el lenguaje VHDL para su descripción. Para la consecución de que el núcleo sea capaz de realizar instrucciones vectoriales en un primer momento se estudiará el NoeRV32, con el fin de poder comprender su funcionamiento y las señales de comunicación que usa. Para ello se realizarán una serie de testbench de distintos componentes similares a los que se van a implementar, tales como la ALU. Seguidamente se estudiará el funcionamiento de la extensión, informándose por distintos medios, como videos de expertos o informes descriptivos. Una vez se tiene una idea clara de su funcionamiento se comienza con el diseño de los circuitos digitales en VHDL. 2. Definición del Proyecto En este Proyecto se desarrollará la extensión de procesamiento vectorial Zve32x, que permitirá al núcleo NeoRV32 realizar instrucciones vectoriales. La principal diferencia que aporta esta extensión es que permite trabajar al núcleo con vectores de una manera diferente y que aporta un mayor rendimiento. De esta manera se podrá trabajar con vectores y realizar operaciones aritméticas en un menor tiempo, ya que el núcleo será capaz de procesar todos los elementos del vector al mismo tiempo. Figura 1. Imagen comparativa entre la suma escalar y la suma vectorial. [1] 3. Descripción del modelo/sistema/herramienta Para lograr que el núcleo sea capaz de trabajar con todos los elementos del vector será necesario implementar una serie de componentes nuevos o actualizar algunos de los existentes. De esta manera lo primero en implementarse serán los nuevos CSR(Configuration and Status Registers), teniendo en cuenta que unos son de lectura y escritura y otros de solo lectura. Seguidamente se implementarán las instrucciones vsetvl, vsetvli y vsetivli, con las cuales se conseguirá modificar los datos contenidos en los CSR vtype y vl, ya que estos no se escriben como un CSR normal y además tienen una serie de condiciones que cumplir. Se tendrá que crear un banco de registros completamente nuevo en el que se almacenen todos los vectores con los que se trabajará. Concretamente se crearán 32 nuevos registros de una longitud fija denominada VLEN. Para poder cargar datos en este registro se implementará la instrucción vlex.v, con la que se podrá leer datos desde la memoria RAM y almacenarlos en el banco de registros de vectores para su posterior procesamiento. Por último, se creará una nueva ALU que sea capaz de realizar las operaciones aritméticas vectoriales. Para indicar qué tipo de operación se realiza se implementará la instrucción, que en el caso de la suma sería vadd.vv. Con esta instrucción se podrá cargar, sumar y guardar todos los elementos de un vector al mismo tiempo, sin tener que cargar los dos elementos a sumar del registro, sumarlos, volver a guardarlos y así con todos los elementos. Figura 2. Diagrama de bloque de los circuitos digitales diseñados. 4. Resultados Al termino de este proyecto se consiguió implementar todo lo mencionado anteriormente, y para comprobar que todo funcionaba correctamente se realizaron pruebas en cada uno de los componentes nuevos que se iban creando. Para mostrar el funcionamiento de todo lo implementado se adjuntan la Figura 3 en la que se puede observar cómo se cargan todos los CSR, incluidos vtype y vl con su instrucción correspondiente y la Figura 4 en la que se ve como se carga datos desde la memoria en los dos registros vectoriales y como se realiza la suma y la resta de los mismos almacenándose el resultado en otro registro vectorial, ejecutándose de este modo vle8.v, vadd.vv y vsub.vv. Figura 3. Simulación en la que se cargan valores en todos los CSR. Figura 4. Simulación en la que se cargan datos vectoriales y se procesan en la ALU vectorial. 5. Conclusiones Con este Trabajo Fin de Grado se ha conseguido completar todos los objetivos marcados, consiguiendo implementar una nueva funcionalidad para el núcleo NeoRV32. Si bien es cierto que se le pueden ampliar las instrucciones para que tenga otras maneras de cargar datos o realizar operaciones que no sean solo aritméticas, sí que es verdad que se ha establecido unas bases muy sólidas desde las que se puede empezar, ya que la mayoría del trabajo de estudio del funcionamiento está realizado y la mayoría de las señales necesarias del núcleo ya están conectadas a la extensión. 6. Referencias [1] «Electropediadigital,» 22 abril 2013. [En línea]. Available: http://electropediadigital.blogspot.com/2013/04/risc-vs-procesadores-vectoriales.html. [Último acceso: 2022 junio 19].
EXTENSION ZVE32X FOR RISC-V Author: Martínez Hernantes, Moisés. Supervisor: Zabalegui Sanz, Fermín. Collaborating Entity: ICAI – Universidad Pontificia Comillas. ABSTRACT 1. Introduction With this Bachelor Thesis will be studied, designed, simulated and implemented the extension of vector processing, the extension Zve32x, for the architecture RISC-V. For it, will split from a CPU already created, the NeorRV32 CPU, and the language VHDL will be used to describe the digital circuits. For the achievement of the core will be capable of processing vector instructions, in the first instance the NeoRV32 will be studied, with the final purpose of being able to understand how it works and the communication signals that use. For it a number of testbench will be done in different components similar to the ones that will be implemented, such as the ALU. Next the performance of the extension will be studied, getting informed by different means, such us experts’ videos or papers. Once you have a clear idea of the functioning the design of the digital circuits will be start. 2. Definition of the project In this project the vector processing extension Zve32x will be developed, allowing the core NeoRV32 able to process vector instructions. The main difference that contributes this extension es that allows the core to work with vector in a different way and with a better performance. In this way it will be possible working with vectors and perform arithmetic operations in less time, because the core is able to access to all the vector elements at the same time. Figura 5. Comparative image between scalar add and vector add. [1] 3. Model description A To achieve that the core is able to work with all the vector elements at the same time it will be necessary to implement a series of new components or update some of the existing ones. In this way the first thing to implement is the new CSR, taking into account that some of them have writing and reading access and other only reading access. Next the instructions vsetvl, vsetvli, vsetivli will be implemented, with it the data contained in the CSR vtype and vl will be modified, because this CSR don`t be write like a normal CSR and moreover have some additional conditions to comply. A completely new vector register must be created, where all the vectors that will be used will be stored. Specifically, 32 new registers will be created with a fixed length call VLEN. To be able to load data in these registers a new instruction call vlex.v will be implemented, with which data from the RAM memory will be read and load in the vector register in order to be process. Finally, a new ALU capable of doing arithmetic vector operations will be created. For indicate which type of operation will be done the instruction vxxx.v will be implement, for example, in the add case the instruction will be vadd.v. With this instruction all the vector elements could be load, add and store at the same time, without loading two vector elements to add, add them, store them again in the vector register and so with all the vector elements. Figura 6. Block diagram of the designed digital circuits. 4. Results At the end of this project, it was achieved all of the above, and in order to check everything was working properly, many test was realized for each of the new components that were being created. To show functioning of everything thar was implemented are attached the Figura 7 in which you can see how all CSR are loaded, including vtype and vl with the corresponding instruction and the Figura 8 in which it is seen how vector registers are loaded from the RAM memory and how the add and the sub of those vector registers are done, storing it in other vector register. Figura 7. Simulation in which all the CSR are loaded with a value. Figura 8. Simulation in which data vector is loaded and is process in the vector ALU. 5. Conclusions With this Bachelor Thesis all the objectives have been completed, achieving the implementation of a new functionality for the NeoRV32. While it is true that some instructions can be added in order to have other ways to load data or doing different operations, not only arithmetic, is true that solid foundation have been laid from where other project can start, because most of the functioning study of the core have been done and the most of the needed signals of the core have been already connected to the extension. 7. References [1] «Electropediadigital,» 22 abril 2013. [En línea]. Available: http://electropediadigital.blogspot.com/2013/04/risc-vs-procesadores-vectoriales.html. [Último acceso: 2022 junio 19].
Descripción : Grado en Ingeniería en Tecnologías Industriales
URI : http://hdl.handle.net/11531/64349
Aparece en las colecciones: KTI-Trabajos Fin de Grado

Ficheros en este ítem:
Fichero Descripción Tamaño Formato  
TFG_MartinezHernantesMoises.pdfTrabajo Fin de Grado2,99 MBAdobe PDFVista previa
Visualizar/Abrir
Anexo_I_MartinezHernantesMoises.pdfAutorización64,64 kBAdobe PDFVista previa
Visualizar/Abrir


Los ítems de DSpace están protegidos por copyright, con todos los derechos reservados, a menos que se indique lo contrario.