summaryrefslogtreecommitdiffstats
path: root/content/zettel/1c6b.md
blob: a20fe015c8966a89aa36c36f9c66c6e89feedf3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
+++
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