本项目利用VHDL语言设计实现了一种能够在VGA显示器上实时显示彩色线条的硬件系统,通过编程控制颜色和线型变换。
竖条显示过程如下:
process(hcnt, vcnt)
begin
if hcnt >= 143 and hcnt <= 223 then
GRB <= 000;
elsif hcnt > 223 and hcnt <= 303 then
GRB <= 001;
elsif hcnt > 303 and hcnt <= 383 then
GRB <= 010;
elsif hcnt > 383 and hcnt <= 463 then
GRB <= 011;
elsif hcnt > 463 and hcnt <= 543 then
GRB <= 100;
elsif hcnt > 543 and hcnt <= 623 then
GRB <= 101;
elsif hcnt > 623 and hcnt <= 703 then
GRB <= 110;
elsif hcnt > 703 and hcnt <= 783 then
GRB <= 111;
end if;
end process;