From 5dd725f7bf5f015748a9351ec8831f3b01affd00 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 14 Jun 2020 15:47:34 +0100 Subject: [PATCH] Brought up to date with Pipelined --- ALU_top.bdf | 11 ++- ALU_top.bsf | 7 +- CPUProject.bdf | 223 ++++++++++++++++++++++++------------------------- CPUProject.qsf | 12 +-- CPUProject.qws | Bin 673 -> 2985 bytes DECODE.bsf | 7 +- DECODE.v | 48 ++++++----- alu.bsf | 11 ++- alu.v | 19 +++-- mux_3x16.bsf | 64 -------------- mux_3x16.v | 19 ----- mux_3x16.v.bak | 18 ---- 12 files changed, 168 insertions(+), 271 deletions(-) delete mode 100644 mux_3x16.bsf delete mode 100644 mux_3x16.v delete mode 100644 mux_3x16.v.bak diff --git a/ALU_top.bdf b/ALU_top.bdf index 785f265..63139ce 100644 --- a/ALU_top.bdf +++ b/ALU_top.bdf @@ -4,9 +4,9 @@ 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) 2019 Intel Corporation. All rights reserved. +Copyright (C) 2018 Intel Corporation. All rights reserved. Your use of Intel Corporation's design tools, logic functions -and other software and tools, and any partner logic +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 @@ -16,8 +16,7 @@ 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, at -https://fpgasoftware.intel.com/eula. +refer to the applicable agreement for further details. */ (header "graphic" (version "1.4")) (pin @@ -299,8 +298,8 @@ https://fpgasoftware.intel.com/eula. (port (pt 0 96) (input) - (text "opcode[5..0]" (rect 0 0 61 12)(font "Arial" )) - (text "opcode[5..0]" (rect 21 91 82 103)(font "Arial" )) + (text "instr[15..0]" (rect 0 0 53 12)(font "Arial" )) + (text "instr[15..0]" (rect 21 91 74 103)(font "Arial" )) (line (pt 0 96)(pt 16 96)(line_width 3)) ) (port diff --git a/ALU_top.bsf b/ALU_top.bsf index dac5b6c..d8e24ad 100644 --- a/ALU_top.bsf +++ b/ALU_top.bsf @@ -4,9 +4,9 @@ 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) 2019 Intel Corporation. All rights reserved. +Copyright (C) 2018 Intel Corporation. All rights reserved. Your use of Intel Corporation's design tools, logic functions -and other software and tools, and any partner logic +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 @@ -16,8 +16,7 @@ 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, at -https://fpgasoftware.intel.com/eula. +refer to the applicable agreement for further details. */ (header "symbol" (version "1.2")) (symbol diff --git a/CPUProject.bdf b/CPUProject.bdf index 9cdc317..763dfc9 100644 --- a/CPUProject.bdf +++ b/CPUProject.bdf @@ -4,9 +4,9 @@ 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) 2019 Intel Corporation. All rights reserved. +Copyright (C) 2018 Intel Corporation. All rights reserved. Your use of Intel Corporation's design tools, logic functions -and other software and tools, and any partner logic +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 @@ -16,8 +16,7 @@ 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, at -https://fpgasoftware.intel.com/eula. +refer to the applicable agreement for further details. */ (header "graphic" (version "1.4")) (properties @@ -270,7 +269,7 @@ https://fpgasoftware.intel.com/eula. (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" )) + (text "result[15..0]" (rect 114 27 173 39)(font "Arial" )) (line (pt 184 32)(pt 168 32)(line_width 3)) ) (drawing @@ -348,7 +347,7 @@ https://fpgasoftware.intel.com/eula. (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" )) + (text "result[15..0]" (rect 114 27 173 39)(font "Arial" )) (line (pt 184 32)(pt 168 32)(line_width 3)) ) (drawing @@ -426,7 +425,7 @@ https://fpgasoftware.intel.com/eula. (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" )) + (text "result[15..0]" (rect 114 27 173 39)(font "Arial" )) (line (pt 184 32)(pt 168 32)(line_width 3)) ) (drawing @@ -652,21 +651,21 @@ https://fpgasoftware.intel.com/eula. (pt 152 32) (output) (text "FETCH" (rect 0 0 36 12)(font "Arial" )) - (text "FETCH" (rect 101 27 131 39)(font "Arial" )) + (text "FETCH" (rect 101 27 137 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 131 55)(font "Arial" )) + (text "EXEC1" (rect 103 43 137 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 131 71)(font "Arial" )) + (text "EXEC2" (rect 103 59 137 71)(font "Arial" )) (line (pt 152 64)(pt 136 64)) ) (drawing @@ -716,112 +715,13 @@ https://fpgasoftware.intel.com/eula. (pt 184 32) (output) (text "Dout[15..0]" (rect 0 0 55 12)(font "Arial" )) - (text "Dout[15..0]" (rect 117 27 163 39)(font "Arial" )) + (text "Dout[15..0]" (rect 117 27 172 39)(font "Arial" )) (line (pt 184 32)(pt 168 32)(line_width 3)) ) (drawing (rectangle (rect 16 16 168 128)) ) ) -(symbol - (rect 928 320 1184 512) - (text "ALU_top" (rect 5 0 56 19)(font "Intel Clear" (font_size 8))) - (text "ALU" (rect 8 171 28 188)(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 "stack_data[15..0]" (rect 0 0 103 19)(font "Intel Clear" (font_size 8))) - (text "stack_data[15..0]" (rect 21 123 124 142)(font "Intel Clear" (font_size 8))) - (line (pt 0 128)(pt 16 128)(line_width 3)) - ) - (port - (pt 0 144) - (input) - (text "CLK" (rect 0 0 23 19)(font "Intel Clear" (font_size 8))) - (text "CLK" (rect 21 139 44 158)(font "Intel Clear" (font_size 8))) - (line (pt 0 144)(pt 16 144)) - ) - (port - (pt 256 32) - (output) - (text "mul1[15..0]" (rect 0 0 69 19)(font "Intel Clear" (font_size 8))) - (text "mul1[15..0]" (rect 166 27 235 46)(font "Intel Clear" (font_size 8))) - (line (pt 256 32)(pt 240 32)(line_width 3)) - ) - (port - (pt 256 48) - (output) - (text "mul2[15..0]" (rect 0 0 69 19)(font "Intel Clear" (font_size 8))) - (text "mul2[15..0]" (rect 166 43 235 62)(font "Intel Clear" (font_size 8))) - (line (pt 256 48)(pt 240 48)(line_width 3)) - ) - (port - (pt 256 64) - (output) - (text "Rout[15..0]" (rect 0 0 66 19)(font "Intel Clear" (font_size 8))) - (text "Rout[15..0]" (rect 169 59 235 78)(font "Intel Clear" (font_size 8))) - (line (pt 256 64)(pt 240 64)(line_width 3)) - ) - (port - (pt 256 80) - (output) - (text "COND" (rect 0 0 36 19)(font "Intel Clear" (font_size 8))) - (text "COND" (rect 199 75 235 94)(font "Intel Clear" (font_size 8))) - (line (pt 256 80)(pt 240 80)) - ) - (port - (pt 256 96) - (output) - (text "memaddr[10..0]" (rect 0 0 97 19)(font "Intel Clear" (font_size 8))) - (text "memaddr[10..0]" (rect 138 91 235 110)(font "Intel Clear" (font_size 8))) - (line (pt 256 96)(pt 240 96)(line_width 3)) - ) - (drawing - (rectangle (rect 16 16 240 176)) - ) -) (symbol (rect 936 160 1152 304) (text "ram_data" (rect 74 0 137 16)(font "Arial" (font_size 10))) @@ -942,7 +842,7 @@ https://fpgasoftware.intel.com/eula. (pt 112 48) (output) (text "result[WIDTH-1..0]" (rect 75 35 177 49)(font "Arial" (font_size 8))) - (text "result[]" (rect 75 35 107 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 @@ -990,7 +890,7 @@ https://fpgasoftware.intel.com/eula. (pt 112 48) (output) (text "result[WIDTH-1..0]" (rect 75 35 177 49)(font "Arial" (font_size 8))) - (text "result[]" (rect 75 35 107 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 @@ -1297,6 +1197,105 @@ https://fpgasoftware.intel.com/eula. (rectangle (rect 16 16 192 384)) ) ) +(symbol + (rect 928 320 1184 512) + (text "ALU_top" (rect 5 0 56 19)(font "Intel Clear" (font_size 8))) + (text "ALU" (rect 8 171 28 188)(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 "stack_data[15..0]" (rect 0 0 103 19)(font "Intel Clear" (font_size 8))) + (text "stack_data[15..0]" (rect 21 123 124 142)(font "Intel Clear" (font_size 8))) + (line (pt 0 128)(pt 16 128)(line_width 3)) + ) + (port + (pt 0 144) + (input) + (text "CLK" (rect 0 0 23 19)(font "Intel Clear" (font_size 8))) + (text "CLK" (rect 21 139 44 158)(font "Intel Clear" (font_size 8))) + (line (pt 0 144)(pt 16 144)) + ) + (port + (pt 256 32) + (output) + (text "mul1[15..0]" (rect 0 0 69 19)(font "Intel Clear" (font_size 8))) + (text "mul1[15..0]" (rect 166 27 235 46)(font "Intel Clear" (font_size 8))) + (line (pt 256 32)(pt 240 32)(line_width 3)) + ) + (port + (pt 256 48) + (output) + (text "mul2[15..0]" (rect 0 0 69 19)(font "Intel Clear" (font_size 8))) + (text "mul2[15..0]" (rect 166 43 235 62)(font "Intel Clear" (font_size 8))) + (line (pt 256 48)(pt 240 48)(line_width 3)) + ) + (port + (pt 256 64) + (output) + (text "Rout[15..0]" (rect 0 0 66 19)(font "Intel Clear" (font_size 8))) + (text "Rout[15..0]" (rect 169 59 235 78)(font "Intel Clear" (font_size 8))) + (line (pt 256 64)(pt 240 64)(line_width 3)) + ) + (port + (pt 256 80) + (output) + (text "COND" (rect 0 0 36 19)(font "Intel Clear" (font_size 8))) + (text "COND" (rect 199 75 235 94)(font "Intel Clear" (font_size 8))) + (line (pt 256 80)(pt 240 80)) + ) + (port + (pt 256 96) + (output) + (text "memaddr[10..0]" (rect 0 0 97 19)(font "Intel Clear" (font_size 8))) + (text "memaddr[10..0]" (rect 138 91 235 110)(font "Intel Clear" (font_size 8))) + (line (pt 256 96)(pt 240 96)(line_width 3)) + ) + (drawing + (rectangle (rect 16 16 240 176)) + ) +) (connector (pt 856 192) (pt 936 192) diff --git a/CPUProject.qsf b/CPUProject.qsf index 0e69956..d8e4b39 100644 --- a/CPUProject.qsf +++ b/CPUProject.qsf @@ -41,7 +41,7 @@ set_global_assignment -name DEVICE AUTO 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 "19.1.0 Lite Edition" +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 @@ -62,12 +62,13 @@ set_global_assignment -name POWER_USE_PVA ON 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_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top +set_global_assignment -name VERILOG_FILE max_min.v set_global_assignment -name SDC_FILE CPUProject.sdc 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 -set_global_assignment -name BDF_FILE abs.bdf set_global_assignment -name BDF_FILE CPUProject.bdf set_global_assignment -name BDF_FILE reg_file.bdf set_global_assignment -name QIP_FILE ram_data.qip @@ -77,13 +78,8 @@ set_global_assignment -name MIF_FILE data.mif set_global_assignment -name MIF_FILE instr.mif set_global_assignment -name BDF_FILE mul16.bdf set_global_assignment -name QIP_FILE LUT.qip -set_global_assignment -name VERILOG_FILE min.v 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 VERILOG_FILE ADD_1.v -set_global_assignment -name VERILOG_FILE SM_pipelined.v -set_global_assignment -name VECTOR_WAVEFORM_FILE Waveform.vwf -set_global_assignment -name VECTOR_WAVEFORM_FILE Waveform1.vwf -set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top \ No newline at end of file +set_global_assignment -name VERILOG_FILE SM_pipelined.v \ No newline at end of file diff --git a/CPUProject.qws b/CPUProject.qws index d4099da20b1bda1e89b73250ae070e8477b55336..0371c294b31179f8778a90c83a1462484b66f0c7 100644 GIT binary patch literal 2985 zcmeH}zityj5XQf=LljY^iYQW0AY>ugvW-ccj{j98A_NskA-=nWV1u2*2?!LC8u1u3 zRJ;K^01Yh?5-&kVApB;tHr5(kSe8H*dz#&w+1c5dx$kE8VnMyOsFpVLSY55_iQ3B4 zgzF%Sm7+8QE$WKabQ{Xhcz`@czodo|Z8ATvtGb5H4L6pwhipNYw91-wG~3wwrF|0H zE$t#Py%W%?o@*Iv6|G>qj?JoyP=hDst-_N)MOK!Xx7jjJ71}_1lm3G9Ce=RnM*16} z5WS&0g7n=wY4)y^U*^TaHJURz^bCV?&{;f9*{!S7x=aLJ7uzGaTg2EVss^59rm7>F zjlRw6I!jZ+FqK%%-zhoQSWwVSZEH*S$JxmY=bT90MhA4bNz zyc(eDs%Z&W)d^;WzQ`EEFZBUc_JB&<>?lAD0o98jc__ZWSJZrL<^uV z)l&!H03{)$CXbTb0j|?#_&U)SFmd46K7Y))vXf9aYLJaq%!)b>U&Z&~vSS4(L`e

