VHDL SPI xilinx spartan 3E
Based on your (very incomplete) schematic, you're supposed to use:


an SPI master
a controller for the ADXL362 that talks to the SPI master
controller reads acceleration (X, Y, Z) and temperature (TMP), does necessary conversion and has the converted acceleration and temperature at its outputs along with a data_ready signal indicating valid output data.


You have VHDL code for the SPI master and the ADXL362 controller already. Before you go any further, read the theory of operation of both HDL files (comments at the top) as well as the ADXL362 datasheet.

You need to instantiate the ADXL362 controller and use its outputs:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity top_module is
    Generic (
        SYSCLK_FREQUENCY_HZ : integer := 100000000 ------- Change this to your actual frequency!
    );
    Port (
        --! System Clock
        SYSCLK : in std_logic;
        --! Buttons
        BTN    : in std_logic_vector(3 downto 0);
        --! LEDs
        LED    : out std_logic_vector(1 downto 0);
        --! SPI Signals
        SCLK   : out std_logic;
        MISO   : in  std_logic;
        MOSI   : out std_logic;
        SS_N   : out std_logic
    );
end entity top_module;

architecture Behavioral of top_module is

-----------------------------------------------------------------------
-- Components
-----------------------------------------------------------------------

component ADXL362Ctrl
    Generic (
        SYSCLK_FREQUENCY_HZ : integer := 100000000;
        SCLK_FREQUENCY_HZ   : integer := 1000000;
        NUM_READS_AVG       : integer := 16;
        UPDATE_FREQUENCY_HZ : integer := 1000
    );
    Port (
        SYSCLK      : in std_logic; -- System Clock
        RESET       : in std_logic;

        -- Accelerometer data signals
        ACCEL_X     : out std_logic_vector(11 downto 0);
        ACCEL_Y     : out std_logic_vector(11 downto 0);
        ACCEL_Z     : out std_logic_vector(11 downto 0);
        ACCEL_TMP   : out std_logic_vector(11 downto 0);
        Data_Ready  : out std_logic;

        --SPI Interface Signals
        SCLK        : out std_logic;
        MOSI        : out std_logic;
        MISO        : in  std_logic;
        SS          : out std_logic
    );
end component ADXL362Ctrl;

-----------------------------------------------------------------------
-- Signals
-----------------------------------------------------------------------

signal reset     : std_logic_vector(15 downto 0) := (others =&gt; '1');

signal ss        : std_logic;
signal accel_x   : std_logic_vector(11 downto 0);
signal accel_y   : std_logic_vector(11 downto 0);
signal accel_z   : std_logic_vector(11 downto 0);
signal accel_tmp : std_logic_vector(11 downto 0);
signal drdy      : std_logic;

begin

-- ADXL362 has low-active CS (SS_N)
-- SPI Master has high-active ss =&gt; invert
SS_N &lt;= not ss;

reset_p : process (
    SYSCLK
    )
begin

    if (rising_edge(SYSCLK)) then

        reset &lt;= reset(reset'left - 1 downto 0) &amp; "0";

    end if;

end process reset_p;

led_p : process (
    SYSCLK
    )
begin

    if (rising_edge(SYSCLK)) then

        if (reset(reset'left) = '1') then

            LED &lt;= (others =&gt; '0');

        elsif (drdy = '1') then

            -- accelerations are in two's complement
            -- put sign bit onto LEDs for testing
            LED(0) &lt;= accel_x(accel_x'left);
            LED(1) &lt;= accel_y(accel_y'left);

        end if;

    end if;

end process led_p;

-----------------------------------------------------------------------
-- Instances
-----------------------------------------------------------------------

ADXL362Ctrl_Inst : component ADXL362Ctrl
    Generic Map (
        SYSCLK_FREQUENCY_HZ =&gt; SYSCLK_FREQUENCY_HZ,
        SCLK_FREQUENCY_HZ   =&gt; 1000000,
        NUM_READS_AVG       =&gt; 16,
        UPDATE_FREQUENCY_HZ =&gt; 1000
    )
    Port Map (
        SYSCLK      =&gt; SYSCLK,
        RESET       =&gt; reset(reset'left),

        -- Accelerometer data signals
        ACCEL_X     =&gt; accel_x,
        ACCEL_Y     =&gt; accel_y,
        ACCEL_Z     =&gt; accel_z,
        ACCEL_TMP   =&gt; accel_tmp,
        Data_Ready  =&gt; drdy,

        --SPI Interface Signals
        SCLK        =&gt; SCLK,
        MOSI        =&gt; MOSI,
        MISO        =&gt; MISO,
        SS          =&gt; ss
    );
end architecture Behavioral;


This is a minimal example. It instantiates one ADXL362Ctrl, resets it properly for 16 clock cycles and -- depending on accel_x and accel_y -- lets the LEDs show if you have negative or positive acceleration on the X and Y axes.

Do not forget to LOC your pins in the UCF file using appropriate constraints. You can damage your development board if you don't!

Depending on your LED setup, you might need to invert the LED output inside led_p. A Digital Clock Manager (DCM) would be appropriate, but I fear adding one here would only confuse you more. Your teacher or teaching assistant will be able to tell you how to properly instantiate a DCM.