SP-2: Extending 4-bit SP-1 CPU with Addressing Modes and Interfacing Features on Logisim for Computer Architecture Education

Afsana Afrin, Nahin Ul Sadad, Md. Nazrul Islam Mondal
Abstract

The Computer Organization and Architecture (COA) course often lacks practical activities to help students deeply understand CPU design. To address this, we present SP-2, a 4-bit CPU architecture designed and simulated using the Logisim logic simulator. SP-2 builds on the previously developed SP-1 by introducing significant enhancements, including 40 instructions (up from 33), 5 addressing modes (up from 3, adding Register Indirect, Based, and Based Indexed with Displacement), and Input/Output (I/O) interfacing capabilities, which were absent in SP-1. A comparison with educational CPU models—Mic-1, SEP, DLX, and SP-1—shows SP-2's extended support for ALU operations, branching mechanisms, and I/O interfacing, surpassing SP-1 in versatility. Additionally, SP-2 aligns with most Learning Outcomes (LO) outlined in CS2013 and CE2016 curricula, particularly the Interfacing and Communication outcome, which SP-1 did not support. Despite its limitations, such as the lack of stack support, SP-2 bridges the gap between theory and practical application, offering students a valuable hands-on learning experience in CPU design.

Conclusion

In this paper, we presented SP-2, an enhanced 4-bit version of the SP-1 CPU, designed for undergraduate Computer Organization and Architecture (COA) courses. SP-2 offers a comprehensive instruction set and real-world processor features while remaining simple for students to understand. However, limitations such as the absence of stack support, small 4-bit word size, and lack of advanced features like multiprocessing restrict its capability for complex tasks. Despite these challenges, the Logisim simulator enables step-by-step design, providing hands-on experience. SP-2’s modular design allows future extensions, such as increased word size, stack support, and pipelining, enhancing its relevance for advanced education. The architecture aligns well with most Learning Outcomes (LO) in ACM’s Computer Science and Computer Engineering curricula. Future work will enhance the SP-2 architecture by adding stack support, multi-cycle operations, floating-point instructions, expanded I/O capabilities, and assembler support, bringing it closer to real-world CPU designs. To validate its educational benefits, classroom trials and student feedback will be conducted, providing insights into its effectiveness in improving learning outcomes and advocating for its use in undergraduate courses.

