fix: work around ghdl#2078

https://github.com/ghdl/ghdl/issues/2078
This commit is contained in:
Xiretza 2022-06-20 11:43:01 +02:00
parent 498089d468
commit e25e8a958d

View file

@ -168,12 +168,6 @@ begin
receive_state <= DATA; receive_state <= DATA;
when DATA => when DATA =>
if input_bank = BANK_A then
strand_buffer_a(pixels_received)((active_strand+1) * BITS_PER_LED - 1 downto active_strand * BITS_PER_LED) := udp_data(23 downto 0);
else
strand_buffer_b(pixels_received)((active_strand+1) * BITS_PER_LED - 1 downto active_strand * BITS_PER_LED) := udp_data(23 downto 0);
end if;
if pixels_received /= num_pixels - 1 then if pixels_received /= num_pixels - 1 then
pixels_received <= pixels_received + 1; pixels_received <= pixels_received + 1;
elsif udp_last then elsif udp_last then
@ -187,6 +181,15 @@ begin
-- wait until udp_last -- wait until udp_last
end case; end case;
end if; end if;
-- workaround for ghdl#2078
if reset = '0' and udp_valid = '1' and receive_state = DATA then
if input_bank = BANK_A then
strand_buffer_a(pixels_received)((active_strand+1) * BITS_PER_LED - 1 downto active_strand * BITS_PER_LED) := udp_data(23 downto 0);
else
strand_buffer_b(pixels_received)((active_strand+1) * BITS_PER_LED - 1 downto active_strand * BITS_PER_LED) := udp_data(23 downto 0);
end if;
end if;
end if; end if;
end process; end process;
end architecture; end architecture;