diff --git a/Artix-7-HDMI-processing.xpr b/Artix-7-HDMI-processing.xpr
index 01d08fe..8174774 100644
--- a/Artix-7-HDMI-processing.xpr
+++ b/Artix-7-HDMI-processing.xpr
@@ -121,12 +121,6 @@
-
-
-
-
-
-
@@ -145,6 +139,13 @@
+
+
+
+
+
+
+
diff --git a/README.txt b/README.txt
index 51ec522..247ba35 100644
--- a/README.txt
+++ b/README.txt
@@ -44,16 +44,10 @@ Known issues:
- Does not adjust PLL settings for input clock, so the PLL is run slightly out
of spec.
- - Image may re-sync after a few seconds if it receives errors.
-
- - The audio meters are drawn twice as tall in interlaced modes
-
- - A false VSYNC pulse is causing the meters to be displayed more than once when
- some content is shown. Very weird, but I want to leave this in for now so I can
- find the root cause.
+ - Image may re-sync once after a few seconds if symbol errors are seen.
- There are timings errors, as generating 148.5MHz HDMI using the Artix-7 chip
- is actualy out of spec. Expect seven failing paths and about 20ns of negative
+ is actually out of spec. Expect seven failing paths and about 20ns of negative
slack.
------------------------------------------------------------------------------------
diff --git a/src/audio_meters.vhd b/src/audio_meters.vhd
index c935057..173f134 100644
--- a/src/audio_meters.vhd
+++ b/src/audio_meters.vhd
@@ -149,7 +149,7 @@ level_proc: process(clk)
end if;
end if;
- -- Drop the levels once each frame
+ -- Signal to reduce (drop' the levels of the meters once each frame (of field for interlaced sources
if last_vsync = '0' and in_vsync = '1' then
pending_drop <= '1';
drop_index <= (others => '1');
@@ -242,13 +242,21 @@ video_proc: process(clk)
-- The end of active video is used to increment the line count
if last_blank = '0' and in_blank = '1' then
- line_count <= line_count + 1;
+ if is_interlaced = '1' then
+ line_count <= line_count + 2;
+ else
+ line_count <= line_count + 1;
+ end if;
col_count <= (others => '0');
end if;
-- Reset the line count on falling vsync
- if last_vsync = '0' and in_vsync = '1' then
- line_count <= (others => '0');
+ if last_vsync = '1' and in_vsync = '0' then
+ if is_interlaced = '1' and is_second_field = '1' then
+ line_count <= (0 => '1', others => '0');
+ else
+ line_count <= (others => '0');
+ end if;
end if;
-- remember the hsync and vsync values
last_vsync <= in_vsync;
diff --git a/src/guidelines.vhd b/src/guidelines.vhd
index 710ad4e..d477f47 100644
--- a/src/guidelines.vhd
+++ b/src/guidelines.vhd
@@ -91,7 +91,7 @@ process(clk)
out_red <= in_red;
out_green <= in_green;
out_blue <= in_blue;
-
+
if enable_feature = '1' then
if h_size = 1280 then
if hcount = 426 or hcount = 854 then
@@ -132,19 +132,26 @@ process(clk)
end if;
end if;
+ -------------------------------------------------------------
-- Count the number of lines in a frame (not field!!!)
+ -------------------------------------------------------------
if last_blank = '0' and in_blank = '1' then
vcount <= vcount + 1;
end if;
+
+ -------------------------------------------------------------
-- Use the falling edge of VSYNC to to capture the number of
-- lines on the screen, as the rising edge is where the
-- interaced field is detected and can be a bit unstable.
+ -------------------------------------------------------------
if in_vsync = '0' and last_vsync = '1' and is_second_field = '0'then
vcount <= (others => '0');
v_size <= vcount;
end if;
+ -------------------------------------------------------------
-- Count the width of the frame
+ -------------------------------------------------------------
if in_blank = '1' then
if hcount /= 0 then
h_size <= hcount;
diff --git a/src/hdmi_design.vhd b/src/hdmi_design.vhd
index e4470de..47cf2e3 100644
--- a/src/hdmi_design.vhd
+++ b/src/hdmi_design.vhd
@@ -272,12 +272,14 @@ i_hdmi_io: hdmi_io port map (
-------------------------------
-- VGA data recovered from HDMI
-------------------------------
- in_blank => in_blank,
- in_hsync => in_hsync,
- in_vsync => in_vsync,
- in_red => in_red,
- in_green => in_green,
- in_blue => in_blue,
+ in_blank => in_blank,
+ in_hsync => in_hsync,
+ in_vsync => in_vsync,
+ in_red => in_red,
+ in_green => in_green,
+ in_blue => in_blue,
+ is_interlaced => is_interlaced,
+ is_second_field => is_second_field,
-----------------------------------
-- For symbol dump or retransmit
@@ -308,17 +310,17 @@ i_processing: pixel_processing Port map (
------------------
-- Incoming pixels
------------------
- in_blank => in_blank,
- in_hsync => in_hsync,
- in_vsync => in_vsync,
- in_red => in_red,
- in_green => in_green,
- in_blue => in_blue,
- is_interlaced => is_interlaced,
+ in_blank => in_blank,
+ in_hsync => in_hsync,
+ in_vsync => in_vsync,
+ in_red => in_red,
+ in_green => in_green,
+ in_blue => in_blue,
+ is_interlaced => is_interlaced,
is_second_field => is_second_field,
- audio_channel => audio_channel,
- audio_de => audio_de,
- audio_sample => audio_sample,
+ audio_channel => audio_channel,
+ audio_de => audio_de,
+ audio_sample => audio_sample,
-------------------
-- Processed pixels
-------------------
@@ -330,13 +332,16 @@ i_processing: pixel_processing Port map (
out_blue => out_blue
);
-i_symbol_dump: symbol_dump port map (
- clk => pixel_clk,
- clk100 => clk100,
- symbol_sync => symbol_sync,
- symbol_ch0 => symbol_ch0,
- symbol_ch1 => symbol_ch1,
- symbol_ch2 => symbol_ch2,
- rs232_tx => rs232_tx);
-
+ -- Swap to this if you want to capture the HDMI symbols
+ -- and send them up the RS232 port
+ rs232_tx <= '1';
+--i_symbol_dump: symbol_dump port map (
+-- clk => pixel_clk,
+-- clk100 => clk100,
+-- symbol_sync => symbol_sync,
+-- symbol_ch0 => symbol_ch0,
+-- symbol_ch1 => symbol_ch1,
+-- symbol_ch2 => symbol_ch2,
+-- rs232_tx => rs232_tx);
+
end Behavioral;
\ No newline at end of file