Skip to content

mx-xn/301_pipeline_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Name: Maxine Xin

for testing, for each instruction i, we want to make sure if there is another instruction j that
reads from the register i writes to, there will be stalls. Also, the stall time unit caused will
vary depending on the distance of i and j, and if the distance between i and j gets large enough,
no stall will be caused; for the instruction jump, we want to make sure there is a control hazard
so one-unit stall will be caused

for each instruction i, there is a test input file constructed as the following:
inst #0: instruction i
inst #1: instruction j that has RAW with i
inst #2 - #5: dummy instructions filled in to make sure the effect caused by the stall goes away

inst #6: instruction i
inst #7: one instruction to separate i and j
inst #8: instruction j
inst #9 - #12: dummy instructions filled in to make sure the effect caused by the stall goes away

inst #13: instruction i
inst #14 - #15: two instructions filled in to keep i and j 2-instruction-distance from each other
inst #16 - 20: dummy instructions filled in to make sure the effect caused by the stall goes away

[ the ideal output for each instruction(except for jump) should be:
  in IDEAL: no stalls, so time unit = numInstructions + numStages - 1 = 21 + 5 - 1 = 25
  in STALL: 
    - when j immediately after i: 2 time unit stall
    - when j one instruction away from i: 1 time unit stall
    - when j two instruction away from i: no stall
    thus: total time unit = ideal total time unit + 2 + 1 = 28
  in FORWARDING:
    - for non_memory inst: same as IDEAL, since even if j is immediately after i, there won't be
      stalls since data is forwarded immediately from EXE to EXE;
    - for memory inst: when j is immediately after i, will have one-time unit stall, since the 
      data will be forwarded from MMR to EXE, so need to wait for one more round; but when i and j
      are one/two instructions away, no stall is present
    thus: for non_mmr: total time unit = ideal total time = 25
          for mmr:     total time unit = ideal total time + 1 = 26

  Note: the output for MULT should be different, as it is only writing to lo and hi but not rs, rt,
        or rd which could be read from for other instructions, so the total time for MULT in all
        three pipelines should be the same: 25
]

for instruction jump, the test is constructed as the following:
inst #0: jump instruction
inst #1 - #4: 4 other instructions

[  the ideal output for jump instruction test:
   in IDEAL: no stalls, so time unit = numInstructions + numStages - 1 = 5 + 5 - 1 = 9 
   in STALL: one time-unit stall, since cannot fetch next instruction before decode of jump ends,
             so total time = ideal time + 1 = 10
   in FORWARDING: same as in STALL, so total time = 10
]

All the original test outputs are summarized as the following, and they indeed are as expected:

        IDEAL  |  STALL  | FORWARDING
ADD:     25    |   28    |  25
ADDI:    25    |   28    |  25
J:       9     |   10    |  10
LB:      25    |   28    |  26
MFLO:    25    |   28    |  25
MULT:    25    |   25    |  25
SLT:     25    |   28    |  25
SLL:     25    |   28    |  25
SLTI:    25    |   28    |  25
XOR:     25    |   28    |  25


and the original ouputs can be found in the rest of the file: 
testADD.asm, testADD.mach:
IDEAL:
RAW Dependence between instruction 0 add $1, $9, $3 and 1 add $8, $1, $3
RAW Dependence between instruction 6 add $1, $9, $3 and 8 add $8, $1, $3
RAW Dependence between instruction 13 add $1, $9, $3 and 16 add $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|add $1, $9, $3
1	6			|add $8, $1, $3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|add $1, $9, $3
7	12			|xor $5, $3, $2
8	13			|add $8, $1, $3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|add $1, $9, $3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|add $8, $1, $3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
RAW Dependence between instruction 0 add $1, $9, $3 and 1 add $8, $1, $3
RAW Dependence between instruction 6 add $1, $9, $3 and 8 add $8, $1, $3
RAW Dependence between instruction 13 add $1, $9, $3 and 16 add $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|add $1, $9, $3
1	8			|add $8, $1, $3
2	9			|addi $4, $5, -10
3	10			|xor $5, $3, $2
4	11			|add $5, $2, $3
5	12			|add $6, $2, $3
6	13			|add $1, $9, $3
7	14			|xor $5, $3, $2
8	16			|add $8, $1, $3
9	17			|addi $4, $2, -10
10	18			|xor $5, $3, $2
11	19			|add $5, $2, $3
12	20			|add $6, $2, $3
13	21			|add $1, $9, $3
14	22			|xor $5, $3, $2
15	23			|add $5, $2, $3
16	24			|add $8, $1, $3
17	25			|addi $4, $2, -10
18	26			|xor $5, $3, $2
19	27			|add $5, $2, $3
20	28			|add $6, $2, $3
Total time is 28

