Old Flame, New Flame
2022 April 12 15:37 stuartscott 1108659¤ 574¤
Nearly 11 years ago, at the University of Sheffield, I submitted my dissertation on "A Graphical Simulation of a Microprocessor for Teaching". The goal was to create a teaching aid to help students understand what goes on under-the-hood of a microprocessor.
Called Serenity, written in Java with a Swing GUI, the software enabled students to write assembly and execute it on a virtual processor to understand the architecture, watch how data flowed through the pipeline, and avoid pipeline hazards through liberal use of 'noop' instructions.
Now with fresh eyes, over a decade of industry experience, and a new programming language of choice (Go) I decided to revisit the problem to create a new and better solution.
Flame is the resulting architecture, and Pyromancer is the resulting toolchain.
Flame intends to cover computer architecture more broadly and holistically than Serenity; from Processor (Instruction Set Architecture, Instruction Pipeline, Multicore & Multithreading), to Memory Hierarchy (L1, L2, L3 Caches and Main Memory), to IO devices.
The 64bit processor has 8 cores and employs a barrel design to avoid pipeline hazards by interleaving 8 contexts (threads of execution) on each core.
The RISC-style instruction set is easy to learn - consisting of only 32 instructions.
Each component is clocked at different speeds to better represent the cost of cache misses, main memory accesses, and IO operations.
Pyromancer provides control of the clock and enables inspection of every facet of the machine's operation so students can follow the execution of their code step-by-step, clock-by-clock.
-
2022 April 12 15:54 stuartscott 1149¤
Why learn computer architecture?
Knowing how a computer works "under the hood" can help you develop more efficient algorithms by making better use of the computer's available resources - especially now that processors are not getting faster, and instead getting more populous, it is important to understand how parallelism is implemented in hardware, how to coordinate and communicate across the processing cores, and most importantly, how to work with and not against the caches.
Parallelism and cache utilization are two of the biggest factors impacting the performance of your code. See why Ahmdal's Law is Important, and how an understanding of caches can improve the performance of a sorting algorithm.
I am considering putting together a computer architecture course that would use Flame as a practical demonstration of the theory and would cover the design decisions and tradeoffs made. If this is something you would be interested in, enroll here!
Convey is made available by Aletheia Ware under the Terms of Service and Privacy Policy.
Convey is an open-source project released under the Apache 2.0 License and hosted on Github.
© 2021 Aletheia Ware LLC. All rights reserved.