#Computer-Science#CS250#Hardware

Main Computer Architectures

There are two main computer architecture types

Harvard Architecture

  • Dedicated instruction memory
  • Dedicated data memory
  • Processor knows bit strings of instructions from data

Von Neumann Architecture

  • One memory for both data and program
  • Can only access memory one item at a time, can’t get both data and instructions at same time

What is a processor?

  • General purpose processor
  • Building hardware is expensive, so we like to have a generic processor that can be used for a lot of things
  • Doesn’t make sense to build one processor for each problem, instead we make one general one and make a LOT of them
  • Early electrical computers were just wall mounted circuits with wires connecting things.
  • Design of a general purpose processor
    • Using collections of bit strings machine instructions to represent programs
    • Store machine instructions in memory
    • Then fetch a given machine instruction when needed for the next program step

How fast do things run on a processor?

Clock rate, instruction rate, and time

  • Clock rate is upper bound by the worst case circuit propagation delay
    • Registers and mux/demux delays
    • ALU propagation delay
      • Can vary significantly among function circuits
      • Often complex functions have many circuit designs with very different costs
    • We don’t want to clock faster than the worst case. That way all instructions are guaranteed to finish before the next instruction
  • Time to execute a benchmark program
    • Clock cycles per instruction depends on compiler and circuit design (both software and hardware)
    • Seconds per clock cycle is set by the worst case propagation delay (hardware only)

Starting/Stopping a Processor

  • Hardware isn’t designed to stop
  • Software must be designed to always provide a machine instruction
  • In a dedicated system, applications usually run endlessly (think like your microwave, it always is doing something inside)
  • For a general purpose computer, the operating system contains an idle loop to run when no other process is ready to run
  • OS always has an infinite loop to keep the hardware running

Starting a processor

  • Method is hardware dependent
    • Typically begins with a power or reset of latches to force them to a known state
    • How software starts depends on the memory
  • Process is called bootstrapping
  • Result is that dedicated application or OS running
  • BIOS - basic input output system
  • When hardware receives power it resets and runs the thing at memory address 0, which is the BIOS which then tells the computer what it should actually do
  • Every time the computer starts it has a mini panic attack before the circuit tells it to check the BIOS instead of just doing stuff and that gives it proper instructions to do things