From b527d5e77d403675bc39764e1c5fbad7527c4b08 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 7 Jun 2020 20:51:33 +0100 Subject: [PATCH] Debugging CPU --- ALU_top.bdf | 42 +- ALU_top.bsf | 7 + CPUProject.bdf | 1652 +++++++++++++++++++++--------------------------- CPUProject.qsf | 11 +- CPUProject.qws | Bin 0 -> 4121 bytes DECODE.bsf | 25 +- DECODE.v | 44 +- SM.bsf | 7 + SM.v | 7 +- data.mif | 19 +- instr.mif | 66 +- reg_file.bdf | 183 ++---- test.bdf | 127 ---- 13 files changed, 945 insertions(+), 1245 deletions(-) create mode 100644 CPUProject.qws delete mode 100644 test.bdf diff --git a/ALU_top.bdf b/ALU_top.bdf index 1ba956d..02d963d 100644 --- a/ALU_top.bdf +++ b/ALU_top.bdf @@ -23,7 +23,7 @@ refer to the applicable agreement for further details. (input) (rect 360 240 528 256) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "ALU_en" (rect 5 0 44 12)(font "Arial" )) + (text "ALU_en" (rect 5 0 43 12)(font "Arial" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -39,7 +39,7 @@ refer to the applicable agreement for further details. (input) (rect 360 256 528 272) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "Rs1[15..0]" (rect 5 0 53 17)(font "Intel Clear" )) + (text "Rs1[15..0]" (rect 5 0 52 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -55,7 +55,7 @@ refer to the applicable agreement for further details. (input) (rect 360 272 528 288) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "Rs2[15..0]" (rect 5 0 53 17)(font "Intel Clear" )) + (text "Rs2[15..0]" (rect 5 0 52 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -71,7 +71,7 @@ refer to the applicable agreement for further details. (input) (rect 360 288 528 304) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "Rd[15..0]" (rect 5 0 48 17)(font "Intel Clear" )) + (text "Rd[15..0]" (rect 5 0 47 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -87,7 +87,7 @@ refer to the applicable agreement for further details. (input) (rect 360 304 528 320) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "op[5..0]" (rect 5 0 41 17)(font "Intel Clear" )) + (text "op[5..0]" (rect 5 0 40 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -103,7 +103,23 @@ refer to the applicable agreement for further details. (input) (rect 360 336 528 352) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "EXEC2" (rect 5 0 37 17)(font "Intel Clear" )) + (text "EXEC2" (rect 5 0 36 17)(font "Intel Clear" )) + (pt 168 8) + (drawing + (line (pt 84 12)(pt 109 12)) + (line (pt 84 4)(pt 109 4)) + (line (pt 113 8)(pt 168 8)) + (line (pt 84 12)(pt 84 4)) + (line (pt 109 4)(pt 113 8)) + (line (pt 109 12)(pt 113 8)) + ) + (text "VCC" (rect 128 7 148 17)(font "Arial" (font_size 6))) +) +(pin + (input) + (rect 336 448 504 464) + (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) + (text "CLK" (rect 5 0 27 12)(font "Arial" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -256,35 +272,35 @@ refer to the applicable agreement for further details. (pt 208 32) (output) (text "mul1[15..0]" (rect 0 0 55 12)(font "Arial" )) - (text "mul1[15..0]" (rect 141 27 187 39)(font "Arial" )) + (text "mul1[15..0]" (rect 141 27 196 39)(font "Arial" )) (line (pt 208 32)(pt 192 32)(line_width 3)) ) (port (pt 208 48) (output) (text "mul2[15..0]" (rect 0 0 55 12)(font "Arial" )) - (text "mul2[15..0]" (rect 141 43 187 55)(font "Arial" )) + (text "mul2[15..0]" (rect 141 43 196 55)(font "Arial" )) (line (pt 208 48)(pt 192 48)(line_width 3)) ) (port (pt 208 64) (output) (text "Rout[15..0]" (rect 0 0 55 12)(font "Arial" )) - (text "Rout[15..0]" (rect 141 59 187 71)(font "Arial" )) + (text "Rout[15..0]" (rect 141 59 196 71)(font "Arial" )) (line (pt 208 64)(pt 192 64)(line_width 3)) ) (port (pt 208 80) (output) (text "jump" (rect 0 0 23 12)(font "Arial" )) - (text "jump" (rect 168 75 187 87)(font "Arial" )) + (text "jump" (rect 168 75 191 87)(font "Arial" )) (line (pt 208 80)(pt 192 80)) ) (port (pt 208 96) (output) (text "carry" (rect 0 0 25 12)(font "Arial" )) - (text "carry" (rect 166 91 187 103)(font "Arial" )) + (text "carry" (rect 166 91 191 103)(font "Arial" )) (line (pt 208 96)(pt 192 96)) ) (drawing @@ -407,3 +423,7 @@ refer to the applicable agreement for further details. (pt 752 312) (pt 776 312) ) +(connector + (pt 544 456) + (pt 504 456) +) diff --git a/ALU_top.bsf b/ALU_top.bsf index 355d73f..736e702 100644 --- a/ALU_top.bsf +++ b/ALU_top.bsf @@ -65,6 +65,13 @@ refer to the applicable agreement for further details. (text "EXEC2" (rect 21 107 59 126)(font "Intel Clear" (font_size 8))) (line (pt 0 112)(pt 16 112)) ) + (port + (pt 0 128) + (input) + (text "CLK" (rect 0 0 23 19)(font "Intel Clear" (font_size 8))) + (text "CLK" (rect 21 123 44 142)(font "Intel Clear" (font_size 8))) + (line (pt 0 128)(pt 16 128)) + ) (port (pt 184 32) (output) diff --git a/CPUProject.bdf b/CPUProject.bdf index 358afc4..6f5e7e6 100644 --- a/CPUProject.bdf +++ b/CPUProject.bdf @@ -21,25 +21,25 @@ refer to the applicable agreement for further details. (header "graphic" (version "1.4")) (pin (input) - (rect 168 720 336 736) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "CLK" (rect 5 0 26 12)(font "Arial" )) - (pt 168 8) + (rect 168 720 344 736) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "CLK" (rect 9 0 30 12)(font "Arial" )) + (pt 176 8) (drawing - (line (pt 84 12)(pt 109 12)) - (line (pt 84 4)(pt 109 4)) - (line (pt 113 8)(pt 168 8)) - (line (pt 84 12)(pt 84 4)) - (line (pt 109 4)(pt 113 8)) - (line (pt 109 12)(pt 113 8)) + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) ) - (text "VCC" (rect 128 7 148 17)(font "Arial" (font_size 6))) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) ) (pin (input) - (rect 168 736 336 752) + (rect 176 704 344 720) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "stack_rst" (rect 5 0 52 12)(font "Arial" )) + (text "SM_rst" (rect 5 0 40 12)(font "Arial" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -55,7 +55,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 528 1408 544) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "ALU_carry" (rect 90 0 139 17)(font "Intel Clear" )) + (text "ALU_carry" (rect 90 0 143 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -71,7 +71,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 560 1408 576) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "Rs1[15..0]" (rect 90 0 137 17)(font "Intel Clear" )) + (text "Rs1[15..0]" (rect 90 0 141 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -87,7 +87,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 576 1408 592) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "Rs2[15..0]" (rect 90 0 137 17)(font "Intel Clear" )) + (text "Rs2[15..0]" (rect 90 0 141 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -119,7 +119,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 592 1408 608) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "instr[15..0]" (rect 90 0 139 17)(font "Intel Clear" )) + (text "instr[15..0]" (rect 90 0 143 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -135,7 +135,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 608 1408 624) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "FETCH" (rect 90 0 121 17)(font "Intel Clear" )) + (text "FETCH" (rect 90 0 126 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -151,7 +151,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 624 1408 640) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "EXEC1" (rect 90 0 121 17)(font "Intel Clear" )) + (text "EXEC1" (rect 90 0 124 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -167,7 +167,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 640 1408 656) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "EXEC2" (rect 90 0 121 17)(font "Intel Clear" )) + (text "EXEC2" (rect 90 0 124 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -215,7 +215,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 672 1408 688) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "R1[15..0]" (rect 90 0 132 17)(font "Intel Clear" )) + (text "R1[15..0]" (rect 90 0 136 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -231,7 +231,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 688 1408 704) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "R2[15..0]" (rect 90 0 132 17)(font "Intel Clear" )) + (text "R2[15..0]" (rect 90 0 136 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -247,7 +247,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 704 1408 720) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "R3[15..0]" (rect 90 0 132 17)(font "Intel Clear" )) + (text "R3[15..0]" (rect 90 0 136 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -263,7 +263,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 720 1408 736) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "R4[15..0]" (rect 90 0 132 17)(font "Intel Clear" )) + (text "R4[15..0]" (rect 90 0 136 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -279,7 +279,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 736 1408 752) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "R5[15..0]" (rect 90 0 132 17)(font "Intel Clear" )) + (text "R5[15..0]" (rect 90 0 136 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -295,7 +295,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 752 1408 768) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "R6[15..0]" (rect 90 0 132 17)(font "Intel Clear" )) + (text "R6[15..0]" (rect 90 0 136 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -311,7 +311,7 @@ refer to the applicable agreement for further details. (output) (rect 1232 768 1408 784) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "R7[15..0]" (rect 90 0 132 17)(font "Intel Clear" )) + (text "R7[15..0]" (rect 90 0 136 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 0 8)(pt 52 8)) @@ -323,6 +323,575 @@ refer to the applicable agreement for further details. (line (pt 78 12)(pt 82 8)) ) ) +(pin + (output) + (rect 1424 -80 1600 -64) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "R1_en" (rect 90 0 121 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) +) +(pin + (output) + (rect 1424 -96 1600 -80) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "R0_en" (rect 90 0 121 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) +) +(symbol + (rect 600 -8 816 136) + (text "ram_instr" (rect 81 0 144 16)(font "Arial" (font_size 10))) + (text "RAMi" (rect 8 128 33 140)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "data[15..0]" (rect 0 0 60 14)(font "Arial" (font_size 8))) + (text "data[15..0]" (rect 4 18 64 32)(font "Arial" (font_size 8))) + (line (pt 0 32)(pt 88 32)(line_width 3)) + ) + (port + (pt 0 48) + (input) + (text "wren" (rect 0 0 30 14)(font "Arial" (font_size 8))) + (text "wren" (rect 4 34 34 48)(font "Arial" (font_size 8))) + (line (pt 0 48)(pt 88 48)) + ) + (port + (pt 0 64) + (input) + (text "address[10..0]" (rect 0 0 82 14)(font "Arial" (font_size 8))) + (text "address[10..0]" (rect 4 50 86 64)(font "Arial" (font_size 8))) + (line (pt 0 64)(pt 88 64)(line_width 3)) + ) + (port + (pt 0 112) + (input) + (text "clock" (rect 0 0 29 14)(font "Arial" (font_size 8))) + (text "clock" (rect 4 98 33 112)(font "Arial" (font_size 8))) + (line (pt 0 112)(pt 80 112)) + ) + (port + (pt 0 128) + (input) + (text "clken" (rect 0 0 29 14)(font "Arial" (font_size 8))) + (text "clken" (rect 4 114 33 128)(font "Arial" (font_size 8))) + (line (pt 0 128)(pt 16 128)) + ) + (port + (pt 216 32) + (output) + (text "q[15..0]" (rect 0 0 42 14)(font "Arial" (font_size 8))) + (text "q[15..0]" (rect 177 18 219 32)(font "Arial" (font_size 8))) + (line (pt 216 32)(pt 136 32)(line_width 3)) + ) + (drawing + (text "16 bits" (rect 109 24 121 57)(font "Arial" )(vertical)) + (text "2048 words" (rect 120 12 132 67)(font "Arial" )(vertical)) + (text "Block type: AUTO" (rect 48 130 137 142)(font "Arial" )) + (line (pt 104 24)(pt 136 24)) + (line (pt 136 24)(pt 136 96)) + (line (pt 136 96)(pt 104 96)) + (line (pt 104 96)(pt 104 24)) + (line (pt 118 58)(pt 123 63)) + (line (pt 118 62)(pt 123 57)) + (line (pt 88 27)(pt 96 27)) + (line (pt 96 27)(pt 96 39)) + (line (pt 96 39)(pt 88 39)) + (line (pt 88 39)(pt 88 27)) + (line (pt 88 34)(pt 90 36)) + (line (pt 90 36)(pt 88 38)) + (line (pt 80 36)(pt 88 36)) + (line (pt 96 32)(pt 104 32)(line_width 3)) + (line (pt 88 43)(pt 96 43)) + (line (pt 96 43)(pt 96 55)) + (line (pt 96 55)(pt 88 55)) + (line (pt 88 55)(pt 88 43)) + (line (pt 88 50)(pt 90 52)) + (line (pt 90 52)(pt 88 54)) + (line (pt 80 52)(pt 88 52)) + (line (pt 96 48)(pt 104 48)) + (line (pt 88 59)(pt 96 59)) + (line (pt 96 59)(pt 96 71)) + (line (pt 96 71)(pt 88 71)) + (line (pt 88 71)(pt 88 59)) + (line (pt 88 66)(pt 90 68)) + (line (pt 90 68)(pt 88 70)) + (line (pt 80 68)(pt 88 68)) + (line (pt 96 64)(pt 104 64)(line_width 3)) + (line (pt 80 112)(pt 80 36)) + (line (pt 0 0)(pt 217 0)) + (line (pt 217 0)(pt 217 146)) + (line (pt 0 146)(pt 217 146)) + (line (pt 0 0)(pt 0 146)) + (line (pt 0 0)(pt 0 0)) + (line (pt 0 0)(pt 0 0)) + (line (pt 0 0)(pt 0 0)) + (line (pt 0 0)(pt 0 0)) + ) +) +(symbol + (rect 632 144 816 352) + (text "mux_8x16" (rect 5 0 55 12)(font "Arial" )) + (text "MUX1" (rect 8 192 36 204)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "s[2..0]" (rect 0 0 31 12)(font "Arial" )) + (text "s[2..0]" (rect 21 27 52 39)(font "Arial" )) + (line (pt 0 32)(pt 16 32)(line_width 3)) + ) + (port + (pt 0 48) + (input) + (text "in0[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in0[15..0]" (rect 21 43 67 55)(font "Arial" )) + (line (pt 0 48)(pt 16 48)(line_width 3)) + ) + (port + (pt 0 64) + (input) + (text "in1[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in1[15..0]" (rect 21 59 67 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)(line_width 3)) + ) + (port + (pt 0 80) + (input) + (text "in2[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in2[15..0]" (rect 21 75 67 87)(font "Arial" )) + (line (pt 0 80)(pt 16 80)(line_width 3)) + ) + (port + (pt 0 96) + (input) + (text "in3[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in3[15..0]" (rect 21 91 67 103)(font "Arial" )) + (line (pt 0 96)(pt 16 96)(line_width 3)) + ) + (port + (pt 0 112) + (input) + (text "in4[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in4[15..0]" (rect 21 107 67 119)(font "Arial" )) + (line (pt 0 112)(pt 16 112)(line_width 3)) + ) + (port + (pt 0 128) + (input) + (text "in5[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in5[15..0]" (rect 21 123 67 135)(font "Arial" )) + (line (pt 0 128)(pt 16 128)(line_width 3)) + ) + (port + (pt 0 144) + (input) + (text "in6[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in6[15..0]" (rect 21 139 67 151)(font "Arial" )) + (line (pt 0 144)(pt 16 144)(line_width 3)) + ) + (port + (pt 0 160) + (input) + (text "in7[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in7[15..0]" (rect 21 155 67 167)(font "Arial" )) + (line (pt 0 160)(pt 16 160)(line_width 3)) + ) + (port + (pt 184 32) + (output) + (text "result[15..0]" (rect 0 0 59 12)(font "Arial" )) + (text "result[15..0]" (rect 114 27 163 39)(font "Arial" )) + (line (pt 184 32)(pt 168 32)(line_width 3)) + ) + (drawing + (rectangle (rect 16 16 168 192)) + ) +) +(symbol + (rect 632 352 816 560) + (text "mux_8x16" (rect 5 0 55 12)(font "Arial" )) + (text "MUX2" (rect 8 192 36 204)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "s[2..0]" (rect 0 0 31 12)(font "Arial" )) + (text "s[2..0]" (rect 21 27 52 39)(font "Arial" )) + (line (pt 0 32)(pt 16 32)(line_width 3)) + ) + (port + (pt 0 48) + (input) + (text "in0[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in0[15..0]" (rect 21 43 67 55)(font "Arial" )) + (line (pt 0 48)(pt 16 48)(line_width 3)) + ) + (port + (pt 0 64) + (input) + (text "in1[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in1[15..0]" (rect 21 59 67 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)(line_width 3)) + ) + (port + (pt 0 80) + (input) + (text "in2[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in2[15..0]" (rect 21 75 67 87)(font "Arial" )) + (line (pt 0 80)(pt 16 80)(line_width 3)) + ) + (port + (pt 0 96) + (input) + (text "in3[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in3[15..0]" (rect 21 91 67 103)(font "Arial" )) + (line (pt 0 96)(pt 16 96)(line_width 3)) + ) + (port + (pt 0 112) + (input) + (text "in4[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in4[15..0]" (rect 21 107 67 119)(font "Arial" )) + (line (pt 0 112)(pt 16 112)(line_width 3)) + ) + (port + (pt 0 128) + (input) + (text "in5[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in5[15..0]" (rect 21 123 67 135)(font "Arial" )) + (line (pt 0 128)(pt 16 128)(line_width 3)) + ) + (port + (pt 0 144) + (input) + (text "in6[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in6[15..0]" (rect 21 139 67 151)(font "Arial" )) + (line (pt 0 144)(pt 16 144)(line_width 3)) + ) + (port + (pt 0 160) + (input) + (text "in7[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in7[15..0]" (rect 21 155 67 167)(font "Arial" )) + (line (pt 0 160)(pt 16 160)(line_width 3)) + ) + (port + (pt 184 32) + (output) + (text "result[15..0]" (rect 0 0 59 12)(font "Arial" )) + (text "result[15..0]" (rect 114 27 163 39)(font "Arial" )) + (line (pt 184 32)(pt 168 32)(line_width 3)) + ) + (drawing + (rectangle (rect 16 16 168 192)) + ) +) +(symbol + (rect 632 560 816 768) + (text "mux_8x16" (rect 5 0 55 12)(font "Arial" )) + (text "MUX3" (rect 8 192 36 204)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "s[2..0]" (rect 0 0 31 12)(font "Arial" )) + (text "s[2..0]" (rect 21 27 52 39)(font "Arial" )) + (line (pt 0 32)(pt 16 32)(line_width 3)) + ) + (port + (pt 0 48) + (input) + (text "in0[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in0[15..0]" (rect 21 43 67 55)(font "Arial" )) + (line (pt 0 48)(pt 16 48)(line_width 3)) + ) + (port + (pt 0 64) + (input) + (text "in1[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in1[15..0]" (rect 21 59 67 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)(line_width 3)) + ) + (port + (pt 0 80) + (input) + (text "in2[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in2[15..0]" (rect 21 75 67 87)(font "Arial" )) + (line (pt 0 80)(pt 16 80)(line_width 3)) + ) + (port + (pt 0 96) + (input) + (text "in3[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in3[15..0]" (rect 21 91 67 103)(font "Arial" )) + (line (pt 0 96)(pt 16 96)(line_width 3)) + ) + (port + (pt 0 112) + (input) + (text "in4[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in4[15..0]" (rect 21 107 67 119)(font "Arial" )) + (line (pt 0 112)(pt 16 112)(line_width 3)) + ) + (port + (pt 0 128) + (input) + (text "in5[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in5[15..0]" (rect 21 123 67 135)(font "Arial" )) + (line (pt 0 128)(pt 16 128)(line_width 3)) + ) + (port + (pt 0 144) + (input) + (text "in6[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in6[15..0]" (rect 21 139 67 151)(font "Arial" )) + (line (pt 0 144)(pt 16 144)(line_width 3)) + ) + (port + (pt 0 160) + (input) + (text "in7[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in7[15..0]" (rect 21 155 67 167)(font "Arial" )) + (line (pt 0 160)(pt 16 160)(line_width 3)) + ) + (port + (pt 184 32) + (output) + (text "result[15..0]" (rect 0 0 59 12)(font "Arial" )) + (text "result[15..0]" (rect 114 27 163 39)(font "Arial" )) + (line (pt 184 32)(pt 168 32)(line_width 3)) + ) + (drawing + (rectangle (rect 16 16 168 192)) + ) +) +(symbol + (rect 1216 272 1400 384) + (text "mux_3x16" (rect 5 0 55 12)(font "Arial" )) + (text "MUX4" (rect 8 96 36 108)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "s[1..0]" (rect 0 0 31 12)(font "Arial" )) + (text "s[1..0]" (rect 21 27 52 39)(font "Arial" )) + (line (pt 0 32)(pt 16 32)(line_width 3)) + ) + (port + (pt 0 48) + (input) + (text "in0[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in0[15..0]" (rect 21 43 67 55)(font "Arial" )) + (line (pt 0 48)(pt 16 48)(line_width 3)) + ) + (port + (pt 0 64) + (input) + (text "in1[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in1[15..0]" (rect 21 59 67 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)(line_width 3)) + ) + (port + (pt 0 80) + (input) + (text "in2[15..0]" (rect 0 0 46 12)(font "Arial" )) + (text "in2[15..0]" (rect 21 75 67 87)(font "Arial" )) + (line (pt 0 80)(pt 16 80)(line_width 3)) + ) + (port + (pt 184 32) + (output) + (text "result[15..0]" (rect 0 0 59 12)(font "Arial" )) + (text "result[15..0]" (rect 114 27 163 39)(font "Arial" )) + (line (pt 184 32)(pt 168 32)(line_width 3)) + ) + (drawing + (rectangle (rect 16 16 168 96)) + ) +) +(symbol + (rect 936 160 1152 304) + (text "ram_data" (rect 81 0 144 16)(font "Arial" (font_size 10))) + (text "RAMd" (rect 8 128 37 140)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "data[15..0]" (rect 0 0 60 14)(font "Arial" (font_size 8))) + (text "data[15..0]" (rect 4 18 64 32)(font "Arial" (font_size 8))) + (line (pt 0 32)(pt 88 32)(line_width 3)) + ) + (port + (pt 0 48) + (input) + (text "wren" (rect 0 0 30 14)(font "Arial" (font_size 8))) + (text "wren" (rect 4 34 34 48)(font "Arial" (font_size 8))) + (line (pt 0 48)(pt 88 48)) + ) + (port + (pt 0 64) + (input) + (text "address[10..0]" (rect 0 0 82 14)(font "Arial" (font_size 8))) + (text "address[10..0]" (rect 4 50 86 64)(font "Arial" (font_size 8))) + (line (pt 0 64)(pt 88 64)(line_width 3)) + ) + (port + (pt 0 112) + (input) + (text "clock" (rect 0 0 29 14)(font "Arial" (font_size 8))) + (text "clock" (rect 4 98 33 112)(font "Arial" (font_size 8))) + (line (pt 0 112)(pt 80 112)) + ) + (port + (pt 0 128) + (input) + (text "clken" (rect 0 0 29 14)(font "Arial" (font_size 8))) + (text "clken" (rect 4 114 33 128)(font "Arial" (font_size 8))) + (line (pt 0 128)(pt 16 128)) + ) + (port + (pt 216 32) + (output) + (text "q[15..0]" (rect 0 0 42 14)(font "Arial" (font_size 8))) + (text "q[15..0]" (rect 177 18 219 32)(font "Arial" (font_size 8))) + (line (pt 216 32)(pt 136 32)(line_width 3)) + ) + (drawing + (text "16 bits" (rect 109 24 121 57)(font "Arial" )(vertical)) + (text "2048 words" (rect 120 12 132 67)(font "Arial" )(vertical)) + (text "Block type: AUTO" (rect 48 130 137 142)(font "Arial" )) + (line (pt 104 24)(pt 136 24)) + (line (pt 136 24)(pt 136 96)) + (line (pt 136 96)(pt 104 96)) + (line (pt 104 96)(pt 104 24)) + (line (pt 118 58)(pt 123 63)) + (line (pt 118 62)(pt 123 57)) + (line (pt 88 27)(pt 96 27)) + (line (pt 96 27)(pt 96 39)) + (line (pt 96 39)(pt 88 39)) + (line (pt 88 39)(pt 88 27)) + (line (pt 88 34)(pt 90 36)) + (line (pt 90 36)(pt 88 38)) + (line (pt 80 36)(pt 88 36)) + (line (pt 96 32)(pt 104 32)(line_width 3)) + (line (pt 88 43)(pt 96 43)) + (line (pt 96 43)(pt 96 55)) + (line (pt 96 55)(pt 88 55)) + (line (pt 88 55)(pt 88 43)) + (line (pt 88 50)(pt 90 52)) + (line (pt 90 52)(pt 88 54)) + (line (pt 80 52)(pt 88 52)) + (line (pt 96 48)(pt 104 48)) + (line (pt 88 59)(pt 96 59)) + (line (pt 96 59)(pt 96 71)) + (line (pt 96 71)(pt 88 71)) + (line (pt 88 71)(pt 88 59)) + (line (pt 88 66)(pt 90 68)) + (line (pt 90 68)(pt 88 70)) + (line (pt 80 68)(pt 88 68)) + (line (pt 96 64)(pt 104 64)(line_width 3)) + (line (pt 80 112)(pt 80 36)) + (line (pt 0 0)(pt 217 0)) + (line (pt 217 0)(pt 217 146)) + (line (pt 0 146)(pt 217 146)) + (line (pt 0 0)(pt 0 146)) + (line (pt 0 0)(pt 0 0)) + (line (pt 0 0)(pt 0 0)) + (line (pt 0 0)(pt 0 0)) + (line (pt 0 0)(pt 0 0)) + ) +) +(symbol + (rect 936 304 1120 464) + (text "ALU_top" (rect 5 0 56 19)(font "Intel Clear" (font_size 8))) + (text "ALU" (rect 8 139 28 156)(font "Intel Clear" )) + (port + (pt 0 32) + (input) + (text "ALU_en" (rect 0 0 46 19)(font "Intel Clear" (font_size 8))) + (text "ALU_en" (rect 21 27 67 46)(font "Intel Clear" (font_size 8))) + (line (pt 0 32)(pt 16 32)) + ) + (port + (pt 0 48) + (input) + (text "Rs1[15..0]" (rect 0 0 61 19)(font "Intel Clear" (font_size 8))) + (text "Rs1[15..0]" (rect 21 43 82 62)(font "Intel Clear" (font_size 8))) + (line (pt 0 48)(pt 16 48)(line_width 3)) + ) + (port + (pt 0 64) + (input) + (text "Rs2[15..0]" (rect 0 0 61 19)(font "Intel Clear" (font_size 8))) + (text "Rs2[15..0]" (rect 21 59 82 78)(font "Intel Clear" (font_size 8))) + (line (pt 0 64)(pt 16 64)(line_width 3)) + ) + (port + (pt 0 80) + (input) + (text "Rd[15..0]" (rect 0 0 55 19)(font "Intel Clear" (font_size 8))) + (text "Rd[15..0]" (rect 21 75 76 94)(font "Intel Clear" (font_size 8))) + (line (pt 0 80)(pt 16 80)(line_width 3)) + ) + (port + (pt 0 96) + (input) + (text "op[5..0]" (rect 0 0 46 19)(font "Intel Clear" (font_size 8))) + (text "op[5..0]" (rect 21 91 67 110)(font "Intel Clear" (font_size 8))) + (line (pt 0 96)(pt 16 96)(line_width 3)) + ) + (port + (pt 0 112) + (input) + (text "EXEC2" (rect 0 0 38 19)(font "Intel Clear" (font_size 8))) + (text "EXEC2" (rect 21 107 59 126)(font "Intel Clear" (font_size 8))) + (line (pt 0 112)(pt 16 112)) + ) + (port + (pt 0 128) + (input) + (text "CLK" (rect 0 0 23 19)(font "Intel Clear" (font_size 8))) + (text "CLK" (rect 21 123 44 142)(font "Intel Clear" (font_size 8))) + (line (pt 0 128)(pt 16 128)) + ) + (port + (pt 184 32) + (output) + (text "Rout[15..0]" (rect 0 0 66 19)(font "Intel Clear" (font_size 8))) + (text "Rout[15..0]" (rect 97 27 163 46)(font "Intel Clear" (font_size 8))) + (line (pt 184 32)(pt 168 32)(line_width 3)) + ) + (port + (pt 184 48) + (output) + (text "COND" (rect 0 0 36 19)(font "Intel Clear" (font_size 8))) + (text "COND" (rect 127 43 163 62)(font "Intel Clear" (font_size 8))) + (line (pt 184 48)(pt 168 48)) + ) + (port + (pt 184 64) + (output) + (text "CARRY" (rect 0 0 41 19)(font "Intel Clear" (font_size 8))) + (text "CARRY" (rect 122 59 163 78)(font "Intel Clear" (font_size 8))) + (line (pt 184 64)(pt 168 64)) + ) + (drawing + (rectangle (rect 16 16 168 144)) + ) +) (symbol (rect 200 160 408 512) (text "reg_file" (rect 5 0 49 19)(font "Intel Clear" (font_size 8))) @@ -513,352 +1082,10 @@ refer to the applicable agreement for further details. (rectangle (rect 16 16 192 336)) ) ) -(symbol - (rect 536 -144 712 0) - (text "LPM_FF" (rect 19 0 78 16)(font "Arial" (font_size 10))) - (text "IR" (rect 3 133 12 150)(font "Intel Clear" )) - (port - (pt 88 144) - (input) - (text "aclr" (rect 80 113 101 127)(font "Arial" (font_size 8))) - (text "aclr" (rect 80 113 101 127)(font "Arial" (font_size 8))) - (line (pt 88 144)(pt 88 128)) - (unused) - ) - (port - (pt 0 24) - (input) - (text "aload" (rect 20 17 50 31)(font "Arial" (font_size 8))) - (text "aload" (rect 20 17 50 31)(font "Arial" (font_size 8))) - (line (pt 0 24)(pt 16 24)) - (unused) - ) - (port - (pt 88 0) - (input) - (text "aset" (rect 79 17 103 31)(font "Arial" (font_size 8))) - (text "aset" (rect 79 17 103 31)(font "Arial" (font_size 8))) - (line (pt 88 16)(pt 88 0)) - (unused) - ) - (port - (pt 0 88) - (input) - (text "clock" (rect 20 81 49 95)(font "Arial" (font_size 8))(invisible)) - (text "clock" (rect 20 81 49 95)(font "Arial" (font_size 8))(invisible)) - (line (pt 0 88)(pt 16 88)) - ) - (port - (pt 0 72) - (input) - (text "data[LPM_WIDTH-1..0]" (rect 20 63 146 77)(font "Arial" (font_size 8))) - (text "data[]" (rect 20 63 51 77)(font "Arial" (font_size 8))) - (line (pt 0 72)(pt 16 72)(line_width 3)) - ) - (port - (pt 0 104) - (input) - (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) - (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) - (line (pt 0 104)(pt 16 104)) - (unused) - ) - (port - (pt 0 120) - (input) - (text "sclr" (rect 20 113 41 127)(font "Arial" (font_size 8))) - (text "sclr" (rect 20 113 41 127)(font "Arial" (font_size 8))) - (line (pt 0 120)(pt 16 120)) - (unused) - ) - (port - (pt 0 56) - (input) - (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) - (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) - (line (pt 0 56)(pt 16 56)) - ) - (port - (pt 0 40) - (input) - (text "sset" (rect 20 33 44 47)(font "Arial" (font_size 8))) - (text "sset" (rect 20 33 44 47)(font "Arial" (font_size 8))) - (line (pt 0 40)(pt 16 40)) - (unused) - ) - (port - (pt 176 88) - (output) - (text "q[LPM_WIDTH-1..0]" (rect 144 81 252 95)(font "Arial" (font_size 8))) - (text "q[]" (rect 144 81 158 95)(font "Arial" (font_size 8))) - (line (pt 160 88)(pt 176 88)(line_width 3)) - ) - (parameter - "LPM_AVALUE" - "" - "Unsigned value associated with the aset port" - ) - (parameter - "LPM_FFTYPE" - "\"DFF\"" - "Selects behavior as DFF or TFF" - "\"DFF\"" "\"TFF\"" - ) - (parameter - "LPM_SVALUE" - "" - "Unsigned value associated with the sset port" - ) - (parameter - "LPM_WIDTH" - "16" - "Width of I/O, any integer > 0" - " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" " 9" "10" "11" "12" "13" "14" "15" "16" "20" "24" "28" "32" "40" "48" "56" "64" - ) - (drawing - (line (pt 16 16)(pt 160 16)) - (line (pt 16 128)(pt 160 128)) - (line (pt 160 128)(pt 160 16)) - (line (pt 16 128)(pt 16 16)) - (line (pt 16 80)(pt 24 88)) - (line (pt 24 88)(pt 16 96)) - ) - (annotation_block (parameter)(rect 712 -144 744 -128)) -) -(symbol - (rect 744 -120 856 -32) - (text "BUSMUX" (rect 28 0 91 16)(font "Arial" (font_size 10))) - (text "MUX5" (rect 3 77 32 94)(font "Intel Clear" )) - (port - (pt 0 64) - (input) - (text "datab[WIDTH-1..0]" (rect 6 51 108 65)(font "Arial" (font_size 8))) - (text "datab[]" (rect 6 51 44 65)(font "Arial" (font_size 8))) - (line (pt 0 64)(pt 44 64)(line_width 3)) - ) - (port - (pt 56 88) - (input) - (text "sel" (rect 59 70 75 84)(font "Arial" (font_size 8))) - (text "sel" (rect 59 70 75 84)(font "Arial" (font_size 8))) - (line (pt 56 88)(pt 56 72)) - ) - (port - (pt 0 32) - (input) - (text "dataa[WIDTH-1..0]" (rect 6 19 108 33)(font "Arial" (font_size 8))) - (text "dataa[]" (rect 6 19 44 33)(font "Arial" (font_size 8))) - (line (pt 0 32)(pt 44 32)(line_width 3)) - ) - (port - (pt 112 48) - (output) - (text "result[WIDTH-1..0]" (rect 75 35 177 49)(font "Arial" (font_size 8))) - (text "result[]" (rect 75 35 113 49)(font "Arial" (font_size 8))) - (line (pt 68 48)(pt 112 48)(line_width 3)) - ) - (parameter - "WIDTH" - "16" - "Width of I/O, any integer > 0" - " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" " 9" "10" "11" "12" "13" "14" "15" "16" "20" "24" "28" "32" "40" "48" "56" "64" - ) - (drawing - (text "0" (rect 52 31 56 41)(font "Arial" (font_size 6))) - (text "1" (rect 52 55 56 65)(font "Arial" (font_size 6))) - (line (pt 68 64)(pt 68 32)) - (line (pt 44 80)(pt 44 16)) - (line (pt 44 16)(pt 68 32)) - (line (pt 44 80)(pt 68 64)) - ) - (annotation_block (parameter)(rect 856 -120 888 -104)) -) -(symbol - (rect 256 -144 472 0) - (text "ram_instr" (rect 81 0 144 16)(font "Arial" (font_size 10))) - (text "RAMi" (rect 8 128 33 140)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "data[15..0]" (rect 0 0 60 14)(font "Arial" (font_size 8))) - (text "data[15..0]" (rect 4 18 64 32)(font "Arial" (font_size 8))) - (line (pt 0 32)(pt 88 32)(line_width 3)) - ) - (port - (pt 0 48) - (input) - (text "wren" (rect 0 0 30 14)(font "Arial" (font_size 8))) - (text "wren" (rect 4 34 34 48)(font "Arial" (font_size 8))) - (line (pt 0 48)(pt 88 48)) - ) - (port - (pt 0 64) - (input) - (text "address[10..0]" (rect 0 0 82 14)(font "Arial" (font_size 8))) - (text "address[10..0]" (rect 4 50 86 64)(font "Arial" (font_size 8))) - (line (pt 0 64)(pt 88 64)(line_width 3)) - ) - (port - (pt 0 112) - (input) - (text "clock" (rect 0 0 29 14)(font "Arial" (font_size 8))) - (text "clock" (rect 4 98 33 112)(font "Arial" (font_size 8))) - (line (pt 0 112)(pt 80 112)) - ) - (port - (pt 0 128) - (input) - (text "clken" (rect 0 0 29 14)(font "Arial" (font_size 8))) - (text "clken" (rect 4 114 33 128)(font "Arial" (font_size 8))) - (line (pt 0 128)(pt 16 128)) - ) - (port - (pt 216 32) - (output) - (text "q[15..0]" (rect 0 0 42 14)(font "Arial" (font_size 8))) - (text "q[15..0]" (rect 177 18 219 32)(font "Arial" (font_size 8))) - (line (pt 216 32)(pt 136 32)(line_width 3)) - ) - (drawing - (text "16 bits" (rect 109 24 121 57)(font "Arial" )(vertical)) - (text "2048 words" (rect 120 12 132 67)(font "Arial" )(vertical)) - (text "Block type: AUTO" (rect 48 130 137 142)(font "Arial" )) - (line (pt 104 24)(pt 136 24)) - (line (pt 136 24)(pt 136 96)) - (line (pt 136 96)(pt 104 96)) - (line (pt 104 96)(pt 104 24)) - (line (pt 118 58)(pt 123 63)) - (line (pt 118 62)(pt 123 57)) - (line (pt 88 27)(pt 96 27)) - (line (pt 96 27)(pt 96 39)) - (line (pt 96 39)(pt 88 39)) - (line (pt 88 39)(pt 88 27)) - (line (pt 88 34)(pt 90 36)) - (line (pt 90 36)(pt 88 38)) - (line (pt 80 36)(pt 88 36)) - (line (pt 96 32)(pt 104 32)(line_width 3)) - (line (pt 88 43)(pt 96 43)) - (line (pt 96 43)(pt 96 55)) - (line (pt 96 55)(pt 88 55)) - (line (pt 88 55)(pt 88 43)) - (line (pt 88 50)(pt 90 52)) - (line (pt 90 52)(pt 88 54)) - (line (pt 80 52)(pt 88 52)) - (line (pt 96 48)(pt 104 48)) - (line (pt 88 59)(pt 96 59)) - (line (pt 96 59)(pt 96 71)) - (line (pt 96 71)(pt 88 71)) - (line (pt 88 71)(pt 88 59)) - (line (pt 88 66)(pt 90 68)) - (line (pt 90 68)(pt 88 70)) - (line (pt 80 68)(pt 88 68)) - (line (pt 96 64)(pt 104 64)(line_width 3)) - (line (pt 80 112)(pt 80 36)) - (line (pt 0 0)(pt 217 0)) - (line (pt 217 0)(pt 217 146)) - (line (pt 0 146)(pt 217 146)) - (line (pt 0 0)(pt 0 146)) - (line (pt 0 0)(pt 0 0)) - (line (pt 0 0)(pt 0 0)) - (line (pt 0 0)(pt 0 0)) - (line (pt 0 0)(pt 0 0)) - ) -) -(symbol - (rect 936 160 1152 304) - (text "ram_data" (rect 81 0 144 16)(font "Arial" (font_size 10))) - (text "RAMd" (rect 8 128 37 140)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "data[15..0]" (rect 0 0 60 14)(font "Arial" (font_size 8))) - (text "data[15..0]" (rect 4 18 64 32)(font "Arial" (font_size 8))) - (line (pt 0 32)(pt 88 32)(line_width 3)) - ) - (port - (pt 0 48) - (input) - (text "wren" (rect 0 0 30 14)(font "Arial" (font_size 8))) - (text "wren" (rect 4 34 34 48)(font "Arial" (font_size 8))) - (line (pt 0 48)(pt 88 48)) - ) - (port - (pt 0 64) - (input) - (text "address[10..0]" (rect 0 0 82 14)(font "Arial" (font_size 8))) - (text "address[10..0]" (rect 4 50 86 64)(font "Arial" (font_size 8))) - (line (pt 0 64)(pt 88 64)(line_width 3)) - ) - (port - (pt 0 112) - (input) - (text "clock" (rect 0 0 29 14)(font "Arial" (font_size 8))) - (text "clock" (rect 4 98 33 112)(font "Arial" (font_size 8))) - (line (pt 0 112)(pt 80 112)) - ) - (port - (pt 0 128) - (input) - (text "clken" (rect 0 0 29 14)(font "Arial" (font_size 8))) - (text "clken" (rect 4 114 33 128)(font "Arial" (font_size 8))) - (line (pt 0 128)(pt 16 128)) - ) - (port - (pt 216 32) - (output) - (text "q[15..0]" (rect 0 0 42 14)(font "Arial" (font_size 8))) - (text "q[15..0]" (rect 177 18 219 32)(font "Arial" (font_size 8))) - (line (pt 216 32)(pt 136 32)(line_width 3)) - ) - (drawing - (text "16 bits" (rect 109 24 121 57)(font "Arial" )(vertical)) - (text "2048 words" (rect 120 12 132 67)(font "Arial" )(vertical)) - (text "Block type: AUTO" (rect 48 130 137 142)(font "Arial" )) - (line (pt 104 24)(pt 136 24)) - (line (pt 136 24)(pt 136 96)) - (line (pt 136 96)(pt 104 96)) - (line (pt 104 96)(pt 104 24)) - (line (pt 118 58)(pt 123 63)) - (line (pt 118 62)(pt 123 57)) - (line (pt 88 27)(pt 96 27)) - (line (pt 96 27)(pt 96 39)) - (line (pt 96 39)(pt 88 39)) - (line (pt 88 39)(pt 88 27)) - (line (pt 88 34)(pt 90 36)) - (line (pt 90 36)(pt 88 38)) - (line (pt 80 36)(pt 88 36)) - (line (pt 96 32)(pt 104 32)(line_width 3)) - (line (pt 88 43)(pt 96 43)) - (line (pt 96 43)(pt 96 55)) - (line (pt 96 55)(pt 88 55)) - (line (pt 88 55)(pt 88 43)) - (line (pt 88 50)(pt 90 52)) - (line (pt 90 52)(pt 88 54)) - (line (pt 80 52)(pt 88 52)) - (line (pt 96 48)(pt 104 48)) - (line (pt 88 59)(pt 96 59)) - (line (pt 96 59)(pt 96 71)) - (line (pt 96 71)(pt 88 71)) - (line (pt 88 71)(pt 88 59)) - (line (pt 88 66)(pt 90 68)) - (line (pt 90 68)(pt 88 70)) - (line (pt 80 68)(pt 88 68)) - (line (pt 96 64)(pt 104 64)(line_width 3)) - (line (pt 80 112)(pt 80 36)) - (line (pt 0 0)(pt 217 0)) - (line (pt 217 0)(pt 217 146)) - (line (pt 0 146)(pt 217 146)) - (line (pt 0 0)(pt 0 146)) - (line (pt 0 0)(pt 0 0)) - (line (pt 0 0)(pt 0 0)) - (line (pt 0 0)(pt 0 0)) - (line (pt 0 0)(pt 0 0)) - ) -) (symbol (rect 256 16 408 128) (text "SM" (rect 5 0 20 12)(font "Arial" )) - (text "SM" (rect 8 96 23 113)(font "Intel Clear" )) + (text "SM" (rect 8 96 23 108)(font "Arial" )) (port (pt 0 32) (input) @@ -873,102 +1100,38 @@ refer to the applicable agreement for further details. (text "E2" (rect 21 43 33 55)(font "Arial" )) (line (pt 0 48)(pt 16 48)) ) + (port + (pt 0 64) + (input) + (text "RST" (rect 0 0 21 12)(font "Arial" )) + (text "RST" (rect 21 59 42 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)) + ) (port (pt 152 32) (output) (text "FETCH" (rect 0 0 36 12)(font "Arial" )) - (text "FETCH" (rect 101 27 137 39)(font "Arial" )) + (text "FETCH" (rect 101 27 131 39)(font "Arial" )) (line (pt 152 32)(pt 136 32)) ) (port (pt 152 48) (output) (text "EXEC1" (rect 0 0 34 12)(font "Arial" )) - (text "EXEC1" (rect 103 43 137 55)(font "Arial" )) + (text "EXEC1" (rect 103 43 131 55)(font "Arial" )) (line (pt 152 48)(pt 136 48)) ) (port (pt 152 64) (output) (text "EXEC2" (rect 0 0 34 12)(font "Arial" )) - (text "EXEC2" (rect 103 59 137 71)(font "Arial" )) + (text "EXEC2" (rect 103 59 131 71)(font "Arial" )) (line (pt 152 64)(pt 136 64)) ) (drawing (rectangle (rect 16 16 136 96)) ) ) -(symbol - (rect 936 304 1120 464) - (text "ALU_top" (rect 5 0 56 19)(font "Intel Clear" (font_size 8))) - (text "ALU" (rect 8 139 28 156)(font "Intel Clear" )) - (port - (pt 0 32) - (input) - (text "ALU_en" (rect 0 0 46 19)(font "Intel Clear" (font_size 8))) - (text "ALU_en" (rect 21 27 67 46)(font "Intel Clear" (font_size 8))) - (line (pt 0 32)(pt 16 32)) - ) - (port - (pt 0 48) - (input) - (text "Rs1[15..0]" (rect 0 0 61 19)(font "Intel Clear" (font_size 8))) - (text "Rs1[15..0]" (rect 21 43 82 62)(font "Intel Clear" (font_size 8))) - (line (pt 0 48)(pt 16 48)(line_width 3)) - ) - (port - (pt 0 64) - (input) - (text "Rs2[15..0]" (rect 0 0 61 19)(font "Intel Clear" (font_size 8))) - (text "Rs2[15..0]" (rect 21 59 82 78)(font "Intel Clear" (font_size 8))) - (line (pt 0 64)(pt 16 64)(line_width 3)) - ) - (port - (pt 0 80) - (input) - (text "Rd[15..0]" (rect 0 0 55 19)(font "Intel Clear" (font_size 8))) - (text "Rd[15..0]" (rect 21 75 76 94)(font "Intel Clear" (font_size 8))) - (line (pt 0 80)(pt 16 80)(line_width 3)) - ) - (port - (pt 0 96) - (input) - (text "op[5..0]" (rect 0 0 46 19)(font "Intel Clear" (font_size 8))) - (text "op[5..0]" (rect 21 91 67 110)(font "Intel Clear" (font_size 8))) - (line (pt 0 96)(pt 16 96)(line_width 3)) - ) - (port - (pt 0 112) - (input) - (text "EXEC2" (rect 0 0 38 19)(font "Intel Clear" (font_size 8))) - (text "EXEC2" (rect 21 107 59 126)(font "Intel Clear" (font_size 8))) - (line (pt 0 112)(pt 16 112)) - ) - (port - (pt 184 32) - (output) - (text "Rout[15..0]" (rect 0 0 66 19)(font "Intel Clear" (font_size 8))) - (text "Rout[15..0]" (rect 97 27 163 46)(font "Intel Clear" (font_size 8))) - (line (pt 184 32)(pt 168 32)(line_width 3)) - ) - (port - (pt 184 48) - (output) - (text "COND" (rect 0 0 36 19)(font "Intel Clear" (font_size 8))) - (text "COND" (rect 127 43 163 62)(font "Intel Clear" (font_size 8))) - (line (pt 184 48)(pt 168 48)) - ) - (port - (pt 184 64) - (output) - (text "CARRY" (rect 0 0 41 19)(font "Intel Clear" (font_size 8))) - (text "CARRY" (rect 122 59 163 78)(font "Intel Clear" (font_size 8))) - (line (pt 184 64)(pt 168 64)) - ) - (drawing - (rectangle (rect 16 16 168 144)) - ) -) (symbol (rect 936 480 1120 624) (text "LIFOstack" (rect 5 0 56 12)(font "Arial" )) @@ -1012,338 +1175,27 @@ refer to the applicable agreement for further details. (pt 184 32) (output) (text "Dout[15..0]" (rect 0 0 55 12)(font "Arial" )) - (text "Dout[15..0]" (rect 117 27 172 39)(font "Arial" )) + (text "Dout[15..0]" (rect 117 27 163 39)(font "Arial" )) (line (pt 184 32)(pt 168 32)(line_width 3)) ) (port (pt 184 48) (output) (text "empty" (rect 0 0 31 12)(font "Arial" )) - (text "empty" (rect 137 43 168 55)(font "Arial" )) + (text "empty" (rect 137 43 163 55)(font "Arial" )) (line (pt 184 48)(pt 168 48)) ) (port (pt 184 64) (output) (text "full" (rect 0 0 15 12)(font "Arial" )) - (text "full" (rect 151 59 166 71)(font "Arial" )) + (text "full" (rect 151 59 163 71)(font "Arial" )) (line (pt 184 64)(pt 168 64)) ) (drawing (rectangle (rect 16 16 168 128)) ) ) -(symbol - (rect 776 -32 824 32) - (text "OR2" (rect 0 45 10 63)(font "Arial" (font_size 6))(vertical)) - (text "OR_MUX5" (rect 38 43 50 93)(font "Arial" )(vertical)) - (port - (pt 32 64) - (input) - (text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible)) - (text "IN2" (rect 23 45 35 62)(font "Courier New" (bold))(vertical)(invisible)) - (line (pt 32 64)(pt 32 49)) - ) - (port - (pt 16 64) - (input) - (text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible)) - (text "IN1" (rect 7 45 19 62)(font "Courier New" (bold))(vertical)(invisible)) - (line (pt 16 64)(pt 16 49)) - ) - (port - (pt 24 0) - (output) - (text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible)) - (text "OUT" (rect 15 -1 27 16)(font "Courier New" (bold))(vertical)(invisible)) - (line (pt 24 16)(pt 24 0)) - ) - (drawing - (line (pt 36 50)(pt 36 39)) - (line (pt 13 50)(pt 13 39)) - (arc (pt 29 57)(pt 19 57)(rect 8 45 41 78)) - (arc (pt 24 15)(pt 13 39)(rect 13 7 76 70)) - (arc (pt 35 39)(pt 24 15)(rect -27 7 36 70)) - ) - (rotate90) -) -(symbol - (rect 632 144 816 352) - (text "mux_8x16" (rect 5 0 55 12)(font "Arial" )) - (text "MUX1" (rect 8 192 36 204)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "s[2..0]" (rect 0 0 31 12)(font "Arial" )) - (text "s[2..0]" (rect 21 27 52 39)(font "Arial" )) - (line (pt 0 32)(pt 16 32)(line_width 3)) - ) - (port - (pt 0 48) - (input) - (text "in0[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in0[15..0]" (rect 21 43 67 55)(font "Arial" )) - (line (pt 0 48)(pt 16 48)(line_width 3)) - ) - (port - (pt 0 64) - (input) - (text "in1[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in1[15..0]" (rect 21 59 67 71)(font "Arial" )) - (line (pt 0 64)(pt 16 64)(line_width 3)) - ) - (port - (pt 0 80) - (input) - (text "in2[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in2[15..0]" (rect 21 75 67 87)(font "Arial" )) - (line (pt 0 80)(pt 16 80)(line_width 3)) - ) - (port - (pt 0 96) - (input) - (text "in3[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in3[15..0]" (rect 21 91 67 103)(font "Arial" )) - (line (pt 0 96)(pt 16 96)(line_width 3)) - ) - (port - (pt 0 112) - (input) - (text "in4[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in4[15..0]" (rect 21 107 67 119)(font "Arial" )) - (line (pt 0 112)(pt 16 112)(line_width 3)) - ) - (port - (pt 0 128) - (input) - (text "in5[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in5[15..0]" (rect 21 123 67 135)(font "Arial" )) - (line (pt 0 128)(pt 16 128)(line_width 3)) - ) - (port - (pt 0 144) - (input) - (text "in6[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in6[15..0]" (rect 21 139 67 151)(font "Arial" )) - (line (pt 0 144)(pt 16 144)(line_width 3)) - ) - (port - (pt 0 160) - (input) - (text "in7[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in7[15..0]" (rect 21 155 67 167)(font "Arial" )) - (line (pt 0 160)(pt 16 160)(line_width 3)) - ) - (port - (pt 184 32) - (output) - (text "result[15..0]" (rect 0 0 59 12)(font "Arial" )) - (text "result[15..0]" (rect 114 27 173 39)(font "Arial" )) - (line (pt 184 32)(pt 168 32)(line_width 3)) - ) - (drawing - (rectangle (rect 16 16 168 192)) - ) -) -(symbol - (rect 632 352 816 560) - (text "mux_8x16" (rect 5 0 55 12)(font "Arial" )) - (text "MUX2" (rect 8 192 37 209)(font "Intel Clear" )) - (port - (pt 0 32) - (input) - (text "s[2..0]" (rect 0 0 31 12)(font "Arial" )) - (text "s[2..0]" (rect 21 27 52 39)(font "Arial" )) - (line (pt 0 32)(pt 16 32)(line_width 3)) - ) - (port - (pt 0 48) - (input) - (text "in0[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in0[15..0]" (rect 21 43 67 55)(font "Arial" )) - (line (pt 0 48)(pt 16 48)(line_width 3)) - ) - (port - (pt 0 64) - (input) - (text "in1[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in1[15..0]" (rect 21 59 67 71)(font "Arial" )) - (line (pt 0 64)(pt 16 64)(line_width 3)) - ) - (port - (pt 0 80) - (input) - (text "in2[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in2[15..0]" (rect 21 75 67 87)(font "Arial" )) - (line (pt 0 80)(pt 16 80)(line_width 3)) - ) - (port - (pt 0 96) - (input) - (text "in3[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in3[15..0]" (rect 21 91 67 103)(font "Arial" )) - (line (pt 0 96)(pt 16 96)(line_width 3)) - ) - (port - (pt 0 112) - (input) - (text "in4[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in4[15..0]" (rect 21 107 67 119)(font "Arial" )) - (line (pt 0 112)(pt 16 112)(line_width 3)) - ) - (port - (pt 0 128) - (input) - (text "in5[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in5[15..0]" (rect 21 123 67 135)(font "Arial" )) - (line (pt 0 128)(pt 16 128)(line_width 3)) - ) - (port - (pt 0 144) - (input) - (text "in6[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in6[15..0]" (rect 21 139 67 151)(font "Arial" )) - (line (pt 0 144)(pt 16 144)(line_width 3)) - ) - (port - (pt 0 160) - (input) - (text "in7[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in7[15..0]" (rect 21 155 67 167)(font "Arial" )) - (line (pt 0 160)(pt 16 160)(line_width 3)) - ) - (port - (pt 184 32) - (output) - (text "result[15..0]" (rect 0 0 59 12)(font "Arial" )) - (text "result[15..0]" (rect 114 27 173 39)(font "Arial" )) - (line (pt 184 32)(pt 168 32)(line_width 3)) - ) - (drawing - (rectangle (rect 16 16 168 192)) - ) -) -(symbol - (rect 632 560 816 768) - (text "mux_8x16" (rect 5 0 55 12)(font "Arial" )) - (text "MUX3" (rect 8 192 37 209)(font "Intel Clear" )) - (port - (pt 0 32) - (input) - (text "s[2..0]" (rect 0 0 31 12)(font "Arial" )) - (text "s[2..0]" (rect 21 27 52 39)(font "Arial" )) - (line (pt 0 32)(pt 16 32)(line_width 3)) - ) - (port - (pt 0 48) - (input) - (text "in0[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in0[15..0]" (rect 21 43 67 55)(font "Arial" )) - (line (pt 0 48)(pt 16 48)(line_width 3)) - ) - (port - (pt 0 64) - (input) - (text "in1[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in1[15..0]" (rect 21 59 67 71)(font "Arial" )) - (line (pt 0 64)(pt 16 64)(line_width 3)) - ) - (port - (pt 0 80) - (input) - (text "in2[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in2[15..0]" (rect 21 75 67 87)(font "Arial" )) - (line (pt 0 80)(pt 16 80)(line_width 3)) - ) - (port - (pt 0 96) - (input) - (text "in3[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in3[15..0]" (rect 21 91 67 103)(font "Arial" )) - (line (pt 0 96)(pt 16 96)(line_width 3)) - ) - (port - (pt 0 112) - (input) - (text "in4[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in4[15..0]" (rect 21 107 67 119)(font "Arial" )) - (line (pt 0 112)(pt 16 112)(line_width 3)) - ) - (port - (pt 0 128) - (input) - (text "in5[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in5[15..0]" (rect 21 123 67 135)(font "Arial" )) - (line (pt 0 128)(pt 16 128)(line_width 3)) - ) - (port - (pt 0 144) - (input) - (text "in6[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in6[15..0]" (rect 21 139 67 151)(font "Arial" )) - (line (pt 0 144)(pt 16 144)(line_width 3)) - ) - (port - (pt 0 160) - (input) - (text "in7[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in7[15..0]" (rect 21 155 67 167)(font "Arial" )) - (line (pt 0 160)(pt 16 160)(line_width 3)) - ) - (port - (pt 184 32) - (output) - (text "result[15..0]" (rect 0 0 59 12)(font "Arial" )) - (text "result[15..0]" (rect 114 27 173 39)(font "Arial" )) - (line (pt 184 32)(pt 168 32)(line_width 3)) - ) - (drawing - (rectangle (rect 16 16 168 192)) - ) -) -(symbol - (rect 1216 272 1400 384) - (text "mux_3x16" (rect 5 0 55 12)(font "Arial" )) - (text "MUX4" (rect 8 96 36 108)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "s[1..0]" (rect 0 0 31 12)(font "Arial" )) - (text "s[1..0]" (rect 21 27 52 39)(font "Arial" )) - (line (pt 0 32)(pt 16 32)(line_width 3)) - ) - (port - (pt 0 48) - (input) - (text "in0[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in0[15..0]" (rect 21 43 67 55)(font "Arial" )) - (line (pt 0 48)(pt 16 48)(line_width 3)) - ) - (port - (pt 0 64) - (input) - (text "in1[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in1[15..0]" (rect 21 59 67 71)(font "Arial" )) - (line (pt 0 64)(pt 16 64)(line_width 3)) - ) - (port - (pt 0 80) - (input) - (text "in2[15..0]" (rect 0 0 46 12)(font "Arial" )) - (text "in2[15..0]" (rect 21 75 67 87)(font "Arial" )) - (line (pt 0 80)(pt 16 80)(line_width 3)) - ) - (port - (pt 184 32) - (output) - (text "result[15..0]" (rect 0 0 59 12)(font "Arial" )) - (text "result[15..0]" (rect 114 27 173 39)(font "Arial" )) - (line (pt 184 32)(pt 168 32)(line_width 3)) - ) - (drawing - (rectangle (rect 16 16 168 96)) - ) -) (symbol (rect 1168 -136 1376 264) (text "DECODE" (rect 5 0 52 12)(font "Arial" )) @@ -1358,24 +1210,31 @@ refer to the applicable agreement for further details. (port (pt 0 48) (input) - (text "EXEC1" (rect 0 0 34 12)(font "Arial" )) - (text "EXEC1" (rect 21 43 55 55)(font "Arial" )) + (text "FETCH" (rect 0 0 36 12)(font "Arial" )) + (text "FETCH" (rect 21 43 57 55)(font "Arial" )) (line (pt 0 48)(pt 16 48)) ) (port (pt 0 64) (input) - (text "EXEC2" (rect 0 0 34 12)(font "Arial" )) - (text "EXEC2" (rect 21 59 55 71)(font "Arial" )) + (text "EXEC1" (rect 0 0 34 12)(font "Arial" )) + (text "EXEC1" (rect 21 59 55 71)(font "Arial" )) (line (pt 0 64)(pt 16 64)) ) (port (pt 0 80) (input) - (text "COND_result" (rect 0 0 66 12)(font "Arial" )) - (text "COND_result" (rect 21 75 87 87)(font "Arial" )) + (text "EXEC2" (rect 0 0 34 12)(font "Arial" )) + (text "EXEC2" (rect 21 75 55 87)(font "Arial" )) (line (pt 0 80)(pt 16 80)) ) + (port + (pt 0 96) + (input) + (text "COND_result" (rect 0 0 66 12)(font "Arial" )) + (text "COND_result" (rect 21 91 87 103)(font "Arial" )) + (line (pt 0 96)(pt 16 96)) + ) (port (pt 208 32) (output) @@ -1463,9 +1322,9 @@ refer to the applicable agreement for further details. (port (pt 208 224) (output) - (text "s4" (rect 0 0 11 12)(font "Arial" )) - (text "s4" (rect 178 219 187 231)(font "Arial" )) - (line (pt 208 224)(pt 192 224)) + (text "s4[1..0]" (rect 0 0 37 12)(font "Arial" )) + (text "s4[1..0]" (rect 156 219 187 231)(font "Arial" )) + (line (pt 208 224)(pt 192 224)(line_width 3)) ) (port (pt 208 240) @@ -1527,56 +1386,6 @@ refer to the applicable agreement for further details. (rectangle (rect 16 16 192 384)) ) ) -(connector - (pt 728 -88) - (pt 728 16) - (bus) -) -(connector - (pt 488 16) - (pt 728 16) - (bus) -) -(connector - (pt 488 -72) - (pt 536 -72) - (bus) -) -(connector - (pt 728 -88) - (pt 744 -88) - (bus) -) -(connector - (text "CLK" (rect 234 -48 254 -31)(font "Intel Clear" )) - (pt 224 -32) - (pt 256 -32) -) -(connector - (pt 488 -112) - (pt 488 -72) - (bus) -) -(connector - (pt 488 -72) - (pt 488 16) - (bus) -) -(connector - (pt 712 -56) - (pt 744 -56) - (bus) -) -(connector - (pt 256 -80) - (pt 208 -80) - (bus) -) -(connector - (text "RAMi_en" (rect 216 -32 259 -15)(font "Intel Clear" )) - (pt 256 -16) - (pt 216 -16) -) (connector (pt 856 192) (pt 936 192) @@ -1603,11 +1412,6 @@ refer to the applicable agreement for further details. (pt 936 208) (pt 880 208) ) -(connector - (pt 472 -112) - (pt 488 -112) - (bus) -) (connector (text "FETCH" (rect 418 32 449 49)(font "Intel Clear" )) (pt 408 48) @@ -1680,36 +1484,11 @@ refer to the applicable agreement for further details. (pt 880 400) (bus) ) -(connector - (text "EXEC1" (rect 506 -104 537 -87)(font "Intel Clear" )) - (pt 536 -88) - (pt 496 -88) -) -(connector - (text "CLK" (rect 506 -72 526 -55)(font "Intel Clear" )) - (pt 536 -56) - (pt 496 -56) -) (connector (text "CARRY" (rect 1122 352 1157 369)(font "Intel Clear" )) (pt 1120 368) (pt 1152 368) ) -(connector - (text "EXEC2" (rect 792 27 809 58)(font "Intel Clear" )(vertical)) - (pt 808 32) - (pt 808 64) -) -(connector - (text "EXEC1" (rect 776 27 793 58)(font "Intel Clear" )(vertical)) - (pt 792 32) - (pt 792 64) -) -(connector - (pt 208 -80) - (pt 208 144) - (bus) -) (connector (text "R0_en" (rect 162 192 192 209)(font "Intel Clear" )) (pt 200 208) @@ -1840,21 +1619,6 @@ refer to the applicable agreement for further details. (pt 136 352) (bus) ) -(connector - (text "CLK" (rect 346 712 366 729)(font "Intel Clear" )) - (pt 336 728) - (pt 392 728) -) -(connector - (text "stack_rst" (rect 346 728 388 745)(font "Intel Clear" )) - (pt 336 744) - (pt 392 744) -) -(connector - (pt 208 144) - (pt 464 144) - (bus) -) (connector (pt 480 208) (pt 632 208) @@ -2163,33 +1927,6 @@ refer to the applicable agreement for further details. (pt 1184 352) (bus) ) -(connector - (text "instr[15..10]" (rect 882 -48 937 -31)(font "Intel Clear" )) - (pt 872 -32) - (pt 936 -32) - (bus) -) -(connector - (pt 872 -72) - (pt 872 -32) - (bus) -) -(connector - (pt 872 -32) - (pt 872 224) - (bus) -) -(connector - (pt 856 -72) - (pt 872 -72) - (bus) -) -(connector - (text "instr[15..0]" (rect 864 -88 913 -71)(font "Intel Clear" )) - (pt 872 -72) - (pt 912 -72) - (bus) -) (connector (pt 1152 192) (pt 1160 192) @@ -2205,32 +1942,6 @@ refer to the applicable agreement for further details. (pt 1160 320) (bus) ) -(connector - (pt 912 -72) - (pt 912 -104) - (bus) -) -(connector - (text "instr[15..0]" (rect 906 -120 955 -103)(font "Intel Clear" )) - (pt 912 -104) - (pt 1168 -104) - (bus) -) -(connector - (text "EXEC1" (rect 1138 -104 1169 -87)(font "Intel Clear" )) - (pt 1128 -88) - (pt 1168 -88) -) -(connector - (text "EXEC2" (rect 1138 -88 1169 -71)(font "Intel Clear" )) - (pt 1128 -72) - (pt 1168 -72) -) -(connector - (text "COND" (rect 1138 -72 1167 -55)(font "Intel Clear" )) - (pt 1128 -56) - (pt 1168 -56) -) (connector (text "R0_count" (rect 1386 -120 1430 -103)(font "Intel Clear" )) (pt 1376 -104) @@ -2294,11 +2005,6 @@ refer to the applicable agreement for further details. (pt 1424 72) (bus) ) -(connector - (text "s4" (rect 1386 72 1396 89)(font "Intel Clear" )) - (pt 1376 88) - (pt 1424 88) -) (connector (text "RAMd_wren" (rect 1386 88 1445 105)(font "Intel Clear" )) (pt 1376 104) @@ -2509,10 +2215,109 @@ refer to the applicable agreement for further details. (pt 1176 776) (bus) ) -(junction (pt 488 -72)) +(connector + (text "CLK" (rect 354 712 374 729)(font "Intel Clear" )) + (pt 344 728) + (pt 392 728) +) +(connector + (text "s4[1..0]" (rect 1386 72 1420 89)(font "Intel Clear" )) + (pt 1376 88) + (pt 1424 88) + (bus) +) +(connector + (text "CLK" (rect 890 416 910 433)(font "Intel Clear" )) + (pt 936 432) + (pt 880 432) +) +(connector + (text "EXEC1" (rect 1138 -88 1169 -71)(font "Intel Clear" )) + (pt 1128 -72) + (pt 1168 -72) +) +(connector + (text "EXEC2" (rect 1138 -72 1169 -55)(font "Intel Clear" )) + (pt 1128 -56) + (pt 1168 -56) +) +(connector + (text "COND" (rect 1138 -56 1167 -39)(font "Intel Clear" )) + (pt 1128 -40) + (pt 1168 -40) +) +(connector + (text "FETCH" (rect 1138 -104 1169 -87)(font "Intel Clear" )) + (pt 1168 -88) + (pt 1128 -88) +) +(connector + (text "SM_rst" (rect 226 64 259 81)(font "Intel Clear" )) + (pt 224 80) + (pt 256 80) +) +(connector + (text "SM_rst" (rect 354 696 387 713)(font "Intel Clear" )) + (pt 344 712) + (pt 392 712) +) +(connector + (pt 464 144) + (pt 208 144) + (bus) +) +(connector + (text "CLK" (rect 578 88 598 105)(font "Intel Clear" )) + (pt 568 104) + (pt 600 104) +) +(connector + (text "RAMi_en" (rect 560 104 603 121)(font "Intel Clear" )) + (pt 560 120) + (pt 600 120) +) +(connector + (pt 600 56) + (pt 568 56) + (bus) +) +(connector + (pt 568 56) + (pt 568 8) + (bus) +) +(connector + (pt 568 8) + (pt 208 8) + (bus) +) +(connector + (pt 208 144) + (pt 208 8) + (bus) +) +(connector + (pt 872 24) + (pt 872 224) + (bus) +) +(connector + (text "instr[15..0]" (rect 826 8 875 25)(font "Intel Clear" )) + (pt 816 24) + (pt 872 24) + (bus) +) +(connector + (pt 872 -104) + (pt 872 24) + (bus) +) +(connector + (pt 872 -104) + (pt 1168 -104) + (bus) +) (junction (pt 856 192)) -(junction (pt 872 -72)) -(junction (pt 872 -32)) (junction (pt 136 320)) (junction (pt 136 352)) (junction (pt 136 384)) @@ -2537,3 +2342,4 @@ refer to the applicable agreement for further details. (junction (pt 560 496)) (junction (pt 576 512)) (junction (pt 1416 496)) +(junction (pt 872 24)) diff --git a/CPUProject.qsf b/CPUProject.qsf index 69f8bc0..21608dd 100644 --- a/CPUProject.qsf +++ b/CPUProject.qsf @@ -38,13 +38,17 @@ set_global_assignment -name FAMILY "Cyclone IV E" set_global_assignment -name DEVICE AUTO -set_global_assignment -name TOP_LEVEL_ENTITY test +set_global_assignment -name TOP_LEVEL_ENTITY CPUProject set_global_assignment -name ORIGINAL_QUARTUS_VERSION 18.1.0 set_global_assignment -name PROJECT_CREATION_TIME_DATE "12:38:11 MAY 20, 2020" set_global_assignment -name LAST_QUARTUS_VERSION "18.1.0 Standard Edition" set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS ON set_global_assignment -name NUM_PARALLEL_PROCESSORS ALL +set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top +set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top +set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top +set_global_assignment -name VERILOG_FILE LIFOstack.v set_global_assignment -name VERILOG_FILE alu.v set_global_assignment -name MIF_FILE LUTSquares.mif set_global_assignment -name BDF_FILE mul8.bdf @@ -63,8 +67,5 @@ set_global_assignment -name VERILOG_FILE SM.v set_global_assignment -name BDF_FILE ALU_top.bdf set_global_assignment -name VERILOG_FILE mux_8x16.v set_global_assignment -name VERILOG_FILE mux_3x16.v -set_global_assignment -name BDF_FILE test.bdf -set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top -set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top -set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top +set_global_assignment -name VECTOR_WAVEFORM_FILE Waveform.vwf set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top \ No newline at end of file diff --git a/CPUProject.qws b/CPUProject.qws new file mode 100644 index 0000000000000000000000000000000000000000..5cfbbc20dfe5600dd97e1fc03872129475e1f03c GIT binary patch literal 4121 zcmeH~&uddb5XZlHRt=td3LbjsK_mz%X^b_!)t?|#Dr(Q#hn@tFtHbQt{DA~vCW_D+1XZC$FZ)PR0UYk=x8+xpc?&z7C zYO4;{Vy>nHp<~dTF6oBWp*9ltnXe(gpsHeRvYykbuIZ}QoF3a*XZ0y7v%0J+>|S$Y zckTqb8+zg;a=O6obx!Y~yEULSt6RG6rH-R(RWEd&GZ(dt1r<&%sQ^`Z5`Hc6#83hK zMb>S#$Wwwgklv&}=WI^2^DnP52xQ*T?Lqo&ofNg1e9Mm+Pg%z7u4fn&L8q}a;k1tC zbrC;1&a;PbxACxv?^P^mo2d3^Hu^TpB_=$v6X6>76LO}pA+MX-)|T##bCM}O0-bV3 zwMLujtP4!d@?K-k@0dBEA186VfvX0D`JNzr+k`&_n#>HFKf|V`zpV#s8*z6?51qM? z`Tp&TQ{+~yi(aDnN1qLO15`z2Edi?v&Meax7;ErLeLxjGpklW=3Q!094a~R9Yq~=W zC4_(L6tH(shcRx{SqGaGxImO2$)i5(9>>N1F)}{VUs^Ji@&Et; literal 0 HcmV?d00001 diff --git a/DECODE.bsf b/DECODE.bsf index fd5546f..3ee64f6 100644 --- a/DECODE.bsf +++ b/DECODE.bsf @@ -33,24 +33,31 @@ refer to the applicable agreement for further details. (port (pt 0 48) (input) - (text "EXEC1" (rect 0 0 30 12)(font "Arial" )) - (text "EXEC1" (rect 21 43 51 55)(font "Arial" )) + (text "FETCH" (rect 0 0 33 12)(font "Arial" )) + (text "FETCH" (rect 21 43 54 55)(font "Arial" )) (line (pt 0 48)(pt 16 48)(line_width 1)) ) (port (pt 0 64) (input) - (text "EXEC2" (rect 0 0 31 12)(font "Arial" )) - (text "EXEC2" (rect 21 59 52 71)(font "Arial" )) + (text "EXEC1" (rect 0 0 30 12)(font "Arial" )) + (text "EXEC1" (rect 21 59 51 71)(font "Arial" )) (line (pt 0 64)(pt 16 64)(line_width 1)) ) (port (pt 0 80) (input) - (text "COND_result" (rect 0 0 55 12)(font "Arial" )) - (text "COND_result" (rect 21 75 76 87)(font "Arial" )) + (text "EXEC2" (rect 0 0 31 12)(font "Arial" )) + (text "EXEC2" (rect 21 75 52 87)(font "Arial" )) (line (pt 0 80)(pt 16 80)(line_width 1)) ) + (port + (pt 0 96) + (input) + (text "COND_result" (rect 0 0 55 12)(font "Arial" )) + (text "COND_result" (rect 21 91 76 103)(font "Arial" )) + (line (pt 0 96)(pt 16 96)(line_width 1)) + ) (port (pt 208 32) (output) @@ -138,9 +145,9 @@ refer to the applicable agreement for further details. (port (pt 208 224) (output) - (text "s4" (rect 0 0 10 12)(font "Arial" )) - (text "s4" (rect 177 219 187 231)(font "Arial" )) - (line (pt 208 224)(pt 192 224)(line_width 1)) + (text "s4[1..0]" (rect 0 0 29 12)(font "Arial" )) + (text "s4[1..0]" (rect 158 219 187 231)(font "Arial" )) + (line (pt 208 224)(pt 192 224)(line_width 3)) ) (port (pt 208 240) diff --git a/DECODE.v b/DECODE.v index 5b29a0a..00c7b30 100644 --- a/DECODE.v +++ b/DECODE.v @@ -1,6 +1,7 @@ module DECODE ( input [15:0] instr, + input FETCH, input EXEC1, input EXEC2, input COND_result, @@ -16,7 +17,7 @@ module DECODE output [2:0] s1, output [2:0] s2, output [2:0] s3, - output s4, + output [1:0]s4, output RAMd_wren, output RAMd_en, output RAMi_en, @@ -39,25 +40,25 @@ module DECODE //Different opcodes (refer to documentation): wire LOAD = msb & ~ls; wire STORE = msb & ls; - wire UJMP = ~op[5] & ~op[4] & ~op[3] & ~op[2]; - wire JMP = (~op[5] & ~op[4] & ~op[3] & op[2]) | (~op[5] & ~op[4] & op[3] & ~op[2]); - wire MUL = ~op[5] & op[4] & op[3] & op[2] & ~op[1] & ~op[0]; - wire MLA = ~op[5] & op[4] & op[3] & op[2] & ~op[1] & op[0]; - wire MLS = ~op[5] & op[4] & op[3] & op[2] & op[1] & ~op[0]; - wire PSH = op[5] & ~op[4] & op[3] & ~op[2] & ~op[1] & ~op[0]; - wire POP = op[5] & ~op[4] & op[3] & ~op[2] & ~op[1] & op[0]; - wire NOP = op[5] & op[4] & op[3] & op[2] & op[1] & ~op[0]; - wire STP = op[5] & op[4] & op[3] & op[2] & op[1] & op[0]; + wire UJMP = ~msb & ~op[5] & ~op[4] & ~op[3] & ~op[2]; + wire JMP = ~msb & (~op[5] & ~op[4] & ~op[3] & op[2]) | (~op[5] & ~op[4] & op[3] & ~op[2]); + wire MUL = ~msb & ~op[5] & op[4] & op[3] & op[2] & ~op[1] & ~op[0]; + wire MLA = ~msb & ~op[5] & op[4] & op[3] & op[2] & ~op[1] & op[0]; + wire MLS = ~msb & ~op[5] & op[4] & op[3] & op[2] & op[1] & ~op[0]; + wire PSH = ~msb & op[5] & ~op[4] & op[3] & ~op[2] & ~op[1] & ~op[0]; + wire POP = ~msb & op[5] & ~op[4] & op[3] & ~op[2] & ~op[1] & op[0]; + wire NOP = ~msb & op[5] & op[4] & op[3] & op[2] & op[1] & ~op[0]; + wire STP = ~msb & op[5] & op[4] & op[3] & op[2] & op[1] & op[0]; - assign R0_count = EXEC1 & (~(UJMP | JMP | STP)); - assign R0_en = EXEC1 & (~(STORE | NOP | STP) & ~Rd[2] & ~Rd[1] & ~Rd[0] | UJMP | JMP & COND_result) | EXEC2 & LOAD & ~Rls[2] & ~Rls[1] & ~Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & ~Rd[2] & ~Rd[1] & ~Rd[0]; - assign R1_en = EXEC1 & ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & ~Rd[2] & ~Rd[1] & Rd[0] | EXEC2 & LOAD & ~Rls[2] & ~Rls[1] & Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & ~Rd[2] & ~Rd[1] & Rd[0]; - assign R2_en = EXEC1 & ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & ~Rd[2] & Rd[1] & ~Rd[0] | EXEC2 & LOAD & ~Rls[2] & Rls[1] & ~Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & ~Rd[2] & Rd[1] & ~Rd[0]; - assign R3_en = EXEC1 & ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & ~Rd[2] & Rd[1] & Rd[0] | EXEC2 & LOAD & ~Rls[2] & Rls[1] & Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & ~Rd[2] & Rd[1] & Rd[0]; - assign R4_en = EXEC1 & ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & Rd[2] & ~Rd[1] & ~Rd[0] | EXEC2 & LOAD & Rls[2] & ~Rls[1] & ~Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & Rd[2] & ~Rd[1] & ~Rd[0]; - assign R5_en = EXEC1 & ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & Rd[2] & ~Rd[1] & Rd[0] | EXEC2 & LOAD & Rls[2] & ~Rls[1] & Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & Rd[2] & ~Rd[1] & Rd[0]; - assign R6_en = EXEC1 & ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & Rd[2] & Rd[1] & ~Rd[0] | EXEC2 & LOAD & Rls[2] & Rls[1] & ~Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & Rd[2] & Rd[1] & ~Rd[0]; - assign R7_en = EXEC1 & ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & Rd[2] & Rd[1] & Rd[0] | EXEC2 & LOAD & Rls[2] & Rls[1] & Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & Rd[2] & Rd[1] & Rd[0]; + assign R0_count = EXEC1 & (~(UJMP | JMP & ~COND_result | STP)); + assign R0_en = EXEC1 & (~(STORE | NOP | STP | LOAD) & ~Rd[2] & ~Rd[1] & ~Rd[0] | UJMP | JMP & COND_result) | EXEC2 & LOAD & ~Rls[2] & ~Rls[1] & ~Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & ~Rd[2] & ~Rd[1] & ~Rd[0]; + assign R1_en = ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & ~Rd[2] & ~Rd[1] & Rd[0] | EXEC2 & LOAD & ~Rls[2] & ~Rls[1] & Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & ~Rd[2] & ~Rd[1] & Rd[0]; + assign R2_en = ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & ~Rd[2] & Rd[1] & ~Rd[0] | EXEC2 & LOAD & ~Rls[2] & Rls[1] & ~Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & ~Rd[2] & Rd[1] & ~Rd[0]; + assign R3_en = ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & ~Rd[2] & Rd[1] & Rd[0] | EXEC2 & LOAD & ~Rls[2] & Rls[1] & Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & ~Rd[2] & Rd[1] & Rd[0]; + assign R4_en = ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & Rd[2] & ~Rd[1] & ~Rd[0] | EXEC2 & LOAD & Rls[2] & ~Rls[1] & ~Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & Rd[2] & ~Rd[1] & ~Rd[0]; + assign R5_en = ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & Rd[2] & ~Rd[1] & Rd[0] | EXEC2 & LOAD & Rls[2] & ~Rls[1] & Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & Rd[2] & ~Rd[1] & Rd[0]; + assign R6_en = ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & Rd[2] & Rd[1] & ~Rd[0] | EXEC2 & LOAD & Rls[2] & Rls[1] & ~Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & Rd[2] & Rd[1] & ~Rd[0]; + assign R7_en = ~(UJMP | JMP | STORE | LOAD | MUL | MLA | MLS | NOP | STP | POP) & Rd[2] & Rd[1] & Rd[0] | EXEC2 & LOAD & Rls[2] & Rls[1] & Rls[0] | EXEC2 & (MUL | MLA | MLS | POP) & Rd[2] & Rd[1] & Rd[0]; assign s1[2] = EXEC1 & ((~(UJMP | JMP | STORE | LOAD | NOP | STP | PSH | POP) & Rs1[2]) | (STORE & Rls[2]) | (PSH & Rs1[2])); assign s1[1] = EXEC1 & ((~(UJMP | JMP | STORE | LOAD | NOP | STP | PSH | POP) & Rs1[1]) | (STORE & Rls[1]) | (PSH & Rs1[1])); assign s1[0] = EXEC1 & ((~(UJMP | JMP | STORE | LOAD | NOP | STP | PSH | POP) & Rs1[0]) | (STORE & Rls[0]) | (PSH & Rs1[0])); @@ -67,10 +68,11 @@ module DECODE assign s3[2] = EXEC1 & ((~(UJMP | JMP | STORE | LOAD | NOP | STP | PSH | POP)) & Rd[2]); assign s3[1] = EXEC1 & ((~(UJMP | JMP | STORE | LOAD | NOP | STP | PSH | POP)) & Rd[1]); assign s3[0] = EXEC1 & ((~(UJMP | JMP | STORE | LOAD | NOP | STP | PSH | POP)) & Rd[0]); - assign s4 = EXEC1 & ~(LOAD | STORE); + assign s4[1] = POP | PSH; + assign s4[0] = ~(LOAD | POP | PSH); assign RAMd_wren = EXEC1 & STORE; assign RAMd_en = EXEC1 & (STORE | LOAD); - assign RAMi_en = EXEC1 & ~STP | EXEC2 & (LOAD | MUL | MLA | MLS); + assign RAMi_en = FETCH; assign ALU_en = LOAD | STORE; assign E2 = EXEC1 & (LOAD | MUL | MLA | MLS | POP); assign stack_en = (EXEC1 & PSH) | POP; diff --git a/SM.bsf b/SM.bsf index 7046e8d..149407f 100644 --- a/SM.bsf +++ b/SM.bsf @@ -37,6 +37,13 @@ refer to the applicable agreement for further details. (text "E2" (rect 21 43 32 55)(font "Arial" )) (line (pt 0 48)(pt 16 48)(line_width 1)) ) + (port + (pt 0 64) + (input) + (text "RST" (rect 0 0 20 12)(font "Arial" )) + (text "RST" (rect 21 59 41 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)(line_width 1)) + ) (port (pt 152 32) (output) diff --git a/SM.v b/SM.v index b1be002..09753b3 100644 --- a/SM.v +++ b/SM.v @@ -2,6 +2,7 @@ module SM ( input CLK, input E2, + input RST, output FETCH, output EXEC1, output EXEC2 @@ -11,9 +12,9 @@ reg [2:0]s = 3'b1; //current state initialised to 001 always @(posedge CLK) //Change on rising edge of clock begin - s[2] <= ~s[2] & s[1] & ~s[0] & E2; - s[1] <= ~s[2] & ~s[1] & s[0]; - s[0] <= (~s[2] & s[1] & ~s[0] & ~E2) | (s[2] & ~s[1] & ~s[0]); + s[2] <= ~s[2] & s[1] & ~s[0] & E2 & ~RST; + s[1] <= ~s[2] & ~s[1] & s[0] & ~RST; + s[0] <= (~s[2] & s[1] & ~s[0] & ~E2) | (s[2] & ~s[1] & ~s[0]) | RST; end assign FETCH = s[0]; diff --git a/data.mif b/data.mif index 9fdeed9..32d8d9a 100644 --- a/data.mif +++ b/data.mif @@ -21,5 +21,22 @@ ADDRESS_RADIX=HEX; DATA_RADIX=HEX; CONTENT BEGIN - [000..7FF] : 0000; + 000 : 0002; + 001 : 0003; + 002 : 0000; + 003 : FFFF; + 004 : BFFF; + 005 : 000A; + 006 : 001B; + 007 : 001E; + 008 : 0021; + 009 : 0024; + 00A : 0027; + 00B : 0000; + 00C : 002B; + 00D : 002E; + 00E : 0031; + 00F : 0036; + 010 : AAAA; + [011..7FF] : 0000; END; diff --git a/instr.mif b/instr.mif index 9fdeed9..86abeb0 100644 --- a/instr.mif +++ b/instr.mif @@ -21,5 +21,69 @@ ADDRESS_RADIX=HEX; DATA_RADIX=HEX; CONTENT BEGIN - [000..7FF] : 0000; + 000 : 8800; + 001 : 9001; + 002 : 26D0; + 003 : 291A; + 004 : 2D00; + 005 : 3161; + 006 : 3440; + 007 : 3993; + 008 : 3AA5; + 009 : D003; + 00A : 3CE2; + 00B : A003; + 00C : 9804; + 00D : 38A5; + 00E : 3FC0; + 00F : 419F; + 010 : 304F; + 011 : 5008; + 012 : 5028; + 013 : 284F; + 014 : 43F7; + 015 : 3540; + 016 : 47F5; + 017 : 484D; + 018 : 8806; + 019 : 0040; + 01A : B800; + 01B : 8807; + 01C : 085A; + 01D : B800; + 01E : 8808; + 01F : 0A7D; + 020 : B800; + 021 : 8809; + 022 : 0C53; + 023 : B801; + 024 : 880A; + 025 : B00B; + 026 : 0E70; + 027 : B800; + 028 : 880C; + 029 : 1063; + 02A : B800; + 02B : 880D; + 02C : 126D; + 02D : B800; + 02E : 880E; + 02F : 147A; + 030 : B800; + 031 : 880F; + 032 : 5340; + 033 : 53C0; + 034 : 1678; + 035 : B800; + 036 : 1863; + 037 : 1A5A; + 038 : 1FB8; + 039 : 7C00; + 03A : 1C77; + 03B : 204C; + 03C : A810; + 03D : 226D; + 03E : 246D; + 03F : 7E00; + [040..7FF] : 0000; END; diff --git a/reg_file.bdf b/reg_file.bdf index 0d51917..39bfe26 100644 --- a/reg_file.bdf +++ b/reg_file.bdf @@ -23,7 +23,7 @@ refer to the applicable agreement for further details. (input) (rect 112 136 280 152) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "CLK" (rect 5 0 26 17)(font "Intel Clear" )) + (text "CLK" (rect 5 0 25 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -39,7 +39,7 @@ refer to the applicable agreement for further details. (input) (rect 184 208 352 224) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R0_en" (rect 5 0 37 12)(font "Arial" )) + (text "R0_en" (rect 5 0 36 12)(font "Arial" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -55,7 +55,7 @@ refer to the applicable agreement for further details. (input) (rect 184 320 352 336) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R0_count" (rect 5 0 50 17)(font "Intel Clear" )) + (text "R0_count" (rect 5 0 49 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -69,9 +69,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 160 424 328 440) + (rect 160 472 328 488) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R1_en" (rect 5 0 36 17)(font "Intel Clear" )) + (text "R1_en" (rect 5 0 35 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -85,9 +85,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 160 576 328 592) + (rect 160 624 328 640) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R2_en" (rect 5 0 36 17)(font "Intel Clear" )) + (text "R2_en" (rect 5 0 35 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -101,9 +101,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 160 728 328 744) + (rect 160 776 328 792) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R3_en" (rect 5 0 36 17)(font "Intel Clear" )) + (text "R3_en" (rect 5 0 35 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -117,9 +117,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 160 880 328 896) + (rect 160 928 328 944) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R4_en" (rect 5 0 36 17)(font "Intel Clear" )) + (text "R4_en" (rect 5 0 35 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -133,9 +133,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 160 1032 328 1048) + (rect 160 1080 328 1096) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R5_en" (rect 5 0 36 17)(font "Intel Clear" )) + (text "R5_en" (rect 5 0 35 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -149,9 +149,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 160 1184 328 1200) + (rect 160 1232 328 1248) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R6_en" (rect 5 0 36 17)(font "Intel Clear" )) + (text "R6_en" (rect 5 0 35 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -165,9 +165,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 160 1336 328 1352) + (rect 160 1384 328 1400) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R7_en" (rect 5 0 36 17)(font "Intel Clear" )) + (text "R7_en" (rect 5 0 35 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -183,7 +183,7 @@ refer to the applicable agreement for further details. (input) (rect 184 240 352 256) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R0_in[15..0]" (rect 5 0 62 17)(font "Intel Clear" )) + (text "R0_in[15..0]" (rect 5 0 61 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -197,9 +197,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 144 408 312 424) + (rect 160 440 328 456) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R1_in[15..0]" (rect 5 0 62 17)(font "Intel Clear" )) + (text "R1_in[15..0]" (rect 5 0 61 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -213,9 +213,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 144 560 312 576) + (rect 160 592 328 608) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R2_in[15..0]" (rect 5 0 62 17)(font "Intel Clear" )) + (text "R2_in[15..0]" (rect 5 0 61 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -229,9 +229,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 144 712 312 728) + (rect 160 744 328 760) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R3_in[15..0]" (rect 5 0 62 17)(font "Intel Clear" )) + (text "R3_in[15..0]" (rect 5 0 61 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -245,9 +245,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 144 864 312 880) + (rect 160 896 328 912) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R4_in[15..0]" (rect 5 0 62 17)(font "Intel Clear" )) + (text "R4_in[15..0]" (rect 5 0 61 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -261,9 +261,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 144 1016 312 1032) + (rect 160 1048 328 1064) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R5_in[15..0]" (rect 5 0 62 17)(font "Intel Clear" )) + (text "R5_in[15..0]" (rect 5 0 61 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -277,9 +277,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 144 1168 312 1184) + (rect 160 1200 328 1216) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R6_in[15..0]" (rect 5 0 62 17)(font "Intel Clear" )) + (text "R6_in[15..0]" (rect 5 0 61 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -293,9 +293,9 @@ refer to the applicable agreement for further details. ) (pin (input) - (rect 144 1320 312 1336) + (rect 160 1352 328 1368) (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "R7_in[15..0]" (rect 5 0 62 17)(font "Intel Clear" )) + (text "R7_in[15..0]" (rect 5 0 61 17)(font "Intel Clear" )) (pt 168 8) (drawing (line (pt 84 12)(pt 109 12)) @@ -634,7 +634,6 @@ refer to the applicable agreement for further details. (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (line (pt 0 104)(pt 16 104)) - (unused) ) (port (pt 0 120) @@ -650,6 +649,7 @@ refer to the applicable agreement for further details. (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (line (pt 0 56)(pt 16 56)) + (unused) ) (port (pt 0 40) @@ -746,7 +746,6 @@ refer to the applicable agreement for further details. (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (line (pt 0 104)(pt 16 104)) - (unused) ) (port (pt 0 120) @@ -762,6 +761,7 @@ refer to the applicable agreement for further details. (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (line (pt 0 56)(pt 16 56)) + (unused) ) (port (pt 0 40) @@ -858,7 +858,6 @@ refer to the applicable agreement for further details. (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (line (pt 0 104)(pt 16 104)) - (unused) ) (port (pt 0 120) @@ -874,6 +873,7 @@ refer to the applicable agreement for further details. (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (line (pt 0 56)(pt 16 56)) + (unused) ) (port (pt 0 40) @@ -970,7 +970,6 @@ refer to the applicable agreement for further details. (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (line (pt 0 104)(pt 16 104)) - (unused) ) (port (pt 0 120) @@ -986,6 +985,7 @@ refer to the applicable agreement for further details. (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (line (pt 0 56)(pt 16 56)) + (unused) ) (port (pt 0 40) @@ -1082,7 +1082,6 @@ refer to the applicable agreement for further details. (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (line (pt 0 104)(pt 16 104)) - (unused) ) (port (pt 0 120) @@ -1098,6 +1097,7 @@ refer to the applicable agreement for further details. (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (line (pt 0 56)(pt 16 56)) + (unused) ) (port (pt 0 40) @@ -1194,7 +1194,6 @@ refer to the applicable agreement for further details. (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (line (pt 0 104)(pt 16 104)) - (unused) ) (port (pt 0 120) @@ -1210,6 +1209,7 @@ refer to the applicable agreement for further details. (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (line (pt 0 56)(pt 16 56)) + (unused) ) (port (pt 0 40) @@ -1306,7 +1306,6 @@ refer to the applicable agreement for further details. (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (text "enable" (rect 20 97 57 111)(font "Arial" (font_size 8))) (line (pt 0 104)(pt 16 104)) - (unused) ) (port (pt 0 120) @@ -1322,6 +1321,7 @@ refer to the applicable agreement for further details. (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (text "sload" (rect 20 49 50 63)(font "Arial" (font_size 8))) (line (pt 0 56)(pt 16 56)) + (unused) ) (port (pt 0 40) @@ -1556,111 +1556,6 @@ refer to the applicable agreement for further details. (pt 672 432) (bus) ) -(connector - (pt 328 600) - (pt 320 600) - (bus) -) -(connector - (pt 320 448) - (pt 320 416) - (bus) -) -(connector - (pt 328 448) - (pt 320 448) - (bus) -) -(connector - (pt 320 416) - (pt 312 416) - (bus) -) -(connector - (pt 320 600) - (pt 320 568) - (bus) -) -(connector - (pt 320 568) - (pt 312 568) - (bus) -) -(connector - (pt 320 752) - (pt 320 720) - (bus) -) -(connector - (pt 328 752) - (pt 320 752) - (bus) -) -(connector - (pt 320 720) - (pt 312 720) - (bus) -) -(connector - (pt 320 904) - (pt 320 872) - (bus) -) -(connector - (pt 328 904) - (pt 320 904) - (bus) -) -(connector - (pt 320 872) - (pt 312 872) - (bus) -) -(connector - (pt 320 1056) - (pt 320 1024) - (bus) -) -(connector - (pt 328 1056) - (pt 320 1056) - (bus) -) -(connector - (pt 320 1024) - (pt 312 1024) - (bus) -) -(connector - (pt 320 1208) - (pt 320 1176) - (bus) -) -(connector - (pt 328 1208) - (pt 320 1208) - (bus) -) -(connector - (pt 320 1176) - (pt 312 1176) - (bus) -) -(connector - (pt 320 1360) - (pt 320 1328) - (bus) -) -(connector - (pt 328 1360) - (pt 320 1360) - (bus) -) -(connector - (pt 320 1328) - (pt 312 1328) - (bus) -) (junction (pt 128 1224)) (junction (pt 128 1072)) (junction (pt 128 920)) diff --git a/test.bdf b/test.bdf deleted file mode 100644 index e016cc5..0000000 --- a/test.bdf +++ /dev/null @@ -1,127 +0,0 @@ -/* -WARNING: Do NOT edit the input and output ports in this file in a text -editor if you plan to continue editing the block that represents it in -the Block Editor! File corruption is VERY likely to occur. -*/ -/* -Copyright (C) 2018 Intel Corporation. All rights reserved. -Your use of Intel Corporation's design tools, logic functions -and other software and tools, and its AMPP partner logic -functions, and any output files from any of the foregoing -(including device programming or simulation files), and any -associated documentation or information are expressly subject -to the terms and conditions of the Intel Program License -Subscription Agreement, the Intel Quartus Prime License Agreement, -the Intel FPGA IP License Agreement, or other applicable license -agreement, including, without limitation, that your use is for -the sole purpose of programming logic devices manufactured by -Intel and sold by Intel or its authorized distributors. Please -refer to the applicable agreement for further details. -*/ -(header "graphic" (version "1.4")) -(pin - (input) - (rect 176 288 344 304) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "A" (rect 5 0 14 12)(font "Arial" )) - (pt 168 8) - (drawing - (line (pt 84 12)(pt 109 12)) - (line (pt 84 4)(pt 109 4)) - (line (pt 113 8)(pt 168 8)) - (line (pt 84 12)(pt 84 4)) - (line (pt 109 4)(pt 113 8)) - (line (pt 109 12)(pt 113 8)) - ) - (text "VCC" (rect 128 7 148 17)(font "Arial" (font_size 6))) -) -(pin - (input) - (rect 176 304 344 320) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "B" (rect 5 0 13 17)(font "Intel Clear" )) - (pt 168 8) - (drawing - (line (pt 84 12)(pt 109 12)) - (line (pt 84 4)(pt 109 4)) - (line (pt 113 8)(pt 168 8)) - (line (pt 84 12)(pt 84 4)) - (line (pt 109 4)(pt 113 8)) - (line (pt 109 12)(pt 113 8)) - ) - (text "VCC" (rect 128 7 148 17)(font "Arial" (font_size 6))) -) -(pin - (output) - (rect 464 296 640 312) - (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "OUT1" (rect 90 0 117 17)(font "Intel Clear" )) - (pt 0 8) - (drawing - (line (pt 0 8)(pt 52 8)) - (line (pt 52 4)(pt 78 4)) - (line (pt 52 12)(pt 78 12)) - (line (pt 52 12)(pt 52 4)) - (line (pt 78 4)(pt 82 8)) - (line (pt 82 8)(pt 78 12)) - (line (pt 78 12)(pt 82 8)) - ) -) -(pin - (output) - (rect 536 208 712 224) - (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) - (text "OUT2" (rect 90 0 118 12)(font "Arial" )) - (pt 0 8) - (drawing - (line (pt 0 8)(pt 52 8)) - (line (pt 52 4)(pt 78 4)) - (line (pt 52 12)(pt 78 12)) - (line (pt 52 12)(pt 52 4)) - (line (pt 78 4)(pt 82 8)) - (line (pt 82 8)(pt 78 12)) - (line (pt 78 12)(pt 82 8)) - ) -) -(symbol - (rect 344 280 408 328) - (text "AND2" (rect 1 0 25 10)(font "Arial" (font_size 6))) - (text "inst" (rect 3 37 20 49)(font "Arial" )) - (port - (pt 0 16) - (input) - (text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible)) - (text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible)) - (line (pt 0 16)(pt 14 16)) - ) - (port - (pt 0 32) - (input) - (text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible)) - (text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible)) - (line (pt 0 32)(pt 14 32)) - ) - (port - (pt 64 24) - (output) - (text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible)) - (text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible)) - (line (pt 42 24)(pt 64 24)) - ) - (drawing - (line (pt 14 12)(pt 30 12)) - (line (pt 14 37)(pt 31 37)) - (line (pt 14 12)(pt 14 37)) - (arc (pt 31 37)(pt 30 12)(rect 18 12 43 37)) - ) -) -(connector - (text "hi" (rect 418 288 426 305)(font "Intel Clear" )) - (pt 408 304) - (pt 464 304) -) -(connector - (text "hi" (rect 522 200 530 217)(font "Intel Clear" )) - (pt 536 216) - (pt 512 216) -)