Digital Signal Processing Reference
In-Depth Information
Pixel row address and column address counters are used to determine the
current character column and line position on the screen. They are generated as
the image scans across the screen with the VGA_SYNC core by using the high
six bits of the pixel row and pixel column outputs. Each character is a 16 by 16
block of pixels. The divide by 16 operation just requires truncation of the low
four bits of the pixel row and column. The display area is 40 characters by 30
lines.
Constant character data for titles in the left column is stored in a small ROM
called the character format ROM. This section of code sets up the format ROM
that contains the character addresses for the constant character data in the left
column of the video image for the display.
-- Character Format ROM for Video Display
-- Displays constant format character data
-- on left side of Display area
format_rom: lpm_rom
GENERIC MAP (
lpm_widthad => 6,
lpm_numwords =>60,
lpm_outdata => "UNREGISTERED",
lpm_address_control => "UNREGISTERED",
-- Reads in mif file for data display titles
lpm_file
=>"format.mif",
lpm_width
=> 6)
Each pixel clock cycle, a process containing a series of nested CASE
statements is used to select the character to display as the image scans across
the screen. The CASE statements check the row and column counter outputs
from the sync unit to determine the exact character column and character line
that is currently being displayed. The CASE statements then output the
character address for the desired character to the char_ROM FPGAcore.
Table 10.1 lists the address of each character in the font ROM. Alphabetic
characters start at octal location 01 and numbers start at octal location 60. Octal
location 40 contains a space that is used whenever no character is displayed.
When the display is in the left column, data from the format_ROM is used. Any
unused character display areas must select the space character that has blank or
all zero font data.
Hexadecimal variables in the right column in Figure 10.8 are generated by
using 4-bit data values from the design to index into the character font ROM.
As an example, the value "11" & PC(7 DOWNTO 4), when used as the
character address to the FPGAcore, char_ROM, will map into the character font
for 0..9 and A..F. The actual hex character selected is based on the current value
of the 4 bits in the VHDL signal, PC. As seen in the last column of Table 10.1,
the letters, A..F, appear again after decimal numbers in the font ROM to
simplify this hexadecimal mapping conversion.
Search WWH ::




Custom Search