使用记分板的MIPS管道模拟器 [英] MIPS pipeline simulator using scoreboarding

查看:88
本文介绍了使用记分板的MIPS管道模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是模拟MIPS管道内衬的好方法?管道应该模拟向前还是向后?我很迷惑.我有指令集,我已经拆开了指令,但是我需要一些指导以进一步前进.

What should be a good approach to simulate MIPS pipe lining ? Like should pipeline simulates in forward direction or in backward direction ? I am confused. I have instruction set and i have disassembled the instructions but i need some direction to move further.

推荐答案

模拟向后"流水线阶段(例如,以相反的顺序,如写回,缓存,alu,寄存器,解码,提取)的优点是每个阶段都可以读取代表输入锁存器的变量,然后简单地覆盖代表输出锁存器的变量.如果您模拟管道前进",则此操作将不起作用,因为每个阶段都将覆盖下一个阶段的输入,并且原始输入将丢失.当然,如果在覆盖锁存器之前先复制它们,则可以按任意顺序模拟流水线阶段.因此,这只是次要的实现细节.一个完成此逆序技巧的简单MIPS模拟器是SimpleScalar.

The advantage of simulating the pipeline stages "backwards" (e.g. in reverse order like writeback, cache, alu, register, decode, fetch) is that each stage can read the variables that represent the input latches and then simply overwrite the variables that represent the output latches. This will not work if you simulate the pipeline "forward" because each stage would overwrite the input of the following stage and the original input would be lost. Of course, if you copy the latches before you overwrite them, you can simulate the pipeline stages in any order you want. So it's rather a minor implementation detail. A simple MIPS simulator that does this reverse order trick is SimpleScalar.

这篇关于使用记分板的MIPS管道模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