要复制cpu.out
下面显示的文件(尽管没有我的评论),
请使用 thiscpu.hdl
,它通过了所有测试。
现在,我的问题是,在时钟周期 3+、4 和 4+。请注意,DRegise
(D 寄存器)没有更新,尽管命令是“D=AD”,这是为什么呢?
|time| inM | instruction |reset| outM |writeM |addre| pc |DRegiste|
a-instruc | store the number "12345"
|0+ | 0|0011000000111001| 0 | 0| 0 | 0| 0| 0 |
|1 | 0|0011000000111001| 0 | 0| 0 |12345| 1| 0 |
c-instru | comp: "A" | dest: "D" | jump: "no jump" | "D=A"
|1+ | 0|1110110000010000| 0 | 12345| 0 |12345| 1| 12345 |
|2 | 0|1110110000010000| 0 | 12345| 0 |12345| 2| |
a-instruc | "23456"
|2+ | 0|0101101110100000| 0 | -1| 0 |12345| 2| 12345 |
|3 | 0|0101101110100000| 0 | -1| 0 |23456| 3| 12345 |
c-instruc | comp: "A-D" | dest: "D" | jump: "no jump" | "D=A-D"
|3+ | 0|1110000111010000| 0 | 11111| 0 |23456| 3| 11111 |
|4 | 0|1110000111010000| 0 | 12345| 0 |23456| 4| 11111 |
a-instruc | "1000" WHY DREGISTE NOT CHANGE? v^v^
|4+ | 0|0000001111101000| 0 | -11111| 0 |23456| 4| 11111 |
|5 | 0|0000001111101000| 0 | -11111| 0 | 1000| 5| 11111 |