Tags: 0mega28/CPU-Simulator
Tags
Don't use time for checking WAR in retire stage In actual scoreboarding implementation acording to wikipedia time is not checked for checking WAR. fix #8
Use time of issue of instr instead of idx WAR should be checked by time of issue instead of idx Before write_back time of issue of current instr should be checked with branch instr time of issue flush of fu after branch taken should be done by time of issue of instr for eg label1: BEQZ R1 label2 SUB R1 R2 #1 JMP label1 label2: If SUB instr is in execute stage and in next cycles decode stage JMP instruction modifies PC to fetch BEQZ instr in next cycle, then SUB instr won't retire if idx is checked by above two condition. hence, time var is better way of checking WAR and other cases described above. fix #5
utils.hpp: Add DMY operand in op_enum also DMY is initialised with -1 so, the code change is backwards compatible since we are not changing values of other enum members