I am trying to connect 5 stacks together using VHDL below. The main problem I am facing is that that I don't know how to deal with the signals clk
which stands for clock and rst
which is asynchronous reset and the SOp
stack operation signal-vector which used in its entirety by each of the stack instances. TS
stands for top of stack.
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity stack is
port(
D : in std_logic_vector(4 downto 0);
TS : out std_logic_vector(4 downto 0);
clk, rst : in std_logic;
SOp : in std_logic_vector(1 downto 0)
);
end entity;
architecture structural of stack is
begin
stack1: entity stack port map(
D => D(0),
TS => Tos(0),
SOp => -- here
);
stack2: entity stack port map(
D => D(1),
TS => TS(1),
SOp => -- here
);
stack3: entity stack port map(
D => D(2),
TS => TS(2),
SOp => -- here
);
stack4: entity stack port map(
D => D(3),
TS => TS(3),
SOp => -- here
);
stack5: entity stack port map(
D => D(4),
TS => TS(4),
SOp => -- here
);
end architecture;
Should I basically type something like this or can I just skip SOp, clk, rst as they are used completely by each stack?
stack1: entity stack port map(
D => D(0),
TS => TS(0),
SOp => SOp,
clk => clk,
rst => rst
);