Overview
This lecture covers the fundamentals of computer architecture, including computer classification, Von Neumann architecture, CPU organization, instruction sets (especially MIPS), performance metrics, and key technology trends in computer engineering.
What is Computer Architecture?
- Computer architecture is the overall design and structure of computer systems, including hardware, software, and behavior.
- Major components: instruction set, operative (CPU), memory, control unit, and input/output units.
- Questions addressed: How is information represented, how is data calculated, and what procedures are used for processing?
Von Neumann Architecture
- Proposed by John von Neumann in 1945; main model for modern computers.
- Features stored-program concept: both instructions and data stored in main memory.
- Sequential processing fetches and executes instructions one at a time using the program counter (PC).
- Uses a linear memory address space.
CPU Organization
- CPU contains arithmetic/logic unit (ALU), general-purpose registers, control unit, and flag registers.
- Operating unit: GPRs (store temporary results), ALU (performs operations), Flag register (status: carry, zero, sign, overflow).
- Control unit: handles PC, instruction register, decoder, and sequencer.
Instruction Cycle
- Consists of Fetch (load instruction from memory), Decode (interpret instruction), and Execute (perform operation).
- The von Neumann bottleneck: single bus for data and instructions limits performance.
Computer Classification & Evolution
- Microcontrollers: embedded systems, low power, SoC.
- Personal computers and workstations: general-purpose, scalable.
- Mainframes: high parallelism, many users.
- Supercomputers: highest performance, specialized for large computations.
- Evolution eras: Mechanical, Electro-Mechanical, Electronic, Post-PC (mobile, IoT, AI).
Execution and Instruction Sets
- Programs are written in high-level languages, compiled to assembly, then machine code.
- MIPS is a simple, efficient example of instruction set architecture (ISA) with 32 general-purpose registers.
- Registers ($t0โ$t9 temporary, $s0โ$s7 saved) are faster than memory.
- Registers optimize speed; memory is used for less frequent/composite data.
MIPS Instruction Types
- Arithmetic: add, sub, addi, slt, sltu.
- Logical: and, or, xor, nor, andi.
- Memory access: lw, sw, lb, sb, lh, sh.
- Control flow: beq, bne, j, jal, jr.
- Arithmetic/logical operations use 3 operands: two sources, one destination.
Data Representation & Radix Conversion
- Computers use binary (base-2), decimal (base-10), and hexadecimal (base-16) notations.
- Unsigned binary (n bits): range 0 to 2โฟโ1.
- Signed (2โs complement, n bits): range โ2โฟโปยน to 2โฟโปยนโ1; sign bit is the highest bit.
- Sign extension preserves numerical value when increasing bit width.
Performance Metrics
- Performance = 1 / Execution time; higher performance means lower execution time.
- CPU time depends on instruction count, clock cycle time, and CPI (cycles per instruction).
- MIPS: millions of instructions per second, standard performance comparison.
- Response time (execution time) vs. throughput (work per unit time).
- Power and energy: lower voltage and efficient hardware/algorithms save power.
Key Terms & Definitions
- ALU โ Arithmetic Logic Unit; performs calculations.
- CPU โ Central Processing Unit; core processor of a computer.
- Von Neumann Architecture โ Model where program/data share memory and bus.
- Instruction Set Architecture (ISA) โ The set of basic instructions a CPU supports.
- Register โ Fast, small storage in CPU for quick data access.
- CPI โ Cycles Per Instruction; average cycles needed per instruction.
- MIPS โ Millions of Instructions Per Second; performance metric.
- 2โs Complement โ Binary system for representing signed integers.
- Sign Extension โ Extending binary numbers while preserving their value.
Action Items / Next Steps
- Review the main MIPS instruction types and their register conventions.
- Practice converting numbers between binary, decimal, and hexadecimal.
- Prepare to discuss performance aspects, especially how to measure and compare CPUs.
- Read up on recent hardware trends, including RISC-V and power-saving architectures.