diff --git a/axi/rtl/axi_dma_read_desc_flat_to_if.sv b/axi/rtl/axi_dma_read_desc_flat_to_if.sv new file mode 100644 index 0000000..580c7aa --- /dev/null +++ b/axi/rtl/axi_dma_read_desc_flat_to_if.sv @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT + +`default_nettype none + +module axi_dma_read_desc_flat_to_if #( + parameter int unsigned ADDR_W = 64, + parameter int unsigned LEN_W = 20, + parameter int unsigned TAG_W = 8, + parameter int unsigned ID_W = 8, + parameter int unsigned DEST_W = 8, + parameter int unsigned USER_W = 1 +)( + input logic [ADDR_W-1:0] s_axis_read_desc_addr, + input logic [LEN_W-1:0] s_axis_read_desc_len, + input logic [TAG_W-1:0] s_axis_read_desc_tag, + input logic [ID_W-1:0] s_axis_read_desc_id, + input logic [DEST_W-1:0] s_axis_read_desc_dest, + input logic [USER_W-1:0] s_axis_read_desc_user, + input logic s_axis_read_desc_valid, + output logic s_axis_read_desc_ready, + + axi_dma_read_desc_if.master m_axis_read_desc +); + assign m_axis_read_desc.req.addr = s_axis_read_desc_addr; + assign m_axis_read_desc.req.len = s_axis_read_desc_len; + assign m_axis_read_desc.req.tag = s_axis_read_desc_tag; + assign m_axis_read_desc.req.id = s_axis_read_desc_id; + assign m_axis_read_desc.req.dest = s_axis_read_desc_dest; + assign m_axis_read_desc.req.user = s_axis_read_desc_user; + assign m_axis_read_desc.req.valid = s_axis_read_desc_valid; + + assign s_axis_read_desc_ready = m_axis_read_desc.resp.ready; +endmodule : axi_dma_read_desc_flat_to_if + +`default_nettype wire diff --git a/axi/rtl/axi_dma_read_desc_if_to_flat.sv b/axi/rtl/axi_dma_read_desc_if_to_flat.sv new file mode 100644 index 0000000..6c7c542 --- /dev/null +++ b/axi/rtl/axi_dma_read_desc_if_to_flat.sv @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT + +`default_nettype none + +module axi_dma_read_desc_if_to_flat #( + parameter int unsigned ADDR_W = 64, + parameter int unsigned LEN_W = 20, + parameter int unsigned TAG_W = 8, + parameter int unsigned ID_W = 8, + parameter int unsigned DEST_W = 8, + parameter int unsigned USER_W = 1 +)( + axi_dma_read_desc_if.slave s_axis_read_desc, + + output logic [ADDR_W-1:0] m_axis_read_desc_addr, + output logic [LEN_W-1:0] m_axis_read_desc_len, + output logic [TAG_W-1:0] m_axis_read_desc_tag, + output logic [ID_W-1:0] m_axis_read_desc_id, + output logic [DEST_W-1:0] m_axis_read_desc_dest, + output logic [USER_W-1:0] m_axis_read_desc_user, + output logic m_axis_read_desc_valid, + input logic m_axis_read_desc_ready +); + assign m_axis_read_desc_addr = s_axis_read_desc.req.addr; + assign m_axis_read_desc_len = s_axis_read_desc.req.len; + assign m_axis_read_desc_tag = s_axis_read_desc.req.tag; + assign m_axis_read_desc_id = s_axis_read_desc.req.id; + assign m_axis_read_desc_dest = s_axis_read_desc.req.dest; + assign m_axis_read_desc_user = s_axis_read_desc.req.user; + assign m_axis_read_desc_valid = s_axis_read_desc.req.valid; + + assign s_axis_read_desc.resp.ready = m_axis_read_desc_ready; +endmodule : axi_dma_read_desc_if_to_flat + +`default_nettype wire diff --git a/axi/rtl/axi_dma_read_desc_status_flat_to_if.sv b/axi/rtl/axi_dma_read_desc_status_flat_to_if.sv new file mode 100644 index 0000000..e0b1374 --- /dev/null +++ b/axi/rtl/axi_dma_read_desc_status_flat_to_if.sv @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT + +`default_nettype none + +module axi_dma_read_desc_status_flat_to_if #( + parameter int unsigned TAG_W = 8 +)( + input logic [TAG_W-1:0] m_axis_read_desc_status_tag, + input logic [3:0] m_axis_read_desc_status_error, + input logic m_axis_read_desc_status_valid, + + axi_dma_read_desc_status_if.master m_axis_read_desc_status +); + assign m_axis_read_desc_status.req.tag = m_axis_read_desc_status_tag; + assign m_axis_read_desc_status.req.error = m_axis_read_desc_status_error; + assign m_axis_read_desc_status.req.valid = m_axis_read_desc_status_valid; +endmodule : axi_dma_read_desc_status_flat_to_if + +`default_nettype wire diff --git a/axi/rtl/axi_dma_read_desc_status_if_to_flat.sv b/axi/rtl/axi_dma_read_desc_status_if_to_flat.sv new file mode 100644 index 0000000..eb04e6c --- /dev/null +++ b/axi/rtl/axi_dma_read_desc_status_if_to_flat.sv @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT + +`default_nettype none + +module axi_dma_read_desc_status_if_to_flat #( + parameter int unsigned TAG_W = 8 +)( + axi_dma_read_desc_status_if.slave s_axis_read_desc_status, + + output logic [TAG_W-1:0] m_axis_read_desc_status_tag, + output logic [3:0] m_axis_read_desc_status_error, + output logic m_axis_read_desc_status_valid +); + assign m_axis_read_desc_status_tag = s_axis_read_desc_status.req.tag; + assign m_axis_read_desc_status_error = s_axis_read_desc_status.req.error; + assign m_axis_read_desc_status_valid = s_axis_read_desc_status.req.valid; +endmodule : axi_dma_read_desc_status_if_to_flat + +`default_nettype wire