FORWARDING:
RAW Dependence between instruction 0 add $1, $9, $3 and 1 add $8, $1, $3
RAW Dependence between instruction 6 add $1, $9, $3 and 8 add $8, $1, $3
RAW Dependence between instruction 13 add $1, $9, $3 and 16 add $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|add $1, $9, $3
1	6			|add $8, $1, $3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|add $1, $9, $3
7	12			|xor $5, $3, $2
8	13			|add $8, $1, $3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|add $1, $9, $3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|add $8, $1, $3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

testADDI.asm, testADDI.mach:
IDEAL:
RAW Dependence between instruction 0 addi $1, $9, 3 and 1 addi $8, $1, 3
RAW Dependence between instruction 6 addi $1, $9, 3 and 8 addi $8, $1, 3
RAW Dependence between instruction 13 addi $1, $9, 3 and 16 addi $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|addi $1, $9, 3
1	6			|addi $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|addi $1, $9, 3
7	12			|xor $5, $3, $2
8	13			|addi $8, $1, 3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|addi $1, $9, 3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|addi $8, $1, 3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
RAW Dependence between instruction 0 addi $1, $9, 3 and 1 addi $8, $1, 3
RAW Dependence between instruction 6 addi $1, $9, 3 and 8 addi $8, $1, 3
RAW Dependence between instruction 13 addi $1, $9, 3 and 16 addi $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|addi $1, $9, 3
1	8			|addi $8, $1, 3
2	9			|addi $4, $5, -10
3	10			|xor $5, $3, $2
4	11			|add $5, $2, $3
5	12			|add $6, $2, $3
6	13			|addi $1, $9, 3
7	14			|xor $5, $3, $2
8	16			|addi $8, $1, 3
9	17			|addi $4, $2, -10
10	18			|xor $5, $3, $2
11	19			|add $5, $2, $3
12	20			|add $6, $2, $3
13	21			|addi $1, $9, 3
14	22			|xor $5, $3, $2
15	23			|add $5, $2, $3
16	24			|addi $8, $1, 3
17	25			|addi $4, $2, -10
18	26			|xor $5, $3, $2
19	27			|add $5, $2, $3
20	28			|add $6, $2, $3
Total time is 28

FORWARDING:
RAW Dependence between instruction 0 addi $1, $9, 3 and 1 addi $8, $1, 3
RAW Dependence between instruction 6 addi $1, $9, 3 and 8 addi $8, $1, 3
RAW Dependence between instruction 13 addi $1, $9, 3 and 16 addi $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|addi $1, $9, 3
1	6			|addi $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|addi $1, $9, 3
7	12			|xor $5, $3, $2
8	13			|addi $8, $1, 3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|addi $1, $9, 3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|addi $8, $1, 3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

testJ.asm, testJ.mach:
IDEAL:
Instr# 	 CompletionTime 	 Mnemonic
0	5			|j label                              --[0x40000 here for testJ.mach]
1	6			|addi $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
Total time is 9

STALL:
Instr# 	 CompletionTime 	 Mnemonic
0	5			|j label                              --[0x40000 here for testJ.mach]
1	7			|addi $8, $1, 3
2	8			|addi $4, $5, -10
3	9			|xor $5, $3, $2
4	10			|add $5, $2, $3
Total time is 10