A zj`wGtpAM8+hQ>zOt~fg wDfa>x0VQi8k7&|o)xh=Y|0y+aD|7kpRcXiACG{_!QdU~5*> Rs2[3:0]) | (Rs1 << (16 - Rs2[3:0]))}; // ROR Shift Right Loop (Rd = Rs1 shifted right by Rs2, but Rs1[0] -> Rs1[15]) - 6'b100101: alusum = ({Rs1, carry} >> (Rs2 % 17)) | ({Rs1, carry} << (17 - (Rs2 % 17)));// RRC Shift Right Loop w/ Carry (Rd = Rs1 shifted right by Rs2, but Rs1[0] -> Carry & Carry -> Rs1[15]) - 6'b100110: ; - 6'b100111: ; +// 6'b100101: alusum = ({Rs1, carry} >> (Rs2 % 17)) | ({Rs1, carry} << (17 - (Rs2 % 17)));// RRC Shift Right Loop w/ Carry (Rd = Rs1 shifted right by Rs2, but Rs1[0] -> Carry & Carry -> Rs1[15]) + 6'b100110: alusum = {1'b1, Rd}; //CLL function call + 6'b100111: begin //RTN return to prev call + if(exec2) begin + alusum = {1'b0, stackout}; + end + end 6'b101000: alusum = {1'b0, Rs1}; // PSH Push value to stack (Stack = Rs1) 6'b101001: alusum = {1'b0, stackout}; // POP Pop value from stack (Rd = Stack) @@ -183,4 +188,4 @@ always @(opcode, mulresult) end end -endmodule \ No newline at end of file +endmodule diff --git a/mux_3x16.bsf b/mux_3x16.bsf deleted file mode 100644 index 398ef64..0000000 --- a/mux_3x16.bsf +++ /dev/null @@ -1,64 +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 "symbol" (version "1.1")) -(symbol - (rect 16 16 200 128) - (text "mux_3x16" (rect 5 0 46 12)(font "Arial" )) - (text "inst" (rect 8 96 20 108)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "s[1..0]" (rect 0 0 23 12)(font "Arial" )) - (text "s[1..0]" (rect 21 27 44 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 34 12)(font "Arial" )) - (text "in0[15..0]" (rect 21 43 55 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 33 12)(font "Arial" )) - (text "in1[15..0]" (rect 21 59 54 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 34 12)(font "Arial" )) - (text "in2[15..0]" (rect 21 75 55 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 44 12)(font "Arial" )) - (text "result[15..0]" (rect 119 27 163 39)(font "Arial" )) - (line (pt 184 32)(pt 168 32)(line_width 3)) - ) - (drawing - (rectangle (rect 16 16 168 96)(line_width 1)) - ) -) diff --git a/mux_3x16.v b/mux_3x16.v deleted file mode 100644 index 850df4f..0000000 --- a/mux_3x16.v +++ /dev/null @@ -1,19 +0,0 @@ -module mux_3x16 (s, in0, in1, in2, result); - -input [1:0]s; -input [15:0]in0; -input [15:0]in1; -input [15:0]in2; - -output reg [15:0]result; - -always @(*) begin - case(s) - 2'b00: result = in0; - 2'b01: result = in1; - 2'b10: result = in2; - default: result = in0; - endcase -end - -endmodule diff --git a/mux_3x16.v.bak b/mux_3x16.v.bak deleted file mode 100644 index 710f8c1..0000000 --- a/mux_3x16.v.bak +++ /dev/null @@ -1,18 +0,0 @@ -module mux_3x16 (s, in0, in1, in2, result); - -input [1:0]s; -input [15:0]in0; -input [15:0]in1; -input [15:0]in2; - -output reg [15:0]result; - -always @(*) begin - case(s) - 2'b00: result = in0; - 2'b01: result = in1; - 2'b10: result = in2; - endcase -end - -endmodule