Binome
Full Member level 3
- Joined
- Nov 16, 2009
- Messages
- 153
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,298
- Location
- Lyon, France
- Activity points
- 2,412
Hi,
I've got a strange behaviour when simulating a design.
Here is a part of my design:
and the simulation waveform is:
"s_out_idx" is changing the first 5 times on the rising clock edge but then on falling edges.
What happens?
I've got a strange behaviour when simulating a design.
Here is a part of my design:
Code:
out_process: process(rst_n, r_hash_done, s_hash, clk)
begin
if rst_n = '0' then
n <= 1;
tree_end <= '0';
out_ok <= '0';
elsif r_hash_done(0) = '1' then
tree_end <= '1';
out_ok <= '1';
end if;
if rising_edge(clk) and tree_end = '1' then
if n < leaves_nbr-1 then
n <= n+1;
else
out_ok <= '0';
end if;
end if;
out_idx <= std_logic_vector(to_unsigned(n, out_idx'length));
out_tree <= s_hash(n);
end process;
"s_out_idx" is changing the first 5 times on the rising clock edge but then on falling edges.
What happens?