mirror of
https://github.com/supleed2/ELEC40006-P1-CW.git
synced 2024-11-10 02:05:48 +00:00
685f69a7cf
Changed the MUX blocks into Verilog just cuz they look neater and are probably more optimised in the end. Added the LIFO stack. Working on decoder logic.
19 lines
257 B
Verilog
19 lines
257 B
Verilog
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
|