My homebrew 8 bit CPU has recently gained an instruction decoder that translates the program into the control signals that the CPU needs. In this video we develop an entirely new instruction encoding that takes full advantage of the decoder. We can finally bring back immediate ALU operations like ADDI and invent entirely new ones, such as a conditional LDI. As a final test, we develop a new program to compute Fibonacci numbers and run it on the processor.
This video series explores the concepts and techniques that make modern computer processors so incredibly fast and powerful. I build my very own 8-bit processor from individual logic gates and gradually evolve it to become a superscalar out-of-order machine. Along the way, we take a deep dive into contemporary computer architecture in a hands-on fashion and rediscover some of the foundations of modern computing.
Previous Video:
https://youtu.be/DC6XD6rj76w
Series Playlist: https://youtube.com/playlist?list=PLyR4neQXqQo5nPdEiMbaEJxWiy_UuyNN4
GitHub Repository: https://github.com/fabianschuiki/superscalar-cpu
0:00:00 - Intro
0:01:18 - Encoding NOP/LDI/MV
0:04:49 - Encoding Jumps
0:06:14 - Encoding Unary ALU Ops
0:08:43 - Encoding Binary ALU Ops
0:09:38 - Encoding CMV
0:10:19 - New CLDI Instruction
0:12:10 - New ADDI and Friends
0:14:35 - Decoding the New Instructions
0:25:12 - Updating the Assembler
0:32:58 - A New Program
0:36:38 - Testing
0:37:43 - Testing LDI
0:40:42 - Testing MV
0:42:59 - Testing FSWAP
0:47:18 - Testing ADD
0:48:22 - Testing ADDC
0:49:57 - Testing CLDI
0:53:31 - Testing JRELR
0:56:34 - Hitting Run
0:57:22 - Thoughts on Next Steps
1:02:39 - Outro
#homebrew #8bit #breadboard #superscalar #computer