VGA32 Controller - Accessible Internal Registers
Contents
The following sections detail the internal registers for the VGA32 Controller, accessible from the host processor.
Control Register (CTRL)
Address: 0000000000b
Access: Read/Write
Value after Reset: 0000_0000h
This 32-bit register is used to configure and control operation of the Controller.
Table 1. The CTRL register.MSB LSB | |||||||||||||
31 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
- | ckde | bop | cop | vop | hop | cme | bm1 | bm0 | ltb | - | - | - | vse |
Bit | Symbol | Function |
---|---|---|
CTRL.31..CTRL.13 | - | Not used |
CTRL.12 | ckde | Clock Division Enable bit |
CTRL.11 | bop | Blanking Synchronization Output Polarity bit. 0 = Blanking sync pulse is active High |
CTRL.10 | cop | Composite Synchronization Output Polarity bit. 0 = Composite sync pulse is active High |
CTRL.9 | vop | Vertical Synchronization Output Polarity bit. 0 = Vertical sync pulse is active High |
CTRL.8 | hop | Horizontal Synchronization Output Polarity bit. 0 = Horizontal sync pulse is active High |
CTRL.7 | cme | Color Mode Enable bit. 0 = Controller operating in Black & White mode |
CTRL.6 | bm1 | Bitmode control bits (bm1 bm0). Determines how many bits are used to represent a single pixel: 00 = 8 bits per pixel |
CTRL.5 | bm0 | |
CTRL.4 | ltb | Color Look-up Table Select bit. 0 = color look-up table 0 is active |
CTRL.3 | - | Not used |
CTRL.2 | - | Not used |
CTRL.1 | - | Not used |
CTRL.0 | vse | Video System Enable bit. 0 = Controller is stopped |
Status Register (STATUS)
Address: 0000000001b
Access: Read
Value after Reset: 0000_0000h
This 32-bit register is used to provide status information concerning which color look-up table is currently active.
Table 3. The STATUS register.MSB LSB | |||||
31 5 | 4 | 3 | 2 | 1 | 0 |
- | acp | - | - | - | - |
Bit | Symbol | Function |
---|---|---|
STATUS.31..STATUS.5 | - | Not used. Returns 0 when read |
STATUS.4 | acp | Active Color Look-up Table flag. Reflects which look-up table is currently being used:
0 = Color Look-up Table 0 in use |
STATUS.3 | - | Not used. Returns 0 when read |
STATUS.2 | - | Not used. Returns 0 when read |
STATUS.1 | - | Not used. Returns 0 when read |
STATUS.0 | - | Not used. Returns 0 when read |
Horizontal Timing Register (HTIM)
Address: 0000000010b
Access: Read/Write
Value after Reset: 0000_0000h
This 32-bit register is used to configure the horizontal timing.
Table 5. The HTIM register.MSB LSB | ||
31 24 | 23 16 | 15 0 |
hsync | hbporch | hvisible |
Bit | Symbol | Function |
---|---|---|
HTIM.31..HTIM.24 | hsync | Horizontal Synchronization Pulse length (in pixels - 1) |
HTIM.23..HTIM.16 | hbporch | Horizontal Back Porch length (in pixels - 1) |
HTIM.15..HTIM.0 | hvisible | Horizontal Visible Area (in pixels - 1) |
Vertical Timing Register (VTIM)
Address: 0000000011b
Access: Read/Write
Value after Reset: 0000_0000h
This 32-bit register is used to configure the vertical timing.
Table 7. The VTIM register.MSB LSB | ||
31 24 | 23 16 | 15 0 |
vsync | vbporch | vvisible |
Bit | Symbol | Function |
---|---|---|
VTIM.31..VTIM.24 | vsync | Vertical Synchronization Pulse length (in lines - 1) |
VTIM.23..VTIM.16 | vbporch | Vertical Back Porch length (in lines - 1) |
VTIM.15..VTIM.0 | vvisible | Vertical Visible Area (in lines - 1) |
Horizontal and Vertical Length Register (HVLEN)
Address: 0000000100b
Access: Read/Write
Value after Reset: 0000_0000h
This 32-bit register is used to store horizontal and vertical length values that together determine the actual extents of the image display area on the screen.
Table 9. The HVLEN register.MSB LSB | |
31 16 | 15 0 |
hlen | vlen |
Bit | Symbol | Function |
---|---|---|
HVLEN.31..HVLEN.16 | hlen | This value determines the number of viewable pixels to be displayed in each line of a frame and is therefore used to control the horizontal extents of the visible display area |
HVLEN.15..HVLEN.0 | vlen | This value determines the number of lines to be displayed in a frame and is therefore used to control the vertical extents of the visible display area |
Video Memory Base Address Register (VMBA)
Address: 0000000101b
Access: Read/Write
Value after Reset: 0000_0000h
This 30-bit register is used to store the address in memory at which the video page starts. The width of the memory used to store the graphics to be displayed is actually 32 bits. When addressing locations in this memory, the 30-bit video base address value is sent on the me_ADR_O line as bits 31..2, with bits 1..0 always zeros.
System Clock Division Register (CDIV)
Address: 0000000110b
Access: Read/Write
Value after Reset: 00h
This 8-bit register is used to store a divisor reload value, allowing you to effectively control the frequency of the clock used to drive the timing generation unit (and horizontal and vertical timing sub-units therein).
If you wish to divide CLK_I by 2, load 01h
into CDIV. If you wish to divide by 3, load 02h
into CDIV, and so on.
If no internal clock division is required, either load 00h
into CDIV, or expressly prohibit clock division by clearing the ckde
bit in the Control register (CTRL.12).
Color Look-up Table Offset Register (CLUTOFF)
Address: 0000000111b
Access: Read/Write
Value after Reset: 00h
This 8-bit register is used to store an offset value used to determine the 8-bit address of a color contained within the active color look-up table. The use of this offset value depends on the bitmode setting in the Control register, as determined by the bm1
and bm0
bits (CTRL.6 and CTRL.5 respectively). The following table summarizes how the effective CLUT address is determined for each of the four possible pixel modes.
bm1 (CTRL.6) | bm0 (CTRL.5) | Mode | Use of value in CLUTOFF register |
---|---|---|---|
0 | 0 | 8 bits per pixel | not used |
0 | 1 | 4 bits per pixel | bits 7..4 are used as the upper bits of the 8-bit CLUT address, with bits 3..0 taken from the Video Memory |
1 | 0 | 2 bits per pixel | bits 7..2 are used as the upper bits of the 8-bit CLUT address, with bits 1..0 taken from the Video Memory |
1 | 1 | 1 bit per pixel | bits 7..1 are used as the upper bits of the 8-bit CLUT address, with bit 0 taken from the Video Memory |