Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一系列指令如下:
I1 lw $1, 40($6) I2 add $6, $2, $2 I3 sw $6, 50($1)
问题是:
在没有转发的基本五阶段管道中,I2 和 I3 之间应该有多少个 noop?
我认为数字是2,而书中给出的解决方案是1。我错过了什么吗?任何线索表示赞赏。
问题实际上是计算机组织和设计的练习 4.13,硬件/软件接口第四版。
好吧,如果您的管道中没有转发,则解决此冲突的唯一方法是使用两个noop。
1 2 3 4 5 6 7 8 9 I1 IF ID EX MEM WB I2 IF ID EX MEM [WB] NOP IF ID EX MEM WB NOP IF ID EX MEM WB I3 IF [ID] EX MEM WB
您可以从这张粗略的表格中清楚地看到,I2 的回写和 I3 的指令解码仅与两个 noops“对齐”。我认为你的教科书是错误的。