文学研究和计算机结合,[文学研究]计算机组织与系统结构 - 北京大学.ppt

[文学研究]计算机组织与系统结构 - 北京大学

复习: 三种数据冒险 数据冒险示例 复杂指令流水线 复杂按序指令流水线 延迟回写(Delay writeback)以确保所有操作到W级都具有相同的时延 写端口不可被复用(每个周期只有一条指令进入、一条指令流出) 指令按序提交,简化了精确中断的实现。 复杂指令流水线 何时可以安全地发射一条指令? 硬件策略:指令并行 为什么需要硬件在运行时支持? 在编译时有些相关情况不能真正判定 简化编译处理 针对某一机器产生的代码可以在另一机器上有效运行 核心思路:允许暂停之后的指令被处理 DIVDF0,F2,F4 ADDDF10,F0,F8 SUBDF12,F8,F14 允许乱序(out-of-order)执行 => 乱序完成 在1963年的CDC 6600机器中,ID段检测结构冒险和记分板(Scoreboard)数据 核心思路: 寄存器换名DIVDF0,F2,F4 DIVDF0,F2,F4 ADDDF10,F0,F8 ADDDF10,F0,F8 SUBDF0,F8,F14 SUBDF100,F8,F14 MULDF6,F10,F0 MULDF6,F10,F100 消除WAR和WAW冒险 支持按序发射指令的记分板技术Scoreboard for In-order Issues 硬件策略:指令并行(续一) 乱序执行 分解 ID段: 1.Issue—decode instructions, check for structural hazards 2.Read operands—wait until no data hazards, then read operands 只要指令同时满足上述两个条件,记分板就允许该指令执行,而无需等待前面的指令完成 CDC 6600: 按序发射 乱序执行 乱序提交(commit) ( 也就是完成[completion]) 记分板的含义 乱序完成 => WAR, WAW冒险? 对WAR的解决方案 排队等待操作以及它们操作数的拷贝 只在读操作段才读取寄存器 对WAW的解决方案,必须检测冒险:暂停等待到其他指令完成 在执行阶段可能有多个指令 => 设置多个执行部件或者流水化执行部件 记分板跟踪相关、状态或操作 记分板用四个流水段代替ID、EX、WB三段 记分板控制的四级 1.Issue—decode instructions & check for structural hazards (ID1) If a functional unit for the instruction is free and no other active instruction has the same destination register (WAW), the scoreboard issues the instruction to the functional unit and updates its internal data structure. If a structural or WAW hazard exists, then the instruction issue stalls, and no further instructions will issue until these hazards are cleared. 2.Read operands—wait until no data hazards, then read operands (ID2) A source operand is available if no earlier issued active instruction is going to write it, or if the register containing the operand is being written by a currently active functional unit. When the source operands are available, the scoreboard tells the functional unit to proceed to read the operands from the registers and begin execution. The scoreboard resolves RAW hazards dynamically in this step, and instructions may be sent into execution out of order. 记分板控制的四级(续一) 3.Execution—opera

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值