Lecture 1

Logical board - Composed of integrated circuits in an iPad

  • CPU (Processor)
    • data path 数据通路
    • control 控制通路
  • Flash (Memory)
    • Volatile
      • DRAM
      • SRAM
    • Nonvolatile
      • Solid state memory, flash memory
      • Magnetic disk
  • Power controller
  • I/O controller

Computer Organization

  1. Software
    1. Application software
    2. System Software
      1. Operation System (OS)
      2. Compiler :GCC
      3. Firmware (Driver software)
  2. Hardware
    1. CPU
      1. Control unit
      2. Data Path
        1. path: mux
        2. ALU
        3. Registers
    2. Memory
    3. I/O interface
      1. input: keyboard
      2. Output: LCD

From a High-Level Language to the Language of Hardware

ISA is the interface btw hardware and lowest level-software

How to build a processor?

晶圆切片、划线、光刻印电路、检查、封装

良率 Yield: proportion of working dies per wafer $Yield=\frac{1}{(1+(defects\ per area \times die\ area/2))^2}$

比较计算机的“好坏” Performance

Response time and Throughput 反应时间和吞吐量

  1. Response time : how long it takes to do a task. 反应时间是指做一个任务要花多久(网速)
  2. Throughput : total work executed per unit time. 吞吐率是指同一时间能做多少任务(带宽)

Relative Performance 相对性能

define: performance:=1/execution time. 性能是执行时间的倒数

Measuring Execution time

  1. Elapsed time :
    total response time, IO included 总体响应时间,包含IO的部分

  2. CPU time :

    不包含IO的时间

    = Clock Cycles (一共多少时钟周期) / Clock Rate(一秒钟多少时钟周期CPU主频)= 多少秒 = CPU时间

  3. Instruction count:
    Clock Cycle多少周期=Instruction count多少指令 * Cycles Per Instruction (CPI)一个指令占几个周期
    So, $\mathbf{CPU time=\frac{InstructionCount\times CPI}{Clock Rate}}$

  4. $\mathbf{Power=Capability\times Voltage^2\times Frequency}$

SPEC CPU Benchmark

衡量计算机计算性能的程序