- Joined
- May 14, 2009
- Messages
- 1
- Reaction score
- 0
Hello, I am currently working on modifying a script for VGA but I am having trouble understanding the final process of the script. The video signal generation process is as follows:
Parameter descriptions:
constant HCBIT is it width of the horizontal counter ie 11
blank_hor and blank_vert are the horizontal and vertical blanking signals respectively.
coun_hor is the horizontal pixel counter signal.
red, green and blue are defined are std_logic_vectors of length 7 downto 0.
I understand that the else statement will output black to the screen when the blanking signals are set to low but I'm having trouble understanding the definitions of the signals red,green and blue.
Any help is greatly appreciated.
Code:
--VIDEO SIGNAL GENERATION PROCESS
--COMBINATIONAL
--INPUTS : coun_hor, blank_hor, blank_ver
--OUTPUTS : red,green,blue
RGB:process(coun_hor, blank_hor, blank_vert)
begin
if((blank_hor and blank_vert) = '1') then
red <= std_logic_vector(coun_hor(HCBIT - 1 downto HCBIT - 8));
green <= std_logic_vector(coun_hor(green'range));
blue <= std_logic_vector(coun_hor(3 downto 0) & "0000");
else
red <= (others => '0');
green <= (others => '0');
blue <= (others => '0');
end if;
end process RGB;
constant HCBIT is it width of the horizontal counter ie 11
blank_hor and blank_vert are the horizontal and vertical blanking signals respectively.
coun_hor is the horizontal pixel counter signal.
red, green and blue are defined are std_logic_vectors of length 7 downto 0.
I understand that the else statement will output black to the screen when the blanking signals are set to low but I'm having trouble understanding the definitions of the signals red,green and blue.
Any help is greatly appreciated.