Changing Color Depth

The VGA Adapter module is very flexible and can scale to meet your projects needs. The default package uses 1 bit/channel (3 bits total) to represent color information. You can scale this value to 3 bits/channel (9 bits total). Increasing this value provides a broader range of colors but decreases the available memory on the DE2 Educational Board. In order to change the channel depth, modify the COLOR_CHANNEL_DEPTH constant in VgaAdapter.v to the desired channel depth.

Changing the Mode of Operation

Alternatively, you can change the mode of operation to Black and White and reduce the size of the color bus to 1 bit total. This can help tremendously with projects that require a large amount of internal memory. To switch to this mode of operation, change the value of the COLOR_MODE constant in VgaAdapter.v to 0.

Depth and Mode Comparison

The following table provides a comparison between the various modes of operation and color depths.

Mode Bits/Channel Total Bits Color Range Memory Usage (bits) Memory Usage (%)
Black & White - 1 2 32,768 7%
Color 1 3 8 98,304 20%
Color 2 6 64 196,608 41%
Color 3 9 512 294,912 60%
Color 4 12 4,096 393,216 81%