K
koyel.aphy@gmail.com
Guest
Hi,
Can someone please tell me that if I declare a signal inside generate statement then whether that signal gets replicated a number of times that is dictated by the generate statement? Please take a look at the following example which is a portion of a code available online
rounds: for i in 0 to 2 ** DEPTH - 1 generate
signal round_k : std_logic_vector(31 downto 0);
signal round_w : std_logic_vector(511 downto 0);
signal round_s : std_logic_vector(255 downto 0);
begin
round_k <= K(i * 2 ** (6 - DEPTH) + conv_integer(step));
round_w <= w(i) when step = "000000" else w(i + 1);
round_s <= s(i) when step = "000000" else s(i + 1);
transform: sha256_transform
port map (
clk => clk,
w_in => round_w,
w_out => w(i + 1),
s_in => round_s,
s_out => s(i + 1),
k => round_k
);
end generate;
So do the signals round_k, round_w and round_s get replicated 2 ** DEPTH - 1 times? Also does the component sha56_transform get replicated 2 ** DEPTH - 1 times?
Thank you,
Best Regards
Can someone please tell me that if I declare a signal inside generate statement then whether that signal gets replicated a number of times that is dictated by the generate statement? Please take a look at the following example which is a portion of a code available online
rounds: for i in 0 to 2 ** DEPTH - 1 generate
signal round_k : std_logic_vector(31 downto 0);
signal round_w : std_logic_vector(511 downto 0);
signal round_s : std_logic_vector(255 downto 0);
begin
round_k <= K(i * 2 ** (6 - DEPTH) + conv_integer(step));
round_w <= w(i) when step = "000000" else w(i + 1);
round_s <= s(i) when step = "000000" else s(i + 1);
transform: sha256_transform
port map (
clk => clk,
w_in => round_w,
w_out => w(i + 1),
s_in => round_s,
s_out => s(i + 1),
k => round_k
);
end generate;
So do the signals round_k, round_w and round_s get replicated 2 ** DEPTH - 1 times? Also does the component sha56_transform get replicated 2 ** DEPTH - 1 times?
Thank you,
Best Regards