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)
A register in a computer processor that contains the address (location) of the instruction being executed at the current time respectively to be executed next.
It points to the instruction.
It does not maintain a count of any sort
Holds “state” of control memory
ALU
a 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 upon
Control memory
holds control signals for our processor; essentially holds the “program” we want our CPU to execute
TEST box/circuit
Allows us to alter the value of the PC by testing what comes out of the ALU for a particular condition.
Gives CPU ability to make decisions at runtime
2 Parts
1) Determine if incoming # is Negative/Zero/Positive
2) Compare incoming condition from user to output of part 1
von Neumann model
5 Pieces:
- Processing unit (contains ALU and register file). Performs all calculations/information (“overworked clerk”)
- Memory (for instructions and data memory): Storage of information
- Control unit (contains PC). Serves as index into program memory to indicate which instruction must be carried out by the processing unit. Makes sure that all the other parts perform their tasks correctly and at the correct time
- Input: Provides a means for information to be loaded into the internals of the machine
- Output: Provides a means for information to be read from the internals of the machine
von Neumann loop
+ Requirement
4 steps to be performed by the von Neumann model
machine to carry out an instruction on the machine:
1) Fetch instruction from program memory
2) Decode instruction from program memory (determine control signals)
3) Execute instruction in ALU (commit data to register file if needed)
4) Update program counter, Rinse and Repeat
-> repeat loop
Critical Requirement:
-> Each iteration of the Neumann Loop must apear atomic (all or nothing).
Build a basic CPU: Components
1) Memory
2) Data and Instructions
3) PC
4) ALU
Explain how a CPU is a FSM
In general, an FSM consists of 3 basic parts:
● An Nbit register which stores the state of the machine
○ In our CPU, this would be the memory
● A block of logic that computes the next state as a function of the current state and any inputs
○ In our CPU, this would be the adder/subtractor (input = control mem)
● A block of logic which computes the output based on the current state
Structure of NZP Tester
Two internal parts to the TEST component
■ 1) Determine if incoming # is negative/zero/positive
■ 2) Compare incoming condition from user to output of part 1
Opcode
Identifies what the instruction does
Operand
Specifies the values on which the instruction operates
Word Length
is the size of the quantities that are normally processed by a given ALU.
Simplified the “bit-width” of the input signal to the ALU, or the number of bits the CPU can process in one go.
The word length does not affect what a computer can compute. Computer with small word length can do the same as one with larger word length. It just will take more time.