FORWARDING:
Instr# 	 CompletionTime 	 Mnemonic
0	5			|j label                              --[0x40000 here for testJ.mach]
1	7			|addi $8, $1, 3
2	8			|addi $4, $5, -10
3	9			|xor $5, $3, $2
4	10			|add $5, $2, $3
Total time is 10

testLB.asm, testLB.mach:
IDEAL:
RAW Dependence between instruction 0 lb $1, -3($9) and 1 lb $8, 3($1)
RAW Dependence between instruction 6 lb $1, -3($9) and 8 lb $8, 3($1)
RAW Dependence between instruction 13 lb $1, -3($9) and 16 lb $8, 3($1)
Instr# 	 CompletionTime 	 Mnemonic
0	5			|lb $1, -3($9)
1	6			|lb $8, 3($1)
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|lb $1, -3($9)
7	12			|xor $5, $3, $2
8	13			|lb $8, 3($1)
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|lb $1, -3($9)
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|lb $8, 3($1)
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
RAW Dependence between instruction 0 lb $1, -3($9) and 1 lb $8, 3($1)
RAW Dependence between instruction 6 lb $1, -3($9) and 8 lb $8, 3($1)
RAW Dependence between instruction 13 lb $1, -3($9) and 16 lb $8, 3($1)
Instr# 	 CompletionTime 	 Mnemonic
0	5			|lb $1, -3($9)
1	8			|lb $8, 3($1)
2	9			|addi $4, $5, -10
3	10			|xor $5, $3, $2
4	11			|add $5, $2, $3
5	12			|add $6, $2, $3
6	13			|lb $1, -3($9)
7	14			|xor $5, $3, $2
8	16			|lb $8, 3($1)
9	17			|addi $4, $2, -10
10	18			|xor $5, $3, $2
11	19			|add $5, $2, $3
12	20			|add $6, $2, $3
13	21			|lb $1, -3($9)
14	22			|xor $5, $3, $2
15	23			|add $5, $2, $3
16	24			|lb $8, 3($1)
17	25			|addi $4, $2, -10
18	26			|xor $5, $3, $2
19	27			|add $5, $2, $3
20	28			|add $6, $2, $3
Total time is 28

FORWARDING:
RAW Dependence between instruction 0 lb $1, -3($9) and 1 lb $8, 3($1)
RAW Dependence between instruction 6 lb $1, -3($9) and 8 lb $8, 3($1)
RAW Dependence between instruction 13 lb $1, -3($9) and 16 lb $8, 3($1)
Instr# 	 CompletionTime 	 Mnemonic
0	5			|lb $1, -3($9)
1	7			|lb $8, 3($1)
2	8			|addi $4, $5, -10
3	9			|xor $5, $3, $2
4	10			|add $5, $2, $3
5	11			|add $6, $2, $3
6	12			|lb $1, -3($9)
7	13			|xor $5, $3, $2
8	14			|lb $8, 3($1)
9	15			|addi $4, $2, -10
10	16			|xor $5, $3, $2
11	17			|add $5, $2, $3
12	18			|add $6, $2, $3
13	19			|lb $1, -3($9)
14	20			|xor $5, $3, $2
15	21			|add $5, $2, $3
16	22			|lb $8, 3($1)
17	23			|addi $4, $2, -10
18	24			|xor $5, $3, $2
19	25			|add $5, $2, $3
20	26			|add $6, $2, $3
Total time is 26

