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