From 7458e17b2bf5b3c6f342731510f1be589851c3a0 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 3 May 2022 08:00:29 +0100 Subject: Add pipelining notes --- chapters/pipelining_notes.org | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 chapters/pipelining_notes.org (limited to 'chapters/pipelining_notes.org') diff --git a/chapters/pipelining_notes.org b/chapters/pipelining_notes.org new file mode 100644 index 0000000..0680800 --- /dev/null +++ b/chapters/pipelining_notes.org @@ -0,0 +1,57 @@ +A1 x18 = x6 + -1 (int) +R1 x16 = int32[x4 + x18 * 4 + 0] +M1 x8 = x16 * x1 +R2 x12 = int32[x3 + x6 * 4 + 0] +R3 x13 = int32[x2 + x6 * 4 + 0] +M2 x7 = x12 * x13 +A2 x11 = x8 + x7 + 0 (int) +W1 int32[x4 + x6 * 4 + 0] = x11 +A3 x6 = x6 + 1 (int) + +| N%3 | N%2 | N | Add1 | Add2 | Add3 | Mult1 | Mult2 | Mem1 | Mem2 | Mem3 | +|-----+-----+---+------+------+------+-------+-------+------+------+------| +| 0 | 0 | 0 | A1 | | | | | | R2 | R3 | +| 1 | 1 | 1 | | | | | | R1 | | | +| 2 | 0 | 2 | | | | | M2 | | | | +| 0 | 1 | 3 | | | | M1 | | | | | +| 1 | 0 | 4 | | A2 | | | | | | | +| 2 | 1 | 5 | | | A3 | | | W1 | | | + +| N | Add1 | Add2 | Add3 | Mult1 | Mult2 | Mem1 | Mem2 | Mem3 | +|---+------+--------+--------+--------+-------+--------+------+------| +| 0 | n:A1 | | | n-1:M1 | | | n:R2 | n:R3 | +| 1 | | n-1:A2 | | | | n:R1 | | | +| 2 | | | n-1:A3 | | n:M2 | n-1:W1 | | | + +| Instr | Stage | Code | +|-------+-------+----------------------------------------------------------------| +| 0 | 0 | ~x18 = x6 - 1~, ~x12 = int32[x3+x6*4]~, ~x13 = int32[x3+x6*4]~ | +| | 1 | ~x8 = x16 * x1~ | +| 1 | 0 | ~x16 = int32[x4+x18*4]~ | +| | 1 | ~x11 = x8 + x7~ | +| 2 | 0 | ~x7 = x12 * x13~ | +| | 1 | ~x6 = x6 + 1~, ~int32[x4+x6*4] = x11~ | + +| N%3 | N%2 | N | Add1 | Add2 | Add3 | Mult1 | Mult2 | Mem1 | Mem2 | Mem3 | +|-----+-----+---+------+------+------+-------+-------+------+------+------| +| 0 | 0 | 0 | A1 | | | | | | R2 | R3 | +| 1 | 1 | 1 | | | | | | R1 | | | +| 2 | 0 | 2 | | | | | M2 | | | | +| 0 | 1 | 3 | | | | M1 | | | | | +| 1 | 0 | 4 | | A2 | | | | | | | +| 2 | 1 | 5 | | | | | | | | | +| 0 | 0 | 6 | | | A3 | | | W1 | | | + +| N | Add1 | Add2 | Add3 | Mult1 | Mult2 | Mem1 | Mem2 | Mem3 | +|---+------+--------+--------+--------+--------+--------+------+------| +| 0 | n:A1 | n-2:A2 | n-3:A3 | | n-1:M2 | n-3:W1 | n:R2 | n:R3 | +| 1 | | | | n-1:M1 | | n:R1 | | | + +| Instr | Stage | Code | +|-------+-------+-------------------------------------------------------------------| +| 0 | 0 | ~x18 = x6 - 1~, ~x16 = int32[x4+x18*4+0]~, ~x12 = int32[x3+x6*4]~ | +| | 1 | ~x7 = x12 * x13~ | +| | 2 | ~x11 = x8 + x7~ | +| | 3 | ~x6 = x6 + 1~, ~int32[x4+x6*4] = x11~ | +| 1 | 0 | ~x16 = int32[x4+x18*4]~ | +| | 1 | ~x8 = x16 * x1~ | -- cgit