Developing Tools for Teaching RISC-V with Python, Verilog, Matplotlib, SVG, and ChatGPT

Authors

  • Guilherme A. R. de Figueiredo UFV
  • Erick S. de Souza UFV
  • Júlio H. F. Rodrigues UFV
  • José A. Nacif UFV
  • Ricardo Ferreira UFV

DOI:

https://doi.org/10.5753/ijcae.2024.5343

Keywords:

Google Colab, Software Pipelining, Scheduling, GPU

Abstract

The use of simulators is a facilitator for teaching computer architecture. However, the development of simulators and visualization tools provides a deeper understanding for students. This paper presents various tools for teaching RISC-V processor design. To motivate students, we used the Google Colab environment with Python to develop high-level implementations, alongside the Verilog language for more detailed RISC-V implementations. Interactive interfaces with graphical visualizations using the Matplotlib library and SVG vector format are presented. Due to Python's popularity, development is facilitated with the support of language models like ChatGPT to partially generate code for interfaces and visualizations. This work was developed in collaboration with students from the Computer Architecture course at the Federal University of Viçosa. All tools are open-source, aiming to be continued and serve as a foundation for exercises, examples, and more educational tools.

Downloads

Download data is not yet available.

References

FA Alves, Danilo Almeida, Lucas Bragança, André BM Gomes, Ricardo S Ferreira, and José Augusto M Nacif. Ensinando arquiteturas vetoriais utilizando um simulador de instruções mips. International Journal of Computer Architecture Education (IJCAE), 4(1):9–12, 2015.

Sahan Bandara, Alan Ehret, Donato Kava, and Michel A Kinsy. Brisc-v: An open-source architecture design space exploration toolbox. arXiv preprint arXiv:1908.09992, 2019.

Hector Perez Baranda, Jeronimo Costa Penha, and Ricardo Ferreira. Implementação de um preditor de desvio no mips 5 estágios. International Journal of Computer Architecture Education, 6, 2018.

Michael Canesche, Lucas Bragança, Omar Paranaiba Vilela Neto, Jose A Nacif, and Ricardo Ferreira. Google colab cad4u: Hands-on cloud laboratories for digital design. In 2021 IEEE International Symposium on Circuits and Systems (ISCAS), pages 1–5. IEEE, 2021.

Kaya Celebi. Python risc-v assembly code assembler package. [link].

Universidade Federal de Vicosa. Exemplos de simuladores em google colab para ensino risc-v. [link].

Ricardo Ferreira e José Augusto Nacif. Ensino de software pipelining e escalonamento em gpus com python. International Journal of Recent Contributions from Engineering, Science & IT (iJES), 12(2):20 – 29, 2023.

Guilherme Álvaro RM Esmeraldo, Robson Gonçalves Fechine Feitosa, Edna Natividade da Silva Barros, Eduardo Carlos P da S Proto, Harley Macedo de Mello, Edson Barbosa Lisboa, Esdras L Bispo Jr, and Gustavo Augusto Lima de Campos. Uma abordagem para ensino-aprendizado de projetos de sistemas computacionais com utilização do simulador compsim com suporte à arquitetura risc-v. Revista Brasileira de Informática na Educação, 31:271–288, 2023.

Ricardo Ferreira, Michael Canesche, Peter Jamieson, Omar P Vilela Neto, and Jose AM Nacif. Examples and tutorials on using google colab and gradio to create online interactive student-learning modules. Computer Applications in Engineering Education, page e22729, 2024.

Ricardo Ferreira, Jose Nacif, Salles Magalhaes, Thales de Almeida, and Racyus Pacifico. Be a simulator developer and go beyond in computing engineering. In 2015 IEEE Frontiers in Education Conference (FIE), pages 1–8. IEEE, 2015.

Ricardo Ferreira, Carlos Sabino, Michael Canesche, Omar Paranaiba V Neto, and José Augusto Nacif. Aiot tool integration for enriching teaching resources and monitoring student engagement. Internet of Things, 26:101045, 2024.