References
[1] Computer Engineering Curricula, Association for Computing Machinery (ACM), IEEE Computer Society, 2016.
[2] Computer Science Curricula, Association for Computing Machinery (ACM), IEEE Computer Society, 2013.
[3] P. W. C. Prasad, A. Alsadoon, A. Beg, and A. Chan, "Using simulators for teaching computer organization and architecture, <em>" Journal of Computer Application in Engineering Education</em>, vol. 24, no. 2, pp. 215–224, August 2015.
[4] N. U. Sadad, A. Afrin and M. N. I Mondal, "SP-1: Design and Simulation of 4-bit Simple CPU on Logisim for Computer Architecture Education", 2022 4th International Conference on Electrical, <em>Computer & Telecommunication Engineering (ICECTE)</em>, pp. 1-6, Rajshahi, Bangladesh, 2022.
[5] S. Card, "The psychology of human-computer interaction," Taylor Francis, Boca Raton, 2018.
[6] M. H. H. Ichsan and W. Kurniawan, "CPU implementation using only logisim simulator to achieve computer architecture learning outcome, <em>" Bulletin of Electrical Engineering and Informatics</em>, vol. 9, no. 2, pp. 749-756, April 2020.
[7] A. Kara and M. Mostefai (2021), "Simple enough processor : From scratch elaborated simulated educational cpu" [Online]. Available: https://doi.org/ [Last visited on: 29 Sep., 2024] https://doi.org/10.36227/techrxiv.16539843.v1
[8] A. S. Tanenbaum and J. R. Goodman, Structured Computer Organization, 4th Ed, Prentice Hall PTR, USA, 1998.
[9] D. A. Patterson and J. L. Hennessy, Computer Architecture: A Quantitative Approach, 1st Ed, Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1996.
[10] L. Null and J. Lobur, Essentials of Computer Organization and Architecture, 1st Ed, Jones and Bartlett Publishers, Inc., USA 2003.
[11] A. P. Malvino and J. A. Brown, Digital computer electronics, 3rd Ed, McGraw Hill, India, 1993.
[12] Brian P. Railing, "CADSS: Computer Architecture Design Simulator for Students, <em>" Proceedings of the Workshop on Computer Architecture Education (WCAE '23)</em>, pp. 34-40, Orlando, FL, USA, 2024.
[13] F. García-Carballeira, A. Calderón-Mateos, S. Alonso-Monsalve and J. Prieto-Cepeda, "Wepsim: An online interactive educational simulator integrating microdesign, microprogramming, and assembly language programming," IEEE Transactions on Learning Technologies, vol. 13, no. 1, pp. 211–218, March 2020.
[14] D. C. Schuurman, "Step-by-step design and simulation of a simple cpu architecture, <em>" Proceeding of the 44th ACM Technical Symposium on Computer Science Education (SIGCSE ’13)</em>, pp. 335–340, Denver, Colorado, USA, 2013.
[15] I. Ilinkin, "Variations on "From Nand to Tetris" with Logisim and ARM, <em>" Proceedings of the 2023 Conference on Innovation and Technology in Computer Science Education (ITiCSE 2023)</em>, pp. 424–429, Turku, Finland, 2023.
[16] K. Nakano and Y. Ito, "Processor, assembler, and compiler design education using an fpga, <em>" 2008 14th IEEE International Conference on Parallel and Distributed Systems</em>, pp. 723–728, 2008.
[17] J. Juan-Chico, D. G. Martos, I. M. Gómez-González and J. V. Cortés, "YASAC: Yet Another Simple Academic Computer and Teaching Methodology," 2024 XVI Congreso de Tecnología, Aprendizaje y Enseñanza de la Electrónica (TAEE), pp. 1-9, Malaga, Spain, 2024.
[18] A. Yildiz, H. F. Ugurdag, B. Aktemur, D. Iskender, and S. Goren, "Cpu design simplified, <em>" 2018 3rd International Conference on Computer Science and Engineering (UBMK)</em>, pp. 630–632, 2018.
[19] S. Ribić and K. Hodžić, "Educational Processor with Single-cycle Instructions SVEU16," 2023 46th MIPRO ICT and Electronics Convention (MIPRO), pp. 855-860, Opatija, Croatia, 2023.
[20] D. Feinberg, "A simple and affordable ttl processor for the classroom, <em>" Computer Science Education</em>, vol. 17, pp. 107–116, June 2007.
[21] T. Stanley, V. Chetty, M. Styles, S.-Y. Jung, F. Duarte, T.-W. Lee, M. Gunter, and L. Fife, "Teaching computer architecture through simulation: (a brief evaluation of cpu simulators), <em>" Journal of Computing Sciences in Colleges</em>, vol. 27, pp. 37–44, April 2012.
[22] C. Burch, Logisim [Online]. Available: https://sourceforge.net/projects/circuit/ [Last visited on: 29 Sep., 2024].
[23] H. Neemann, Digital [Online]. Available: https://github.com/hneemann/Digital [Last visited on: 29 Sep., 2024].
[24] D. Skrien, CPU Sim: An Interactive Java-based CPU Simulator for use in Introductory Computer Organization Classes [Online]. Available: http://www.cs.colby.edu/djskrien/CPUSim/ [Last visited on: 29 Sep., 2024].
[25] B. Mustafa, CPU-OS Simulator [Online]. Available: https://teach-sim.com/ [Last visited on: 29 Sep., 2024].
[26] M. B. Birrer and C. Salazar, "Improving Student Comprehension with Logisim-based RISC Processors," 2022 IEEE Frontiers in Education Conference (FIE), pp. 1-5, Uppsala, Sweden, 2022.
[27] M. Kayaalp, "Using Logisim-evolution for Teaching Datapath and Control," 2021 ACM/IEEE Workshop on Computer Architecture Education (WCAE), pp. 1-8, Raleigh, NC, USA, 2021.