RAW WAW WAR Tomasulo方法消除冲突

计算机系统结构 专栏收录该内容
2 篇文章 0 订阅

A hazard is created whenever there is a dependence between instructions, and they are close enough that the overlap caused by pipelining would change the order of access to an operand.

Consider two instructions i and j, with i occurring before j. The possible data hazards are:

RAW (read after write) - j tries to read a source before i writes it, so j incorrectly gets the old value. This is the most common type of hazard and the kind that we use forwarding to overcome.数据相关

WAW (write after write) - j tries to write an operand before it is written by i. The writes end up being performed in the wrong order, leaving the value written by i rather than the value written by j in the destination.输出相关

WAR (write after read) - j tries to write a destination before it is read by i , so i incorrectly gets the new value.反相关

输出相关和反相关构成名相关。

RAW冲突,写操作预约,改寄存器状态表,使得操作数无法被读取。
WAW冲突,由于指令是按照顺序流出的,当有多条指令写同一个寄存器的时候,后一个可以将前一个的写预约覆盖,最后一条留下的预约结果就是最后一条指令的。(注意:无论操作数是否就绪,流出后即进行写预约)
WAR冲突,寄存器换名,将寄存器换成保留站的标识,之后等保存站中操作完成,将数据流出到总线再传至换名的标识处。可以看出换名后对寄存器进行的任何操作都与换名处无关了,即保证了读取数据的时间节点正确。
(书P114)

与上文没什么关系
//Load指令的执行包括计算地址和从内存中读取数据。
Store指令的执行只包括计算地址。

  • 1
    点赞
  • 0
    评论
  • 1
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值