matrixofdynamism
Advanced Member level 2
Here is the entity:
I am sure that there is a way to create a type in a packge that is an array and then declare the p_in_# signals in a single line in the entity. This will further simplify the architecture RTL coding. Since the word_len is a generic here and not found inside the package itself, how does one go about doing this?
- - - Updated - - -
The array p_in_t will be (7 downto 0) of std_logic_vector that is uncontrained. This is what is making it confusing. The inner dimension of the array is uncontrained rather than the outer one.
Code:
entity col_piso_sr is
generic (
word_len: natural := 8
);
port (
p_in_7: in std_logic_vector(word_len-1 downto 0);
p_in_6: in std_logic_vector(word_len-1 downto 0);
p_in_5: in std_logic_vector(word_len-1 downto 0);
p_in_4: in std_logic_vector(word_len-1 downto 0);
p_in_3: in std_logic_vector(word_len-1 downto 0);
p_in_2: in std_logic_vector(word_len-1 downto 0);
p_in_1: in std_logic_vector(word_len-1 downto 0);
p_in_0: in std_logic_vector(word_len-1 downto 0);
s_out: out std_logic_vector(word_len-1 downto 0);
p_in_e: in std_logic;
s_out_e: in std_logic;
clk: in std_logic;
reset_n: std_logic
);
end entity;
I am sure that there is a way to create a type in a packge that is an array and then declare the p_in_# signals in a single line in the entity. This will further simplify the architecture RTL coding. Since the word_len is a generic here and not found inside the package itself, how does one go about doing this?
- - - Updated - - -
The array p_in_t will be (7 downto 0) of std_logic_vector that is uncontrained. This is what is making it confusing. The inner dimension of the array is uncontrained rather than the outer one.