[Libre-soc-dev] sv.mv x: the instruction from hell

lkcl luke.leighton at gmail.com
Sat Jun 4 00:46:14 BST 2022


an explanation of the subject line: mv.x is the worst idea ever for scalar ISAs:

    GPR(RT) = GPR(GPR(RA))

which puts the entire regfile as both a RaW and a WaR hazard, basically locking up all instructions whilst this one is in progress.  traditional Vector ISAs do not suffer the same fate because the indices are contained within one single Vector Reg.

i have an idea which will avoid the hazards by completely cheating: move the lookup indices to a REMAP schedule.  this becomes incredibly powerful because the index lookups can apply to anything, not just mv.

    def remap(i):
        return GPR(i)

where the normal SV loop is:

    for i in range(VL):
          GPR(RT+remap1(i)) = op(GPR(RA+remap2(i)...)

by setting the rule that the Hazards are *NOT* to be observed, during the usage of this type of remap, all of the problems go away.

thoughts appreciated.

l.


More information about the Libre-soc-dev mailing list