Module 5: Datapath Flashcards
central processing unit (CPU)
the electronic circuitry within a computer that carries out the instructions of a computer program by performing the basic arithmetic, logic, controlling, and input/output operations specified by those instructions; also called a central processor or main processor
program counter (PC)
register in a computer processor that contains the address (location) of the instruction being executed at the current time
ALU
combinational digital electronic circuit that performs arithmetic and logical operations
Datapath
pathway that the data flows through in a CPU; set up by control signals specified by an instruction to the CPU
Register file
contains small amount of data our processor operates on
Control memory
holds control signals for our processor; essentially holds the “program” we want our CPU to execute
TEST box
allows us to alter the value of the PC by testing what comes out of the ALU for a particular condition
von Neumann model
computer architecture based on a 1945 description by mathematician/physicist John von Neumann and others
4 pieces:
- processing unit (ALU + register file)
- -performs all calculations (“overworked clerk”) - Memory (for instructions and data memory)
- Control unit (contains PC)
- -Serves as index into program memory to indicate which instruction must be carried out by the processing unit - Input/Output
- -provides a means for information to be loaded into or read from the internals of the machine
von Neumann loop
4 steps:
- Fetch instructions from program memory
- Decode instruction from program memory
- Execute instruction in ALU (commit data to register file if needed)
- Update program counter
–repeat loop
Building a CPU
4 main pieces:
- memory
- data and instructions
- PC
- ALU
CPU as a finite state machine
FSM consists of 3 basic parts:
- an n-bit register which stores the state of the machine
- -in our CPU this would be the memory - block of logic that computes the next state as a function of the current state and any inputs
- -in our CPU this would eb the adder/subtractor (input = control memory) - block of logic which computes the output based on the current state
- -not yet in the CPU (but we will have it soon!)
NZP Tester
Two internal parts to the TEST component
- determine if incoming # is negative/zero/positive
- compare incoming condition from user to output of part 1