URL
https://opencores.org/ocsvn/z80soc/z80soc/trunk
[/] [z80soc/] [trunk/] [V0.7/] [DE1/] [vhdl/] [char_rom.VHD] - Blame information for rev 42
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
34 |
rrred |
library IEEE;
|
2 |
|
|
use IEEE.STD_LOGIC_1164.all;
|
3 |
|
|
use IEEE.STD_LOGIC_ARITH.all;
|
4 |
|
|
use IEEE.STD_LOGIC_UNSIGNED.all;
|
5 |
|
|
LIBRARY lpm;
|
6 |
|
|
USE lpm.lpm_components.ALL;
|
7 |
|
|
|
8 |
|
|
ENTITY Char_ROM IS
|
9 |
|
|
PORT( clock : IN STD_LOGIC;
|
10 |
|
|
character_address : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
11 |
|
|
font_row, font_col : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
|
12 |
|
|
rom_mux_output : OUT STD_LOGIC);
|
13 |
|
|
END Char_ROM;
|
14 |
|
|
|
15 |
|
|
ARCHITECTURE a OF Char_ROM IS
|
16 |
|
|
SIGNAL rom_data: STD_LOGIC_VECTOR(7 DOWNTO 0);
|
17 |
|
|
SIGNAL rom_address: STD_LOGIC_VECTOR(10 DOWNTO 0);
|
18 |
|
|
BEGIN
|
19 |
|
|
-- Small 8 by 8 Character Generator ROM for Video Display
|
20 |
|
|
-- Each character is 8 8-bits words of pixel data
|
21 |
|
|
char_gen_rom: lpm_rom
|
22 |
|
|
GENERIC MAP ( lpm_widthad => 11,
|
23 |
|
|
lpm_numwords => 2048,
|
24 |
|
|
lpm_outdata => "UNREGISTERED",
|
25 |
|
|
lpm_address_control => "REGISTERED",
|
26 |
|
|
-- Reads in mif file for character generator font data
|
27 |
|
|
lpm_file => "..\ROM\CHARROM.MIF",
|
28 |
|
|
lpm_width => 8)
|
29 |
|
|
PORT MAP ( inclock => clock, address => rom_address, q => rom_data);
|
30 |
|
|
|
31 |
|
|
rom_address <= character_address & font_row;
|
32 |
|
|
-- Mux to pick off correct rom data bit from 8-bit word
|
33 |
|
|
-- for on screen character generation
|
34 |
|
|
rom_mux_output <= rom_data ( (CONV_INTEGER(NOT font_col(2 downto 0))));
|
35 |
|
|
|
36 |
|
|
END a;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.