1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-17 20:02:53 +08:00
oh/common/hdl/oh_mux2.v
Andreas Olofsson 19fa611bb9 Massive reorganization to impove reuse
- adding more chip code
- pushing memory stuff into common
- making common "oh_" naming class
-
2015-11-30 13:45:49 -05:00

26 lines
386 B
Verilog

module oh_mux2(/*AUTOARG*/
// Outputs
out,
// Inputs
in0, in1, sel0, sel1
);
parameter DW=99;
//data inputs
input [DW-1:0] in0;
input [DW-1:0] in1;
//select inputs
input sel0;
input sel1;
output [DW-1:0] out;
assign out[DW-1:0] = ({(DW){sel0}} & in0[DW-1:0] |
{(DW){sel1}} & in1[DW-1:0]);
endmodule // oh_mux2