VerilogCPU/mux2.sv

9 lines
214 B
Systemverilog
Raw Permalink Normal View History

2018-06-05 23:42:20 -07:00
/* A two-input multiplexer.
*/
2018-06-05 00:06:45 -07:00
module mux2 #(width=32)
(input logic [width-1:0] left, right,
input logic select,
output logic [width-1:0] out);
assign out = select ? right : left;
2018-06-05 23:42:20 -07:00
endmodule