第 1 周¶
CPU 的执行¶
- Fetch
- Instruction decoding and Read Operand
- Exec Control
- Memory Access
- Write results to register
- Modify PC
单纯的多周期?¶
- 指令时间仍然更长了
- 但是……能否重新设计 CPU?
- 流水线?
指令集的设计¶
ISA 的分类¶
内部存储有这些类型:
- 栈
- 累加器
- 寄存器
寄存器方面(GPR 分类):
- Memory-memory architecture,存储器就是寄存器……好慢,现在已经不使用了。
- Register-memory architecture,啥指令都能访问存储器。
- Register-register architecture,必须要 load 和 store 才能访问存储器。
D = A * B - (A + C * B)
栈:
累加器:
R-M:
内存与地址¶
长度¶
- 1 byte = 8 bits
- 1 half word = 16 bits
- 1 word = 32 bits
- 1 double word = 64 bits
存储顺序¶
大端序:高位的数据会存在低的地址。
小端序:低位的数据会存在低的地址。