PoC.dstruct.stack

Implements a stack, a LIFO storage abstraction.

Entity Declaration:

 1entity dstruct_stack is
 2  generic (
 3    D_BITS    : positive;               -- Data Width
 4    MIN_DEPTH : positive                -- Minimum Stack Depth
 5  );
 6  port (
 7    -- INPUTS
 8    clk, rst : in std_logic;
 9
10    -- Write Ports
11    din  : in  std_logic_vector(D_BITS-1 downto 0);  -- Data Input
12    put  : in  std_logic;  -- 0 -> pop, 1 -> push
13    full : out std_logic;
14
15    -- Read Ports
16    got   : in  std_logic;
17    dout  : out std_logic_vector(D_BITS-1 downto 0);
18    valid : out std_logic
19  );
20end entity dstruct_stack;