testMFLO.asm, testMFLO.mach:
IDEAL:
RAW Dependence between instruction 0 mflo $1 and 1 addi $8, $1, 3
RAW Dependence between instruction 6 mflo $1 and 8 addi $8, $1, 3
RAW Dependence between instruction 13 mflo $1 and 16 addi $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|mflo $1
1	6			|addi $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|mflo $1
7	12			|xor $5, $3, $2
8	13			|addi $8, $1, 3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|mflo $1
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|addi $8, $1, 3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
RAW Dependence between instruction 0 mflo $1 and 1 addi $8, $1, 3
RAW Dependence between instruction 6 mflo $1 and 8 addi $8, $1, 3
RAW Dependence between instruction 13 mflo $1 and 16 addi $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|mflo $1
1	8			|addi $8, $1, 3
2	9			|addi $4, $5, -10
3	10			|xor $5, $3, $2
4	11			|add $5, $2, $3
5	12			|add $6, $2, $3
6	13			|mflo $1
7	14			|xor $5, $3, $2
8	16			|addi $8, $1, 3
9	17			|addi $4, $2, -10
10	18			|xor $5, $3, $2
11	19			|add $5, $2, $3
12	20			|add $6, $2, $3
13	21			|mflo $1
14	22			|xor $5, $3, $2
15	23			|add $5, $2, $3
16	24			|addi $8, $1, 3
17	25			|addi $4, $2, -10
18	26			|xor $5, $3, $2
19	27			|add $5, $2, $3
20	28			|add $6, $2, $3
Total time is 28

FORWARDING:
RAW Dependence between instruction 0 mflo $1 and 1 addi $8, $1, 3
RAW Dependence between instruction 6 mflo $1 and 8 addi $8, $1, 3
RAW Dependence between instruction 13 mflo $1 and 16 addi $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|mflo $1
1	6			|addi $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|mflo $1
7	12			|xor $5, $3, $2
8	13			|addi $8, $1, 3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|mflo $1
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|addi $8, $1, 3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

testMULT.asm, testMULT.mach:
IDEAL:
Instr# 	 CompletionTime 	 Mnemonic
0	5			|mult $1, $9
1	6			|mult $8, $1
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|mult $1, $9
7	12			|xor $5, $3, $2
8	13			|mult $8, $1
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|mult $1, $9
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|mult $8, $1
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
Instr# 	 CompletionTime 	 Mnemonic
0	5			|mult $1, $9
1	6			|mult $8, $1
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|mult $1, $9
7	12			|xor $5, $3, $2
8	13			|mult $8, $1
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|mult $1, $9
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|mult $8, $1
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

FORWARDING:
Instr# 	 CompletionTime 	 Mnemonic
0	5			|mult $1, $9
1	6			|mult $8, $1
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|mult $1, $9
7	12			|xor $5, $3, $2
8	13			|mult $8, $1
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|mult $1, $9
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|mult $8, $1
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

testSLT.asm, testSLT.mach:
IDEAL:
RAW Dependence between instruction 0 slt $1, $9, $3 and 1 slt $8, $1, $3
RAW Dependence between instruction 6 slt $1, $9, $3 and 8 slt $8, $1, $3
RAW Dependence between instruction 13 slt $1, $9, $3 and 16 slt $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|slt $1, $9, $3
1	6			|slt $8, $1, $3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|slt $1, $9, $3
7	12			|xor $5, $3, $2
8	13			|slt $8, $1, $3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|slt $1, $9, $3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|slt $8, $1, $3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
RAW Dependence between instruction 0 slt $1, $9, $3 and 1 slt $8, $1, $3
RAW Dependence between instruction 6 slt $1, $9, $3 and 8 slt $8, $1, $3
RAW Dependence between instruction 13 slt $1, $9, $3 and 16 slt $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|slt $1, $9, $3
1	8			|slt $8, $1, $3
2	9			|addi $4, $5, -10
3	10			|xor $5, $3, $2
4	11			|add $5, $2, $3
5	12			|add $6, $2, $3
6	13			|slt $1, $9, $3
7	14			|xor $5, $3, $2
8	16			|slt $8, $1, $3
9	17			|addi $4, $2, -10
10	18			|xor $5, $3, $2
11	19			|add $5, $2, $3
12	20			|add $6, $2, $3
13	21			|slt $1, $9, $3
14	22			|xor $5, $3, $2
15	23			|add $5, $2, $3
16	24			|slt $8, $1, $3
17	25			|addi $4, $2, -10
18	26			|xor $5, $3, $2
19	27			|add $5, $2, $3
20	28			|add $6, $2, $3
Total time is 28

