Computer Architecture

Aronkk

1. Digital Logic

  • n-type: connect to GND, turn on (with 1) to pull down to 0
  • p-type: connect to +2.9V, turn on (with 0) to pull up to 1
  • 不用 CMOS,仅用 n-type 或 p-type(用电阻代替另一端)就能实现单个 NOT Gate,但是电阻的电流热效应是不可忽略的,并且电阻充放电需要时间
  • Floating Point 参考 Kinnari 的笔记

2. Computer Organization and ISA

  • Von Neumann Model: Von Neumann Model
  • 关于控制指令:
    • jumps are unconditional — they always change the PC
    • branches are conditional — they change the PC only if some condition is true (e.g., the result of an ADD is zero)

3. LC-3

  • 当通用寄存器 (R0~R7) 写入数据时更新 condition code NZP(以下简称 cc)

    ℹ️ 在第三版教材中,规定 LEA(加载有效地址)访问了 register 但不更新 cc

  • PCoffset9 中的 PC 是下一条指令的地址
  • TRAP 指令和 JMP 指令的区别:
    1. TRAP 类似于函数调用,执行完 OS 代码后会跳转回来
    2. TRAP 对地址做了封装,用户寄存器只能通过相应编号调用功能(例如 x21)

4. Assembly Programming

  • 二进制移位操作:乘2左移,除2右移
  • R0[7:0] is for trap codes IN, OUT and GETC

5. I/O and Trap