18 lines
186 B
Verilog
18 lines
186 B
Verilog
/**
|
|
* Multiplexor:
|
|
* out = a if sel == 0
|
|
* b otherwise
|
|
*/
|
|
|
|
`default_nettype none
|
|
module Mux(
|
|
input a,
|
|
input b,
|
|
input sel,
|
|
output out
|
|
);
|
|
|
|
assign out = sel?b:a;
|
|
|
|
endmodule
|