Commit e9236008 authored by Denia Bouhired-Ferrag's avatar Denia Bouhired-Ferrag

Fixed small bug. the led-seq for blinking leds restarts every 24 blinks. This…

Fixed small bug. the led-seq for blinking leds restarts every 24 blinks. This was ok for 6 fp leds as seq runs 3 times and starts again. for 10 fp leds however 24 means the seq restarts after the 4th led. it has now been changed so it restarts after 30 blinks
parent 27ab179a
......@@ -627,6 +627,7 @@ architecture arch of pts is
-- LED signals
signal cnt_halfsec : unsigned(23 downto 0);
signal led_seq : unsigned(4 downto 0);
signal max_led_seq : unsigned(4 downto 0);
signal pulse_led_en : std_logic;
signal stat_led_en : std_logic;
signal pulse_led_en_d0 : std_logic;
......@@ -1881,14 +1882,16 @@ end generate gen_rear_test_logic;
if (cnt_halfsec = 9999999) then
cnt_halfsec <= (others => '0');
led_seq <= led_seq + 1;
if (led_seq = 24) then
if (led_seq = max_led_seq) then
led_seq <= (others => '0');
end if;
end if;
end if;
end if;
end process p_led_seq;
max_led_seq <= to_unsigned(30,5) when pulse_led_en = '1' else to_unsigned(24,5); -- cycle 24 times for status leds
-- 30 times for pulse leds
-- Sequence the front-panel LEDs based on the sequence counter
front_led_seq <= "0000000001" when (pulse_led_en = '1') and (led_seq = 1) else
"0000000010" when (pulse_led_en = '1') and (led_seq = 2) else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment