2222// M2 -> Values[4], M4 -> Values[5], M8 -> Values[6]
2323// Shorter lists are allowed, e.g., widening instructions don't work on M8
2424class GetLMULValue<list<int> Values, string LMUL> {
25- int Index = !cond(
25+ defvar Index = !cond(
2626 !eq(LMUL, "MF8"): 0,
2727 !eq(LMUL, "MF4"): 1,
2828 !eq(LMUL, "MF2"): 2,
@@ -47,11 +47,11 @@ class GetLMULValue<list<int> Values, string LMUL> {
4747// This is useful for modeling scheduling parameters that scale with LMUL.
4848class ConstValueUntilLMULThenDoubleBase<string startLMUL, int BaseValue, int Value, string currentLMUL> {
4949 assert !le(BaseValue, Value), "BaseValue must be le to Value";
50- int startPos = GetLMULValue<[0, 1, 2, 3, 4, 5, 6], startLMUL>.c;
51- int currentPos = GetLMULValue<[0, 1, 2, 3, 4, 5, 6], currentLMUL>.c;
50+ defvar startPos = GetLMULValue<[0, 1, 2, 3, 4, 5, 6], startLMUL>.c;
51+ defvar currentPos = GetLMULValue<[0, 1, 2, 3, 4, 5, 6], currentLMUL>.c;
5252
5353 // Calculate the difference in positions
54- int posDiff = !sub(currentPos, startPos);
54+ defvar posDiff = !sub(currentPos, startPos);
5555
5656 // Calculate Value * (2^posDiff) using shift left
5757 int c = !cond(
0 commit comments