-------------------------------------------------------------------------------
-- snoopy_if_0_wrapper.vhd
-------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

library UNISIM;
use UNISIM.VCOMPONENTS.ALL;

library snoopy_if_v1_00_a;
use snoopy_if_v1_00_a.all;

entity snoopy_if_0_wrapper is
  port (
    proc_task_addr : out std_logic_vector(3 downto 0);
    info_addr : out std_logic_vector(3 downto 0);
    data : in std_logic_vector(31 downto 0);
    OPB_Clk : in std_logic;
    OPB_Rst : in std_logic;
    Sl_DBus : out std_logic_vector(0 to 31);
    Sl_errAck : out std_logic;
    Sl_retry : out std_logic;
    Sl_toutSup : out std_logic;
    Sl_xferAck : out std_logic;
    OPB_ABus : in std_logic_vector(0 to 31);
    OPB_BE : in std_logic_vector(0 to 3);
    OPB_DBus : in std_logic_vector(0 to 31);
    OPB_RNW : in std_logic;
    OPB_select : in std_logic;
    OPB_seqAddr : in std_logic
  );

  attribute x_core_info : STRING;
  attribute x_core_info of snoopy_if_0_wrapper : entity is "snoopy_if_v1_00_a";

end snoopy_if_0_wrapper;

architecture STRUCTURE of snoopy_if_0_wrapper is

  component snoopy_if is
    generic (
      PROC_ADDR_WIDTH : INTEGER;
      INFO_ADDR_WIDTH : INTEGER;
      DATA_WIDTH : INTEGER;
      C_BASEADDR : std_logic_vector;
      C_HIGHADDR : std_logic_vector;
      C_OPB_AWIDTH : INTEGER;
      C_OPB_DWIDTH : INTEGER;
      C_USER_ID_CODE : INTEGER;
      C_FAMILY : STRING
    );
    port (
      proc_task_addr : out std_logic_vector((PROC_ADDR_WIDTH-1) downto 0);
      info_addr : out std_logic_vector((INFO_ADDR_WIDTH-1) downto 0);
      data : in std_logic_vector((DATA_WIDTH-1) downto 0);
      OPB_Clk : in std_logic;
      OPB_Rst : in std_logic;
      Sl_DBus : out std_logic_vector(0 to (C_OPB_DWIDTH-1));
      Sl_errAck : out std_logic;
      Sl_retry : out std_logic;
      Sl_toutSup : out std_logic;
      Sl_xferAck : out std_logic;
      OPB_ABus : in std_logic_vector(0 to (C_OPB_AWIDTH-1));
      OPB_BE : in std_logic_vector(0 to ((C_OPB_DWIDTH/8)-1));
      OPB_DBus : in std_logic_vector(0 to (C_OPB_DWIDTH-1));
      OPB_RNW : in std_logic;
      OPB_select : in std_logic;
      OPB_seqAddr : in std_logic
    );
  end component;

begin

  snoopy_if_0 : snoopy_if
    generic map (
      PROC_ADDR_WIDTH => 4,
      INFO_ADDR_WIDTH => 4,
      DATA_WIDTH => 32,
      C_BASEADDR => X"7b200000",
      C_HIGHADDR => X"7b20ffff",
      C_OPB_AWIDTH => 32,
      C_OPB_DWIDTH => 32,
      C_USER_ID_CODE => 3,
      C_FAMILY => "virtex2p"
    )
    port map (
      proc_task_addr => proc_task_addr,
      info_addr => info_addr,
      data => data,
      OPB_Clk => OPB_Clk,
      OPB_Rst => OPB_Rst,
      Sl_DBus => Sl_DBus,
      Sl_errAck => Sl_errAck,
      Sl_retry => Sl_retry,
      Sl_toutSup => Sl_toutSup,
      Sl_xferAck => Sl_xferAck,
      OPB_ABus => OPB_ABus,
      OPB_BE => OPB_BE,
      OPB_DBus => OPB_DBus,
      OPB_RNW => OPB_RNW,
      OPB_select => OPB_select,
      OPB_seqAddr => OPB_seqAddr
    );

end architecture STRUCTURE;