FORWARDING:
RAW Dependence between instruction 0 slt $1, $9, $3 and 1 slt $8, $1, $3
RAW Dependence between instruction 6 slt $1, $9, $3 and 8 slt $8, $1, $3
RAW Dependence between instruction 13 slt $1, $9, $3 and 16 slt $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|slt $1, $9, $3
1	6			|slt $8, $1, $3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|slt $1, $9, $3
7	12			|xor $5, $3, $2
8	13			|slt $8, $1, $3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|slt $1, $9, $3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|slt $8, $1, $3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

testSLL.asm, testSLL.mach:
IDEAL:
RAW Dependence between instruction 0 sll $1, $9, 5 and 1 sll $8, $1, 3
RAW Dependence between instruction 6 sll $1, $9, 5 and 8 sll $8, $1, 3
RAW Dependence between instruction 13 sll $1, $9, 5 and 16 sll $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|sll $1, $9, 5
1	6			|sll $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|sll $1, $9, 5
7	12			|xor $5, $3, $2
8	13			|sll $8, $1, 3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|sll $1, $9, 5
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|sll $8, $1, 3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
RAW Dependence between instruction 0 sll $1, $9, 5 and 1 sll $8, $1, 3
RAW Dependence between instruction 6 sll $1, $9, 5 and 8 sll $8, $1, 3
RAW Dependence between instruction 13 sll $1, $9, 5 and 16 sll $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|sll $1, $9, 5
1	8			|sll $8, $1, 3
2	9			|addi $4, $5, -10
3	10			|xor $5, $3, $2
4	11			|add $5, $2, $3
5	12			|add $6, $2, $3
6	13			|sll $1, $9, 5
7	14			|xor $5, $3, $2
8	16			|sll $8, $1, 3
9	17			|addi $4, $2, -10
10	18			|xor $5, $3, $2
11	19			|add $5, $2, $3
12	20			|add $6, $2, $3
13	21			|sll $1, $9, 5
14	22			|xor $5, $3, $2
15	23			|add $5, $2, $3
16	24			|sll $8, $1, 3
17	25			|addi $4, $2, -10
18	26			|xor $5, $3, $2
19	27			|add $5, $2, $3
20	28			|add $6, $2, $3
Total time is 28

FORWARDING:
RAW Dependence between instruction 0 sll $1, $9, 5 and 1 sll $8, $1, 3
RAW Dependence between instruction 6 sll $1, $9, 5 and 8 sll $8, $1, 3
RAW Dependence between instruction 13 sll $1, $9, 5 and 16 sll $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|sll $1, $9, 5
1	6			|sll $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|sll $1, $9, 5
7	12			|xor $5, $3, $2
8	13			|sll $8, $1, 3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|sll $1, $9, 5
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|sll $8, $1, 3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

testSLTI.asm, testSLTI.mach:
IDEAL:
RAW Dependence between instruction 0 slti $1, $9, -3 and 1 slti $8, $1, 3
RAW Dependence between instruction 6 slti $1, $9, -3 and 8 slti $8, $1, 3
RAW Dependence between instruction 13 slti $1, $9, -3 and 16 slti $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|slti $1, $9, -3
1	6			|slti $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|slti $1, $9, -3
7	12			|xor $5, $3, $2
8	13			|slti $8, $1, 3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|slti $1, $9, -3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|slti $8, $1, 3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
RAW Dependence between instruction 0 slti $1, $9, -3 and 1 slti $8, $1, 3
RAW Dependence between instruction 6 slti $1, $9, -3 and 8 slti $8, $1, 3
RAW Dependence between instruction 13 slti $1, $9, -3 and 16 slti $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|slti $1, $9, -3
1	8			|slti $8, $1, 3
2	9			|addi $4, $5, -10
3	10			|xor $5, $3, $2
4	11			|add $5, $2, $3
5	12			|add $6, $2, $3
6	13			|slti $1, $9, -3
7	14			|xor $5, $3, $2
8	16			|slti $8, $1, 3
9	17			|addi $4, $2, -10
10	18			|xor $5, $3, $2
11	19			|add $5, $2, $3
12	20			|add $6, $2, $3
13	21			|slti $1, $9, -3
14	22			|xor $5, $3, $2
15	23			|add $5, $2, $3
16	24			|slti $8, $1, 3
17	25			|addi $4, $2, -10
18	26			|xor $5, $3, $2
19	27			|add $5, $2, $3
20	28			|add $6, $2, $3
Total time is 28

