milanmetal

AXI Stream IP core

Sep 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 3.48 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4.  
  5. entity axis_fifo_invertor_mn_v1_0 is
  6.     generic (
  7.         -- Users to add parameters here
  8.  
  9.         -- User parameters ends
  10.         -- Do not modify the parameters beyond this line
  11.  
  12.  
  13.         -- Parameters of Axi Slave Bus Interface S00_AXIS
  14.         C_S00_AXIS_TDATA_WIDTH  : integer   := 32;
  15.  
  16.         -- Parameters of Axi Master Bus Interface M00_AXIS
  17.         C_M00_AXIS_TDATA_WIDTH  : integer   := 32;
  18.         C_M00_AXIS_START_COUNT  : integer   := 32
  19.     );
  20.     port (
  21.         -- Users to add ports here
  22.  
  23.         -- User ports ends
  24.         -- Do not modify the ports beyond this line
  25.  
  26.  
  27.         -- Ports of Axi Slave Bus Interface S00_AXIS
  28.         s00_axis_aclk   : in std_logic;
  29.         s00_axis_aresetn    : in std_logic;
  30.         s00_axis_tready : out std_logic;
  31.         s00_axis_tdata  : in std_logic_vector(C_S00_AXIS_TDATA_WIDTH-1 downto 0);
  32.         s00_axis_tstrb  : in std_logic_vector((C_S00_AXIS_TDATA_WIDTH/8)-1 downto 0);
  33.         s00_axis_tlast  : in std_logic;
  34.         s00_axis_tvalid : in std_logic;
  35.  
  36.         -- Ports of Axi Master Bus Interface M00_AXIS
  37.         m00_axis_aclk   : in std_logic;
  38.         m00_axis_aresetn    : in std_logic;
  39.         m00_axis_tvalid : out std_logic;
  40.         m00_axis_tdata  : out std_logic_vector(C_M00_AXIS_TDATA_WIDTH-1 downto 0);
  41.         m00_axis_tstrb  : out std_logic_vector((C_M00_AXIS_TDATA_WIDTH/8)-1 downto 0);
  42.         m00_axis_tlast  : out std_logic;
  43.         m00_axis_tready : in std_logic
  44.     );
  45. end axis_fifo_invertor_mn_v1_0;
  46.  
  47. architecture arch_imp of axis_fifo_invertor_mn_v1_0 is
  48.  
  49.     -- component declaration
  50.     component axis_fifo_invertor_mn_v1_0_S00_AXIS is
  51.         generic (
  52.         C_S_AXIS_TDATA_WIDTH    : integer   := 32
  53.         );
  54.         port (
  55.         S_AXIS_ACLK : in std_logic;
  56.         S_AXIS_ARESETN  : in std_logic;
  57.         S_AXIS_TREADY   : out std_logic;
  58.         S_AXIS_TDATA    : in std_logic_vector(C_S_AXIS_TDATA_WIDTH-1 downto 0);
  59.         S_AXIS_TSTRB    : in std_logic_vector((C_S_AXIS_TDATA_WIDTH/8)-1 downto 0);
  60.         S_AXIS_TLAST    : in std_logic;
  61.         S_AXIS_TVALID   : in std_logic
  62.         );
  63.     end component axis_fifo_invertor_mn_v1_0_S00_AXIS;
  64.  
  65.     component axis_fifo_invertor_mn_v1_0_M00_AXIS is
  66.         generic (
  67.         C_M_AXIS_TDATA_WIDTH    : integer   := 32;
  68.         C_M_START_COUNT : integer   := 32
  69.         );
  70.         port (
  71.         M_AXIS_ACLK : in std_logic;
  72.         M_AXIS_ARESETN  : in std_logic;
  73.         M_AXIS_TVALID   : out std_logic;
  74.         M_AXIS_TDATA    : out std_logic_vector(C_M_AXIS_TDATA_WIDTH-1 downto 0);
  75.         M_AXIS_TSTRB    : out std_logic_vector((C_M_AXIS_TDATA_WIDTH/8)-1 downto 0);
  76.         M_AXIS_TLAST    : out std_logic;
  77.         M_AXIS_TREADY   : in std_logic
  78.         );
  79.     end component axis_fifo_invertor_mn_v1_0_M00_AXIS;
  80.  
  81. begin
  82.  
  83. -- Instantiation of Axi Bus Interface S00_AXIS
  84. axis_fifo_invertor_mn_v1_0_S00_AXIS_inst : axis_fifo_invertor_mn_v1_0_S00_AXIS
  85.     generic map (
  86.         C_S_AXIS_TDATA_WIDTH    => C_S00_AXIS_TDATA_WIDTH
  87.     )
  88.     port map (
  89.         S_AXIS_ACLK => s00_axis_aclk,
  90.         S_AXIS_ARESETN  => s00_axis_aresetn,
  91.         S_AXIS_TREADY   => s00_axis_tready,
  92.         S_AXIS_TDATA    => s00_axis_tdata,
  93.         S_AXIS_TSTRB    => s00_axis_tstrb,
  94.         S_AXIS_TLAST    => s00_axis_tlast,
  95.         S_AXIS_TVALID   => s00_axis_tvalid
  96.     );
  97.  
  98. -- Instantiation of Axi Bus Interface M00_AXIS
  99. axis_fifo_invertor_mn_v1_0_M00_AXIS_inst : axis_fifo_invertor_mn_v1_0_M00_AXIS
  100.     generic map (
  101.         C_M_AXIS_TDATA_WIDTH    => C_M00_AXIS_TDATA_WIDTH,
  102.         C_M_START_COUNT => C_M00_AXIS_START_COUNT
  103.     )
  104.     port map (
  105.         M_AXIS_ACLK => m00_axis_aclk,
  106.         M_AXIS_ARESETN  => m00_axis_aresetn,
  107.         M_AXIS_TVALID   => m00_axis_tvalid,
  108.         M_AXIS_TDATA    => m00_axis_tdata,
  109.         M_AXIS_TSTRB    => m00_axis_tstrb,
  110.         M_AXIS_TLAST    => m00_axis_tlast,
  111.         M_AXIS_TREADY   => m00_axis_tready
  112.     );
  113.  
  114.     -- Add user logic here
  115.  
  116.     -- User logic ends
  117.  
  118. end arch_imp;
Add Comment
Please, Sign In to add comment