Рет қаралды 1,125
The ALU of my homebrew CPU has four arithmetic flags. In this video, we are going to figure out how to make sense of these flags by defining a list of interesting condition codes. We then extend the ALU with three additional chips that allow us to evaluate the condition codes and determine which flags are set, if the operands to the previous comparison were equal or not, or which operand was less than, less than or equal, greater than, or greater than or equal the other, in signed and unsigned arithmetic. This piece of condition checking hardware paves the way for powerful future instructions that execute only under certain conditions, such as conditional moves and conditional jumps.
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: • Poor Man's Conditional...
Series Playlist: • Build a Superscalar CPU
ALU Playlist: • Homebrew Arithmetic Lo...
GitHub Repository: github.com/fabianschuiki/supe...
- Jump Instructions on x86: www.unixwiz.net/techtips/x86-j...
Chips:
- 74HC151 (MUX8): www.ti.com/lit/ds/symlink/cd7...
- 74HC32 (OR2): www.ti.com/lit/ds/symlink/cd7...
- 74HC86 (XOR2): www.ti.com/lit/ds/symlink/cd7...
00:00 Intro
00:41 Condition Codes
12:29 Condition Checking in Hardware
17:16 Breadboard Build
24:16 Updating the Decoder
28:20 Testing
33:31 Outro
#alu #homebrew #8bit #breadboard #superscalar #computer