quartz/content/notes/04-computer-architecture.md
2022-07-27 18:34:35 +12:00

3.8 KiB

title aliases tags sr-due sr-interval sr-ease
04-computer-architecture
cosc204
lecture
2022-08-04 8 250

Bus

  • data bus

  • address bus

  • control bus

  • conmmunicate between parts of the computer

  • only one transmitter at a time

  • only addressed device can respond

  • 2 levels

    • internal
    • external

Memory

  • memory size is dependent on bus size

    • 2n bytes for n-lines on the address bus
      • 2^8=256B, 2^16=64KB, 2^32=4GB, 2^64=16EB
  • flip flops are grouped into bytes (or larger)

    • each byte has an address
    • to write
      • present the address and the data
      • tell chip to write
    • to read
      • present the address
      • tell the chip to read
      • look at the data

Static RAM (SRAM)

  • memory made from flip flops is called static RAM
    • used mostly in CPU cache
    • or anywhere where only a small amount is needed
    • expensive

Dynamic RAM (DRAM)

  • made from capacitors
  • used where large amount of RAM is needed
  • slower than SRAM
  • inexpensive

Non-Volatile Memory

  • often called ROM (read only memory)
    • can also be called PROM, EPROM, EEPROM, FLASH
  • flash
    • uses floating-gate flash cells, not quite a transistor

ALU

  • performs arithmetic
    • add, subtract, etc.
  • logical operations
    • and, or, shift, etc
  • subunits
    • lofical operations
    • addition
    • multiplication and dividion
    • shifting
    • comparison
    • logical tests (if, >0, <0, =0, <=0, etc)

Control unit

  • coordinates the operation of the computer
  • generates control signals
    • connect registers to the bus
    • control the function of the ALU
    • provides timing signals to the system

allso associated with the decoding and executuion of instructions in a pipelined system

Registers

  • memory cells with names
  • hold data, instructions, or CPU status
  • various sizes, (8, 16, 32, or 64, or larger (512))
  • hold data typically the same width as memory words
  • registers for accessing memory typically the same with as the address bus

Special purpose registers

  • program counter
    • stores address of current instruction
  • accumulator
    • source of one of the operands
    • destination of the result
  • status flags
    • individaul bits store information about results of operations
      • result of last instruction was negative, zero, or postive
      • carry from most recent arithmetic operation
      • overflow occurred during the last instruction

CPU

Computer

Instructions

  • bit patterns
  • can be split into a number of fields
    • operation to be executed
    • the address in memory
    • which registers (or memory cells) to use as operands
    • where to place the result (registers or memory)

Stored program computer

Von Neumann Architecture

  • three key concepts
    • data and instructions are stored in a single read-write memory
    • contents of memory are addressable by location, without regard to the type of data contained
    • execution occurs in a sequential fashion, unless explicitly altered, from one instuction to the next
  • programs and data are the same thing
    • and so its possible to write soure code (data) and comile them into executables (programs) that can be loaded as data and then executed as programs

Early computers

motorola MC6809 CPU circuit diagram for 6809