Week 1 Flashcards
ALU
-Arithmetic and Logic Unit inside of CPU
LC-3: Can perform “ADD”, “AND”, and “NOT operations
Memory
-Stores bits in a 2^k x m array
-k = # of bits in address (index)
-m = # of bits that can be stored
-Contains MAR and MDR
-Has load and store operations
LC-3: k = 16 and m = 16
Load
-Gets data out of memory (“Read”)
Steps:
1: Write address to MAR
2: Send a “read” signal
3: Read value from MDR
Store
-Puts data into memory (“write”)
Steps:
1: Write value to MDR
2: Write address to MAR
3: Send a “write” signal
MAR
-Memory Address Register
-Contains the address/index of a piece of data stored on memory
MDR
-Memory Data Register
-Stores the data to be put in or taken out of the memory
CPU - Registers
-Small bits of temporary data in the cpu
Word Size
-Number of buts handled at once by the Processing Unit (size of the registers)
LC-3: Has eight registers (each holding 16 bits = word size)
Control Unit
-Interprets instructions and sends signals to other components for coordination of instructions
-Contains the IR and the PC
IR
-Instruction Register
-Contains the current instruction being executed
PC
-Program Counter
-Contains the memory address of the next instruction to be executed
I/O Devices
-Devices used for transferring data into and out of the memory
-Keyboards, speakers, displays, etc
-Program that controls devices = drivers
LC-3: Uses keyboard for input and terminal for output
ISA
-Instruction Set Architecture
-Provides all info needed to write a program in machine language
-Microarchitecture = hardware of ISA
Opcode
-Specifies which operation to perform
Operand
-Data used for the operation
Instruction Cycle
-Sequential stages in which machine executes a single instruction
-Fetch, Decode, Evaluate Address, Fetch Operands, Execute, Store
Fetch
-Loads instruction into memory
Steps:
1. Copies contents of PC into MAR
2. Send a “read” signal to memory
3. Copy contents of the MDR into the IR
4. Increment PC (PC = PC + 1)
Decode
Determines how to execute the instruction
Steps:
1. Identify the opcode/function
2. Assert control line based on 4-to-16 decoder
3. Identify the operands based on opcode
Evaluate Address
-Computes address used to access memory
Not used for some instructions (like add)
Fetch Operands
-Loads instruction’s operands
-Can load values from memory or registers
Execute
-Performs operations that require ALU
-Send signal to ALU
-Not always used
Store
-Writes result of the instruction to destination
-Can store in memory or in registers
Pipelining
-Overlaps instructions, executing multiple instructions at different stages at the same time
LC-3: NOT used