mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-21 04:17:53 -04:00
21 lines
No EOL
460 B
Systemverilog
21 lines
No EOL
460 B
Systemverilog
`include "VX_platform.vh"
|
|
|
|
`TRACING_OFF
|
|
module VX_mux #(
|
|
parameter DATAW = 1,
|
|
parameter N = 1,
|
|
parameter LN = $clog2(N)
|
|
) (
|
|
input wire [N-1:0][DATAW-1:0] data_in,
|
|
input wire [LN-1:0] sel_in,
|
|
output wire [DATAW-1:0] data_out
|
|
);
|
|
if (N > 1) begin
|
|
assign data_out = data_in[sel_in];
|
|
end else begin
|
|
`UNUSED_VAR (sel_in)
|
|
assign data_out = data_in;
|
|
end
|
|
|
|
endmodule
|
|
`TRACING_ON |