File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 26
26
27
27
### CPU
28
28
29
- > 建议不是学有余力的同学别折腾流水线这些高级一点的实现 ,这里的实现已经很清楚了。
29
+ > 建议不是学有余力的同学别增加流水线这些高级一点的实现 ,这里的实现已经很清楚了。
30
30
31
- ![ image-20211019161253689] (/Users/wocaibujiaoquanmei/iCloud 云盘(归档)/GitHub/ nand2tetris/Images/CPU_implementation.png)
31
+ ![ image-20211019161253689] ( https://github.com/coderhare/ nand2tetris/blob/main /Images/CPU_implementation.png)
32
32
33
33
** CPU的内部结构** :
34
34
42
42
43
43
** A指令**
44
44
45
- ![ image-20211019163722056] (/Users/wocaibujiaoquanmei/iCloud 云盘(归档)/GitHub/ nand2tetris/Images/A_insturction.png)
45
+ ![ image-20211019163722056] ( https://github.com/coderhare/ nand2tetris/blob/main /Images/A_insturction.png)
46
46
47
47
48
48
49
49
** C指令**
50
50
51
51
将` instruction ` 的各个位域分解到对应的C指令位域
52
52
53
- ![ image-20211019163829392] (/Users/wocaibujiaoquanmei/iCloud 云盘(归档)/GitHub/ nand2tetris/Images/C_instruction2.png)
53
+ ![ image-20211019163829392] ( https://github.com/coderhare/ nand2tetris/blob/main /Images/C_instruction2.png)
54
54
55
- <img src =" /Users/wocaibujiaoquanmei/iCloud 云盘(归档)/GitHub/ nand2tetris/Images/C_instruction.png" style = " zoom : 50 % ; " />
55
+ <img src =" https://github.com/coderhare/ nand2tetris/blob/main/ Images/C_instruction.png" />
56
56
57
57
要先区分好` C指令 ` 和` A指令 ` 然后再进行处理,** 要保证ALU标志位在A指令时不使输出发生变化,否则将导致产生奇怪的输出,因为ALU的6个标志位产生的64种情况都有对应输出,对于表上不存在的映射,是未定义行为,比方说我就得到过-2的奇怪数值。**
58
58
59
59
(实际上PPT上的内容已经很详细了,一定要去看看!)
60
60
61
61
为了区分` A指令 ` 和` C指令 ` ,在硬件层面需要处理的数值计算不做详细叙述,因为架构和思路已经说完了,剩下的工作应当是很简单的。感兴趣可以看看源码。
62
62
63
- [ 源码文件夹] ( )
63
+ [ 源码文件夹] ( https://github.com/coderhare/nand2tetris/tree/main/Documents/Code/05 )
64
64
65
65
66
66
70
70
71
71
非常简单的连线,按着这个图做即可,代码很短
72
72
73
- ![ image-20211019164730890] (/Users/wocaibujiaoquanmei/iCloud 云盘(归档)/GitHub/ nand2tetris/Images/CHIP_COMPUTER.png)
73
+ ![ image-20211019164730890] ( https://github.com/coderhare/ nand2tetris/blob/main /Images/CHIP_COMPUTER.png)
You can’t perform that action at this time.
0 commit comments