---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 05/11/2015 02:25:32 PM -- Design Name: -- Module Name: crom - Behavioral -- Project Name: -- Target Devices: -- Tool Versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx leaf cells in this code. --library UNISIM; --use UNISIM.VComponents.all; entity crom is Port ( ascii : in STD_LOGIC_VECTOR (6 downto 0); cx, cy : in unsigned (9 downto 0); pix : out STD_LOGIC); end crom; architecture Behavioral of CROM is signal data: STD_LOGIC_VECTOR(0 to 7); signal adr: unsigned(5 downto 0); type rom is array(0 to 511) of STD_LOGIC_VECTOR(0 to 7); constant chrom: rom := ( "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00011000", "00011000", "00011000", "00011000", "00000000", "00000000", "00011000", "00000000", "01100110", "01100110", "01100110", "00000000", "00000000", "00000000", "00000000", "00000000", "01100110", "01100110", "11111111", "01100110", "11111111", "01100110", "01100110", "00000000", "00011000", "00111110", "01100000", "00111100", "00000110", "01111100", "00011000", "00000000", "01100010", "01100110", "00001100", "00011000", "00110000", "01100110", "01000110", "00000000", "00111100", "01100110", "00111100", "00111000", "01100111", "01100110", "00111111", "00000000", "00000110", "00001100", "00011000", "00000000", "00000000", "00000000", "00000000", "00000000", "00001100", "00011000", "00110000", "00110000", "00110000", "00011000", "00001100", "00000000", "00110000", "00011000", "00001100", "00001100", "00001100", "00011000", "00110000", "00000000", "00000000", "01100110", "00111100", "11111111", "00111100", "01100110", "00000000", "00000000", "00000000", "00011000", "00011000", "01111110", "00011000", "00011000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00011000", "00011000", "00110000", "00000000", "00000000", "00000000", "01111110", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00011000", "00011000", "00000000", "00000000", "00000011", "00000110", "00001100", "00011000", "00110000", "01100000", "00000000", "00111100", "01100110", "01101110", "01110110", "01100110", "01100110", "00111100", "00000000", "00011000", "00011000", "00111000", "00011000", "00011000", "00011000", "01111110", "00000000", "00111100", "01100110", "00000110", "00001100", "00110000", "01100000", "01111110", "00000000", "00111100", "01100110", "00000110", "00011100", "00000110", "01100110", "00111100", "00000000", "00000110", "00001110", "00011110", "01100110", "01111111", "00000110", "00000110", "00000000", "01111110", "01100000", "01111100", "00000110", "00000110", "01100110", "00111100", "00000000", "00111100", "01100110", "01100000", "01111100", "01100110", "01100110", "00111100", "00000000", "01111110", "01100110", "00001100", "00011000", "00011000", "00011000", "00011000", "00000000", "00111100", "01100110", "01100110", "00111100", "01100110", "01100110", "00111100", "00000000", "00111100", "01100110", "01100110", "00111110", "00000110", "01100110", "00111100", "00000000", "00000000", "00000000", "00001000", "00000000", "00000000", "00001000", "00000000", "00000000", "00000000", "00000000", "00001000", "00000000", "00000000", "00001000", "00011000", "00110000", "00000000", "00000000", "00001100", "00010000", "00100000", "00010000", "00001100", "00000000", "00000000", "00000000", "00000000", "00111100", "00000000", "00111100", "00000000", "00000000", "00000000", "00000000", "00110000", "00001000", "00000100", "00001000", "00110000", "00000000", "00010000", "00101000", "01000100", "00100100", "00001100", "00011000", "00000000", "00010000", "00111100", "01100110", "01101110", "01101110", "01100000", "01100010", "00111100", "00000000", "00011000", "00111100", "01100110", "01111110", "01100110", "01100110", "01100110", "00000000", "01111100", "01100110", "01100110", "01111100", "01100110", "01100110", "01111100", "00000000", "00111100", "01100110", "01100000", "01100000", "01100000", "01100110", "00111100", "00000000", "01111000", "01101100", "01100110", "01100110", "01100110", "01101100", "01111000", "00000000", "01111110", "01100000", "01100000", "01111000", "01100000", "01100000", "01111110", "00000000", "01111110", "01100000", "01100000", "01111000", "01100000", "01100000", "01100000", "00000000", "00111100", "01100110", "01100000", "01101110", "01100110", "01100110", "00111100", "00000000", "01100110", "01100110", "01100110", "01111110", "01100110", "01100110", "01100110", "00000000", "00111100", "00011000", "00011000", "00011000", "00011000", "00011000", "00111100", "00000000", "00011110", "00001100", "00001100", "00001100", "00001100", "01101100", "00111000", "00000000", "01100110", "01101100", "01111000", "01110000", "01111000", "01101100", "01100110", "00000000", "01100000", "01100000", "01100000", "01100000", "01100000", "01100000", "01111110", "00000000", "01100011", "01110111", "01111111", "01101011", "01100011", "01100011", "01100011", "00000000", "01100110", "01110110", "01111110", "01111110", "01101110", "01100110", "01100110", "00000000", "00111100", "01100110", "01100110", "01100110", "01100110", "01100110", "00111100", "00000000", "01111100", "01100110", "01100110", "01111100", "01100000", "01100000", "01100000", "00000000", "00111100", "01100110", "01100110", "01100110", "01100110", "00111100", "00001110", "00000000", "01111100", "01100110", "01100110", "01111100", "01111000", "01101100", "01100110", "00000000", "00111100", "01100110", "01100000", "00111100", "00000110", "01100110", "00111100", "00000000", "01111110", "00011000", "00011000", "00011000", "00011000", "00011000", "00011000", "00000000", "01100110", "01100110", "01100110", "01100110", "01100110", "01100110", "00111100", "00000000", "01100110", "01100110", "01100110", "01100110", "01100110", "00111100", "00011000", "00000000", "01100011", "01100011", "01100011", "01101011", "01111111", "01110111", "01100011", "00000000", "01100110", "01100110", "00111100", "00011000", "00111100", "01100110", "01100110", "00000000", "01100110", "01100110", "01100110", "00111100", "00011000", "00011000", "00011000", "00000000", "01111110", "00000110", "00001100", "00011000", "00110000", "01100000", "01111110", "00000000", "00111100", "00110000", "00110000", "00110000", "00110000", "00110000", "00111100", "00000000", "00000000", "01000000", "00100000", "00010000", "00001000", "00000000", "00000000", "00000000", "00111100", "00001100", "00001100", "00001100", "00001100", "00001100", "00111100", "00000000", "00000000", "00010000", "00101000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00000000", "00111100"); begin adr <= resize(unsigned(ascii) - 32, 6); data <= chrom(to_integer(adr & cy(2 downto 0))); pix <= data(to_integer(cx(2 downto 0))); end Behavioral;