URL
https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 28 |
Rev 31 |
Line 26... |
Line 26... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
|
|
module
|
module
|
axis_mux
|
axis_mux
|
#(
|
#(
|
N = 8, // data bus width in bytes
|
N, // data bus width in bytes
|
I = 1, // TID width
|
I = 0, // TID width
|
D = 1, // TDEST width
|
D = 0, // TDEST width
|
U = 1, // TUSER width
|
U = 1, // TUSER width
|
USE_TSTRB = 0, // set to 1 to enable, 0 to disable
|
USE_TSTRB = 0, // set to 1 to enable, 0 to disable
|
USE_TKEEP = 0 // set to 1 to enable, 0 to disable
|
USE_TKEEP = 0 // set to 1 to enable, 0 to disable
|
)
|
)
|
(
|
(
|
input mux_select,
|
input mux_select,
|
axis_if.slave axis_0_in,
|
axis_if axis_0_in,
|
axis_if.slave axis_1_in,
|
axis_if axis_1_in,
|
axis_if.master axis_out,
|
axis_if axis_out,
|
input axis_en,
|
input axis_en,
|
input aclk,
|
input aclk,
|
input aresetn
|
input aresetn
|
);
|
);
|
|
|
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
|
// synthesis translate_off
|
|
initial
|
|
begin
|
|
a_tid_unsuported: assert(I == 0) else $fatal;
|
|
a_tdest_unsuported: assert(D == 0) else $fatal;
|
|
end
|
|
// synthesis translate_on
|
|
// --------------------------------------------------------------------
|
|
|
|
|
|
// --------------------------------------------------------------------
|
//
|
//
|
axis_if #(.N(N), .I(I), .D(D), .U(U))
|
axis_if #(.N(N), .I(1), .D(1), .U(U))
|
axis_mux_out(.*);
|
axis_mux_out(.*);
|
|
|
assign axis_0_in.tready = mux_select ? 0 : axis_mux_out.tready;
|
assign axis_0_in.tready = mux_select ? 0 : axis_mux_out.tready;
|
assign axis_1_in.tready = mux_select ? axis_mux_out.tready : 0;
|
assign axis_1_in.tready = mux_select ? axis_mux_out.tready : 0;
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.