MIPS pipeline simulator using scoreboarding

☆樱花仙子☆ 提交于 2019-12-10 19:05:46

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/22955154/mips-pipeline-simulator-using-scoreboarding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!