Ricardo S Ferreira, Antonio Carlos S Beck, Luigi Carro, Andre Toledo, and Aroldo Silva. A java framework to teach computer architecture. In New Trends and Technologies in Computer-Aided Learning for Computer-Aided Design: IFIP TC10 Working Conference: EduTech 2005, October 20–21, Perth, Australia, pages 25–35. Springer, 2005.

Ricardo S Ferreira, Ulisses Chieppe, Giliardo C Freitas, and Cristiano Biancardi. Software livre no ensino de sistemas digitais e arquitetura de computadores. Universidade Federal de Viçosa, Departamento de Ciência da Computação, 2003.

Roberto Giorgi and Gianfranco Mariotti. Webrisc-v: A web-based education-oriented risc-v pipeline simulation environment. In Proceedings of the workshop on computer architecture education, pages 1–6, 2019.

Jesse Hines. Risc-v-graphical-datapath-simulator. [link].

Dmitry Kirsanov. The Book of Inkscape: The Definitive Guide to the Graphics Editor. No Starch Press, 2021.

Matthias Koenig and Roin Rasch. Digital teaching an embedded systems course by using simulators. In 2021 ACM/IEEE Workshop on Computer Architecture Education (WCAE), pages 1–7. IEEE, 2021.

Marek Materzok. Digitaljs: A visual verilog simulator for teaching. In Proceedings of the 8th Computer Science Education Research Conference, pages 110–115, 2019.

Fernando Passe, Michael Canesche, Omar Paranaiba Vilela Neto, Jose A Nacif, and Ricardo Ferreira. Mind the gap: Bridging verilog and computer architecture. In 2020 IEEE International Symposium on Circuits and Systems (ISCAS), pages 1–5. IEEE, 2020.

David A Patterson and John L Hennessy. Computer organization and design RiscV edition: the hardware software interface. Morgan kaufmann, 2017.

Jeronimo Costa Penha, Geraldo Fontes, and Ricardo Ferreira. Mipsfpgaum simulador mips incremental com validaçao em fpga. International Journal in Computer Architecture Education (IJCAE), 5(1):19–25, 2016.

Fernando Pérez and Brian E Granger. Ipython: a system for interactive scientific computing. Computing in science & engineering, 9(3):21–29, 2007.

Cristóbal Ramírez, César Alejandro Hernández, Oscar Palomar, Osman Unsal, Marco Antonio Ramírez, and Adrián Cristal. A risc-v simulator and benchmark suite for designing and evaluating vector architectures. ACM Transactions on Architecture and Code Optimization (TACO), 17(4):1–30, 2020.

Eric Steven Raymond. A catedral e o bazar. The Linux Logic Home Page, 12, 1998.

Isabel Sanches. Do ‘aprender para fazer’ao ‘aprender fazendo’: as práticas de educação inclusiva na escola. Revista lusófona de educação, 19(19), 2011.

G Savaton. A visual simulator for teaching computer architecture using the risc-v instruction set. Guillaume-Savaton-ESEO/emulsiV, 2021.

Guillaume Savaton. emulsiv is a visual simulator for a simple risc processor called virgule. [link].

James Somers. The scientific paper is obsolete. The Atlantic, 4, 2018.

Boston University. Brisc-v (boston university risc-v) simulator and teaching tool. [link].

Keyhan Vakil. Venus, risc-v simulator. [link].

Kenneth Vollmar and Pete Sanderson. Mars: an education-oriented mips assembly language simulator. In Proceedings of the 37th SIGCSE technical symposium on Computer science education, pages 239–243, 2006.

Stefan Wallentowitz. Python model of the riscv isa. [link].

Published

2024-12-15

How to Cite

Figueiredo, G. A. R. de, Souza, E. S. de, Rodrigues, J. H. F., Nacif, J. A., & Ferreira, R. (2024). Developing Tools for Teaching RISC-V with Python, Verilog, Matplotlib, SVG, and ChatGPT . International Journal of Computer Architecture Education, 13(1), 43–52. https://doi.org/10.5753/ijcae.2024.5343

Issue

Section

Full Papers