+++ title = "Software pipelining needs MVE" author = "Yann Herklotz" tags = [] categories = [] backlinks = ["3c2", "1c6a"] forwardlinks = ["2b2", "1c6c"] zettelid = "1c6b" +++ Modulo variable expansion (MVE) is needed because sometimes the lifetimes of variables exceed the II, meaning they get overwritten after II clock cycles even though they are needed afterwards. This is because the next iteration of the loop is already executing and overwriting the previous value of the register that was stored there. Hardware support for rotating registers ([\#2b2]) could prevent this from happening, otherwise, modulo variable expansion needs to be added to have the correct lifetimes for each variable. For example, if the II is 3 and the maximum lifetime of a variable is 12 cycles, then the loop needs to be unrolled 4 times, as after 12 cycles the initial register can finally be reused. Otherwise, a new register needs to be used for each value. [\#2b2]: /zettel/2b2