OpenCores
URL https://opencores.org/ocsvn/z80soc/z80soc/trunk

Subversion Repositories z80soc

[/] [z80soc/] [trunk/] [V0.7.3/] [DE1/] [vhdl/] [char_rom.VHD] - Blame information for rev 46

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 46 rrred
-------------------------------------------------------------------------------------------------
2
-- This design is part of:
3
-- Z80SoC (Z80 System on Chip)
4
-- Ronivon Candido Costa
5
-- ronivon.costa@gmail.com
6
--
7
-- 2010 - 11 - 22
8
--
9
 
10
library IEEE;
11
use  IEEE.STD_LOGIC_1164.all;
12
use  IEEE.STD_LOGIC_ARITH.all;
13
use  IEEE.STD_LOGIC_UNSIGNED.all;
14
LIBRARY lpm;
15
USE lpm.lpm_components.ALL;
16
 
17
ENTITY Char_ROM IS
18
        PORT(   clock                                           : IN    STD_LOGIC;
19
                        character_address                       : IN    STD_LOGIC_VECTOR(7 DOWNTO 0);
20
                        font_row, font_col                      : IN    STD_LOGIC_VECTOR(2 DOWNTO 0);
21
                        rom_mux_output  : OUT   STD_LOGIC);
22
END Char_ROM;
23
 
24
ARCHITECTURE a OF Char_ROM IS
25
        SIGNAL  rom_data: STD_LOGIC_VECTOR(7 DOWNTO 0);
26
        SIGNAL  rom_address: STD_LOGIC_VECTOR(10 DOWNTO 0);
27
BEGIN
28
-- Small 8 by 8 Character Generator ROM for Video Display
29
-- Each character is 8 8-bits words of pixel data
30
 char_gen_rom: lpm_rom
31
      GENERIC MAP ( lpm_widthad => 11,
32
        lpm_numwords => 2048,
33
        lpm_outdata => "UNREGISTERED",
34
        lpm_address_control => "REGISTERED",
35
-- Reads in mif file for character generator font data
36
         lpm_file => "..\ROM\CHARROM.MIF",
37
         lpm_width => 8)
38
      PORT MAP ( inclock => clock, address => rom_address, q => rom_data);
39
 
40
rom_address <= character_address & font_row;
41
-- Mux to pick off correct rom data bit from 8-bit word
42
-- for on screen character generation
43
rom_mux_output <= rom_data ( (CONV_INTEGER(NOT font_col(2 downto 0))));
44
 
45
END a;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.