Forum Discussion
Altera_Forum
Honored Contributor
11 years agoFmax Improvment
I'm trying to improve Fmax in our design. See the archived quartus II proejct file in the attachment. The source files are also attached. In my currrent design, after compilation, Fmax can reach ...
Altera_Forum
Honored Contributor
11 years agoHello Tricky, thanks a lot for your idea. I think I already got your point and already implemented it into my code as below. It did improve Fmax a lot(60mhz).
HelperGrayBar <= (others=>'0');
if Setting_Pixel_un < (Setting_TotPixel_un/16) then
HelperGrayBar(0) <= '1';
end if;
if Setting_Pixel_un < (Setting_TotPixel_un/8) then
HelperGrayBar(1) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/8) + (Setting_TotPixel_un/16)) then
HelperGrayBar(2) <= '1';
end if;
if Setting_Pixel_un < (Setting_TotPixel_un/4) then
HelperGrayBar(3) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/4)) + ((Setting_TotPixel_un/16)) then
HelperGrayBar(4) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/4)) + ((Setting_TotPixel_un/8)) then
HelperGrayBar(5) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/2) - (Setting_TotPixel_un/16)) then
HelperGrayBar(6) <= '1';
end if;
if Setting_Pixel_un < (Setting_TotPixel_un/2) then
HelperGrayBar(7) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/2) + (Setting_TotPixel_un/16)) then
HelperGrayBar(8) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/2) + (Setting_TotPixel_un/8)) then
HelperGrayBar(9) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/2) + (Setting_TotPixel_un/8) + (Setting_TotPixel_un/16)) then
HelperGrayBar(10) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/2) + (Setting_TotPixel_un/4)) then
HelperGrayBar(11) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/2) + (Setting_TotPixel_un/4) + (Setting_TotPixel_un/16)) then
HelperGrayBar(12) <= '1';
end if;
if Setting_Pixel_un < ((Setting_TotPixel_un/2) + (Setting_TotPixel_un/4) + (Setting_TotPixel_un/8)) then
HelperGrayBar(13) <= '1';
end if;
if Setting_Pixel_un < (Setting_TotPixel_un - (Setting_TotPixel_un/16)) then
HelperGrayBar(14) <= '1';
end if;
if HelperGrayBar(0) = '1' then --black
Out_Data <= GrayColor;
end if;
if HelperGrayBar(1 downto 0) = "10" then --gray level 1
Out_Data <= GrayColor + x"100100100";
end if;
if HelperGrayBar(2 downto 1) = "10" then --gray level 2
Out_Data <= GrayColor + x"200200200";
end if;
if HelperGrayBar(3 downto 2) = "10" then --gray level 3
Out_Data <= GrayColor + x"300300300";
end if;
if HelperGrayBar(4 downto 3) = "10" then --gray level 4
Out_Data <= GrayColor + x"400400400";
end if;
if HelperGrayBar(5 downto 4) = "10" then --gray level 5
Out_Data <= GrayColor + x"500500500";
end if;
if HelperGrayBar(6 downto 5) = "10" then --gray level 6
Out_Data <= GrayColor + x"600600600";
end if;
if HelperGrayBar(7 downto 6) = "10" then --gray level 7
Out_Data <= GrayColor + x"700700700";
end if;
if HelperGrayBar(8 downto 7) = "10" then --gray level 8
Out_Data <= GrayColor + x"800800800";
end if;
if HelperGrayBar(9 downto 8) = "10" then --gray level 9
Out_Data <= GrayColor + x"900900900";
end if;
if HelperGrayBar(10 downto 9) = "10" then --gray level 10
Out_Data <= GrayColor + x"A00A00A00";
end if;
if HelperGrayBar(11 downto 10) = "10" then --gray level 11
Out_Data <= GrayColor + x"B00B00B00";
end if;
if HelperGrayBar(12 downto 11) = "10" then --gray level 12
Out_Data <= GrayColor + x"C00C00C00";
end if;
if HelperGrayBar(13 downto 12) = "10" then --gray level 13
Out_Data <= GrayColor + x"D00D00D00";
end if;
if HelperGrayBar(14 downto 13) = "10" then --gray level 14
Out_Data <= GrayColor + x"E00E00E00";
end if;
if HelperGrayBar(14) = '0' then --gray level 15
Out_Data <= GrayColor + x"F00F00F00";
end if;