Altera_Forum
Honored Contributor
10 years agoVGA using VHDL
Hi guys.
I have problem with my VHDL code. I want to use VGA monitor for my project. Here is the coding for my testing. But, this have error. The error is "Error (10372): VHDL error at vga_test.vhd(25): item cannot be assigned value". The error is at the red colour line. For your information, I used altera de2 115 for my project. Thanks for your attention. library ieee; use ieee.std_logic_1164.all; entity vga_test is port( clk, reset: in std_logic; sw: in std_logic_vector(7 downto 0); hsync, vsync: out std_logic; red,green,blue: out std_logic_vector(7 downto 0)); end vga_test; architecture arch of vga_test is signal red_reg: std_logic_vector(7 downto 0); signal green_reg: std_logic_vector(7 downto 0); signal blue_reg: std_logic_vector(7 downto 0); signal video_on: std_logic; begin -- instantiate VGA sync circuit vga_sync_unit: entity work.vga_sync port map(clk=>clk, reset=>reset, hsync=>hsync, vsync=>vsync, video_on=>video_on, p_tick=>open, pixel_x=>open, pixel_y=>open); process(clk, reset) -- rgb buffer begin if (reset = '1') then (red_reg and green_reg and blue_reg) <= (others => '0'); elsif (clk' event and clk = '1') then (red_reg and green_reg and blue_reg) <= sw; end if; end process; (red and green and blue) <= (red_reg and green_reg and blue_reg) when video_on = '1' else '0'; end arch;