OpenCores
URL https://opencores.org/ocsvn/single-14-segment-display-driver-w-decoder/single-14-segment-display-driver-w-decoder/trunk

Subversion Repositories single-14-segment-display-driver-w-decoder

[/] [single-14-segment-display-driver-w-decoder/] [trunk/] [Project/] [Sources/] [ascii_decoder.vhd] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 liubenoff
--------------------------------------------------------------------------------
2 9 liubenoff
-- Entity: ascii_decoder
3 5 liubenoff
-- Date:2017-01-07  
4
-- Author: GL     
5
--
6
-- Description: 
7
--------------------------------------------------------------------------------
8
 
9
--! @file
10
--! @brief ASCII decoding table with I/O control logic
11
library ieee;
12
use ieee.std_logic_1164.all;
13
use ieee.numeric_std.all;
14
 
15 9 liubenoff
entity ascii_decoder is
16 5 liubenoff
        port  (
17 9 liubenoff
        clk     : in    std_logic;                                      --! input clock, xx MHz.
18 5 liubenoff
        reset   : in    std_logic;
19
 
20 6 liubenoff
        --! ascii_in(7) represents the DP state so it is not decoded. 
21
        --! Symbol codes from 0x00 to 0x7F are without DP lit. Symbol codes from 0x80 to 0xFF have DP lit.
22 9 liubenoff
        ascii_in: in    std_logic_vector(7 downto 0);                   --! input ascii code to be displayed
23 6 liubenoff
 
24 9 liubenoff
        disp_data_q : out std_logic_vector(14 downto 0)                 --! decoded ascii code output with symbol bit map
25 5 liubenoff
        );
26 9 liubenoff
end ascii_decoder;
27 5 liubenoff
 
28 9 liubenoff
architecture arch of ascii_decoder is
29 5 liubenoff
 
30 6 liubenoff
    --! Q represents the symbol's bit mapping overlay over the 14-segment display.
31
    signal Q : std_logic_vector(13 downto 0);
32 5 liubenoff
begin
33
 
34 9 liubenoff
--! @brief Decoding table handling all symbols except the DP
35
rom_decoding_table: entity work.decoder_table_dist_rom
36 6 liubenoff
port map(
37
    Address => ascii_in(6 downto 0),
38
    Q       => Q
39
);
40 5 liubenoff
 
41 6 liubenoff
--! Inversion of ascii_in(7) is needed as '0' is display segment active level
42 8 liubenoff
disp_data_q <= (not ascii_in(7)) & Q;
43 5 liubenoff
 
44 6 liubenoff
 
45 5 liubenoff
end arch;
46
 

powered by: WebSVN 2.1.0

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