From 75191e85faeafcc80a3abb1596f9fd8d375231b2 Mon Sep 17 00:00:00 2001 From: Jakub Cabal Date: Wed, 18 Dec 2024 12:55:07 +0100 Subject: [PATCH] chore(axis-tools): prepare the entity for the new component AXIS_MERGER --- comp/axis_tools/flow/merger/Modules.tcl | 17 ++++++ comp/axis_tools/flow/merger/axis_merger.vhd | 64 +++++++++++++++++++++ comp/axis_tools/flow/merger/synth/Makefile | 15 +++++ 3 files changed, 96 insertions(+) create mode 100644 comp/axis_tools/flow/merger/Modules.tcl create mode 100644 comp/axis_tools/flow/merger/axis_merger.vhd create mode 100644 comp/axis_tools/flow/merger/synth/Makefile diff --git a/comp/axis_tools/flow/merger/Modules.tcl b/comp/axis_tools/flow/merger/Modules.tcl new file mode 100644 index 000000000..a729605ee --- /dev/null +++ b/comp/axis_tools/flow/merger/Modules.tcl @@ -0,0 +1,17 @@ +# Modules.tcl: Components include script +# Copyright (C) 2024 CESNET +# Author(s): Jakub Cabal +# +# SPDX-License-Identifier: BSD-3-Clause + +# Component paths + +# Packages +lappend PACKAGES "$OFM_PATH/comp/base/pkg/math_pack.vhd" +lappend PACKAGES "$OFM_PATH/comp/base/pkg/type_pack.vhd" + +# Components +#lappend COMPONENTS [ list "ASFIFOX" "$OFM_PATH/comp/base/fifo/asfifox" "FULL" ] + +# Files +lappend MOD "$ENTITY_BASE/axis_merger.vhd" diff --git a/comp/axis_tools/flow/merger/axis_merger.vhd b/comp/axis_tools/flow/merger/axis_merger.vhd new file mode 100644 index 000000000..ffb9374bf --- /dev/null +++ b/comp/axis_tools/flow/merger/axis_merger.vhd @@ -0,0 +1,64 @@ +-- axis_merger.vhd: AXI-Stream merger +-- Copyright (C) 2024 CESNET +-- Author(s): David Vodák +-- +-- SPDX-License-Identifier: BSD-3-Clause +-- + +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + +use work.math_pack.all; +use work.type_pack.all; + +-- Component AXIS_MERGER is used to merge N input AXI Stream interfaces into one +-- output AXI Stream interface. The merging is done in random order. +-- +entity AXIS_MERGER is +generic ( + -- width of AXI-Stream data signal in bits + TDATA_WIDTH : natural := 512; + -- width of AXI-Stream user signal in bits + TUSER_WIDTH : natural := 64; + -- number of RX AXI-Stream interfaces + RX_STREAMS : natural := 512; + -- target device: AGILEX, STRATIX10, ULTRASCALE,... + DEVICE : string := "AGILEX" +); +port ( + -- ========================================================================= + -- Clock and reset signals + -- ========================================================================= + CLK : in std_logic; + RESET : in std_logic; + + -- ========================================================================= + -- RX AXI-Stream interfaces (CLK) + -- ========================================================================= + RX_AXIS_TDATA : in slv_array_t(RX_STREAMS-1 downto 0)(TDATA_WIDTH-1 downto 0); + RX_AXIS_TUSER : in slv_array_t(RX_STREAMS-1 downto 0)(TUSER_WIDTH-1 downto 0); + RX_AXIS_TKEEP : in slv_array_t(RX_STREAMS-1 downto 0)(TDATA_WIDTH/8-1 downto 0); + RX_AXIS_TLAST : in std_logic_vector(RX_STREAMS-1 downto 0); + RX_AXIS_TVALID : in std_logic_vector(RX_STREAMS-1 downto 0); + RX_AXIS_TREADY : out std_logic_vector(RX_STREAMS-1 downto 0); + + -- ========================================================================= + -- TX AXI-Stream interface (CLK) + -- ========================================================================= + TX_AXIS_TDATA : out std_logic_vector(TDATA_WIDTH-1 downto 0); + TX_AXIS_TUSER : out std_logic_vector(TUSER_WIDTH-1 downto 0); + TX_AXIS_TKEEP : out std_logic_vector(TDATA_WIDTH/8-1 downto 0); + TX_AXIS_TLAST : out std_logic; + TX_AXIS_TVALID : out std_logic; + TX_AXIS_TREADY : in std_logic; +); +end entity; + +architecture FULL of AXIS_MERGER is + +begin + + -- TODO @DavidVodák + +end architecture; diff --git a/comp/axis_tools/flow/merger/synth/Makefile b/comp/axis_tools/flow/merger/synth/Makefile new file mode 100644 index 000000000..30babc44a --- /dev/null +++ b/comp/axis_tools/flow/merger/synth/Makefile @@ -0,0 +1,15 @@ +# Makefile: Makefile to compile module +# Copyright (C) 2024 CESNET +# Author(s): Jakub Cabal +# +# SPDX-License-Identifier: BSD-3-Clause + +TOP_LEVEL_ENT=AXIS_MERGER + +SYNTH=quartus +export DEVICE=AGILEX + +.PHONY: all +all: comp + +include ../../../../../build/Makefile