diff --git a/cs672/2-bit binary counter.circuit b/cs672/2-bit binary counter.circuit new file mode 100644 index 0000000..48ee4c9 --- /dev/null +++ b/cs672/2-bit binary counter.circuit @@ -0,0 +1,128 @@ + + + 1.63 2006/05/25 + Sun May 10 20:06:18 2009 + Sun May 10 20:06:18 2009 + + + + net1 + 61 + 62 + 310:120,330:120,330:120,340:120 + 500:120,520:120,530:120 + 260:180,460:150 + 330:120,340:110 + 520:70,520:110,530:110 + 520:120,520:110 + 520:70,400:70,140:70,140:110,180:110 + 460:120,450:120 + 400:70,400:120,410:120 + 240:150,270:150 + 130:210,140:210,260:210,260:180 + 240:150,200:170,140:170,140:210 + 180:130,100:130,100:90,330:90,330:120 + 220:130,270:120 + + osc1 + 8 + 2 + + + d2 + 5 + 1 + 32 + 33 + + + d4 + 5 + 1 + 42 + 43 + + + led4 + + + led5 + + + out2 + + + out3 + + + inv3 + + + + xor1 + + + 330:120 + + + 520:110 + 520:120 + + + 520:70 + + + 400:70 + + + 260:180 + + + 140:210 + 240:150 + + + 330:120 + + + 340:120 + 310:120 + + + 530:120 + 500:120 + + + 460:150 + + + 340:110 + + + 530:110 + + + 180:110 + + + 460:120 + 450:120 + + + 410:120 + + + 270:150 + + + 130:210 + + + 180:130 + + + 270:120 + 220:130 + + + diff --git a/cs672/ILP-example1.s b/cs672/ILP-example1.s new file mode 100644 index 0000000..59413de --- /dev/null +++ b/cs672/ILP-example1.s @@ -0,0 +1,11 @@ + addi r1, r0, #32 ; initialize loop counter +Loop: ld f0, 0(r1) ; get value from M into f0 + addd f4, f0, f2 ; add to scalar in f2, result into f4 + sd 0(r1), f4 ; store result back into M + subi r1, r1, #8 ; decrement array pointer + bnez r1, Loop ; branch if not done + nop + nop + nop + nop + trap #0 diff --git a/cs672/Pipe-example1.s b/cs672/Pipe-example1.s new file mode 100644 index 0000000..7383893 --- /dev/null +++ b/cs672/Pipe-example1.s @@ -0,0 +1,11 @@ + lw r1, 0(r2) ; r1 <- M[0+r2] + sub r3, r4, r5 ; r3 <- r4 - r5 + and r6, r7, r8 ; r6 <- r7 AND r8 + or r9, r10, r11 ; r9 <- r10 OR r11 + and r12, r13, r14 ; r12 <- r13 AND r14 + nop + nop + nop + nop + trap #0 + diff --git a/cs672/Pipe-example2.s b/cs672/Pipe-example2.s new file mode 100644 index 0000000..364d19e --- /dev/null +++ b/cs672/Pipe-example2.s @@ -0,0 +1,11 @@ + lw r1, 0(r2) + sub r3, r4, r5 + and r6, r3, r7 + or r8, r9, r3 + and r10, r11, r12 + nop + nop + nop + nop + trap #0 + diff --git a/cs672/Pipe-example3.s b/cs672/Pipe-example3.s new file mode 100644 index 0000000..c36a3f5 --- /dev/null +++ b/cs672/Pipe-example3.s @@ -0,0 +1,10 @@ + lw r1, 0(r2) + add r3, r4, r5 + and r6, r7, r8 + xor r9, r10, r11 + add r12, r13, r3 + nop + nop + nop + nop + trap #0 diff --git a/cs672/Pipe-example4.s b/cs672/Pipe-example4.s new file mode 100644 index 0000000..4d345df --- /dev/null +++ b/cs672/Pipe-example4.s @@ -0,0 +1,9 @@ + lw r1, 0(r2) + add r3, r1, r4 + and r5, r1, r6 + or r7, r1, r8 + nop + nop + nop + nop + trap #0 diff --git a/cs672/Pipe-example5.s b/cs672/Pipe-example5.s new file mode 100644 index 0000000..1d84288 --- /dev/null +++ b/cs672/Pipe-example5.s @@ -0,0 +1,17 @@ + add r4, r0, r0 ; clear R4 = 0 + add r5, r0, r0 ; clear R5 = 0 + + addi r1, r0, 5 ; set R1 (loop counter) = 5 + +LOOP: subi r1, r1, 1 ; decrement R1 + addi r4, r4, 2 ; R4 = R4 + 2 + addi r5, r5, 10 ; R5 = R5 + 10 + bnez r1, LOOP ; if (r1 != 0), goto LOOP + nop + add r6, r4, r5 ; R6 = R4 + R5 + + nop + nop + nop + nop + trap #0 diff --git a/cs672/compress95.in b/cs672/compress95.in new file mode 100644 index 0000000..a007d63 --- /dev/null +++ b/cs672/compress95.in @@ -0,0 +1,2 @@ +25000 e 2231 + diff --git a/cs672/compress95.ss b/cs672/compress95.ss new file mode 100644 index 0000000..a764d0b Binary files /dev/null and b/cs672/compress95.ss differ diff --git a/cs672/hw2.pdf b/cs672/hw2.pdf new file mode 100644 index 0000000..40a95dd Binary files /dev/null and b/cs672/hw2.pdf differ diff --git a/cs672/hw3.pdf b/cs672/hw3.pdf new file mode 100644 index 0000000..471401f Binary files /dev/null and b/cs672/hw3.pdf differ diff --git a/cs672/hw4.pdf b/cs672/hw4.pdf new file mode 100644 index 0000000..54eb016 Binary files /dev/null and b/cs672/hw4.pdf differ diff --git a/cs672/hw5.pdf b/cs672/hw5.pdf new file mode 100644 index 0000000..e75929f Binary files /dev/null and b/cs672/hw5.pdf differ