FORWARDING:
RAW Dependence between instruction 0 slti $1, $9, -3 and 1 slti $8, $1, 3
RAW Dependence between instruction 6 slti $1, $9, -3 and 8 slti $8, $1, 3
RAW Dependence between instruction 13 slti $1, $9, -3 and 16 slti $8, $1, 3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|slti $1, $9, -3
1	6			|slti $8, $1, 3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|slti $1, $9, -3
7	12			|xor $5, $3, $2
8	13			|slti $8, $1, 3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|slti $1, $9, -3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|slti $8, $1, 3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

testXOR.asm, testXOR.mach:
IDEAL:
RAW Dependence between instruction 0 xor $1, $9, $3 and 1 xor $8, $1, $3
RAW Dependence between instruction 6 xor $1, $9, $3 and 8 xor $8, $1, $3
RAW Dependence between instruction 13 xor $1, $9, $3 and 16 xor $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|xor $1, $9, $3
1	6			|xor $8, $1, $3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|xor $1, $9, $3
7	12			|xor $5, $3, $2
8	13			|xor $8, $1, $3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|xor $1, $9, $3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|xor $8, $1, $3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

STALL:
RAW Dependence between instruction 0 xor $1, $9, $3 and 1 xor $8, $1, $3
RAW Dependence between instruction 6 xor $1, $9, $3 and 8 xor $8, $1, $3
RAW Dependence between instruction 13 xor $1, $9, $3 and 16 xor $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|xor $1, $9, $3
1	8			|xor $8, $1, $3
2	9			|addi $4, $5, -10
3	10			|xor $5, $3, $2
4	11			|add $5, $2, $3
5	12			|add $6, $2, $3
6	13			|xor $1, $9, $3
7	14			|xor $5, $3, $2
8	16			|xor $8, $1, $3
9	17			|addi $4, $2, -10
10	18			|xor $5, $3, $2
11	19			|add $5, $2, $3
12	20			|add $6, $2, $3
13	21			|xor $1, $9, $3
14	22			|xor $5, $3, $2
15	23			|add $5, $2, $3
16	24			|xor $8, $1, $3
17	25			|addi $4, $2, -10
18	26			|xor $5, $3, $2
19	27			|add $5, $2, $3
20	28			|add $6, $2, $3
Total time is 28

FORWARDING:
RAW Dependence between instruction 0 xor $1, $9, $3 and 1 xor $8, $1, $3
RAW Dependence between instruction 6 xor $1, $9, $3 and 8 xor $8, $1, $3
RAW Dependence between instruction 13 xor $1, $9, $3 and 16 xor $8, $1, $3
Instr# 	 CompletionTime 	 Mnemonic
0	5			|xor $1, $9, $3
1	6			|xor $8, $1, $3
2	7			|addi $4, $5, -10
3	8			|xor $5, $3, $2
4	9			|add $5, $2, $3
5	10			|add $6, $2, $3
6	11			|xor $1, $9, $3
7	12			|xor $5, $3, $2
8	13			|xor $8, $1, $3
9	14			|addi $4, $2, -10
10	15			|xor $5, $3, $2
11	16			|add $5, $2, $3
12	17			|add $6, $2, $3
13	18			|xor $1, $9, $3
14	19			|xor $5, $3, $2
15	20			|add $5, $2, $3
16	21			|xor $8, $1, $3
17	22			|addi $4, $2, -10
18	23			|xor $5, $3, $2
19	24			|add $5, $2, $3
20	25			|add $6, $2, $3
Total time is 25

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors