We will design two individual counters. First counter counts from 0 to 639 to meet horizontal resolution, second counters counts from 0 to 479 to meet vertical resolution. We will also define two signals called h_end and v_end that indicates the end point of the counters.
We can connect the VS and HS directly to the VGA connector. But as to RGB signals we can not say the same thing. As we remembered the previous part, RGB are the analog signals with ranging from 0 to 0,7 volt. So we should use 270 ohm resistor between the RGB and VGA connector pins.(inner resistor of the monitor is about 75 ohm and the output voltage of the FPGA 3.3 Volt.)