CPLD: Update counter to hopefully implement more efficiently

Change-Id: I527318936fce0d83f3f3723a5e68838eb3013f68
issue_1022
David Banks 2018-06-07 17:13:33 +01:00
rodzic 87eb7535d6
commit c7f706b4ef
2 zmienionych plików z 17 dodań i 18 usunięć

Wyświetl plik

@ -51,7 +51,7 @@ end RGBtoHDMI;
architecture Behavorial of RGBtoHDMI is
-- For Modes 0..6
constant default_offset : unsigned(11 downto 0) := to_unsigned(4096 - 64 * 23 + 6, 12);
constant default_offset : unsigned(11 downto 0) := to_unsigned(4096 - 64 * 17 + 6, 12);
-- For Mode 7
constant mode7_offset : unsigned(11 downto 0) := to_unsigned(4096 - 96 * 12 + 4, 12);
@ -167,26 +167,14 @@ begin
else
counter <= default_offset;
end if;
elsif counter(11) = '1' then
counter <= counter + 1;
elsif mode7 = '1' or counter(2 downto 0) /= 5 then
counter(4 downto 0) <= counter(4 downto 0) + 1;
else
-- within the line
if mode7 = '1' then
if counter = 63 then
counter <= to_unsigned(0, counter'length);
else
counter <= counter + 1;
end if;
else
if counter = 61 then
counter <= to_unsigned(0, counter'length);
elsif counter(2 downto 0) = 5 then
counter <= counter + 3;
else
counter <= counter + 1;
end if;
end if;
counter(4 downto 0) <= counter(4 downto 0) + 3;
end if;
-- Sample point offsets
if CSYNC1 = '0' then
sp_index <= "000";

Wyświetl plik

@ -197,3 +197,14 @@ FB3 18/18* 33/54 57/90 8/ 9
FB4 18/18* 37/54 70/90 7/ 7*
----- ----- ----- -----
70/72 129/216 228/360 29/34
17. Update counter to hopefully implement more efficiently
Function Mcells FB Inps Pterms IO
Block Used/Tot Used/Tot Used/Tot Used/Tot
FB1 18/18* 38/54 54/90 5/ 9
FB2 16/18 21/54 45/90 9/ 9*
FB3 18/18* 30/54 49/90 8/ 9
FB4 18/18* 35/54 65/90 7/ 7*
----- ----- ----- -----
70/72 124/216 213/360 29/34