URL
https://opencores.org/ocsvn/single-14-segment-display-driver-w-decoder/single-14-segment-display-driver-w-decoder/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 6 |
Rev 8 |
Line 1... |
Line 1... |
|
--------------------------------------------------------------------------------
|
|
-- Entity: ASCIIDecoder
|
|
-- Date:2017-01-07
|
|
-- Author: GL
|
|
--
|
|
-- Description:
|
|
--------------------------------------------------------------------------------
|
|
|
|
--! @file
|
|
--! @brief ASCII decoding table with I/O control logic
|
|
library ieee;
|
|
use ieee.std_logic_1164.all;
|
|
use ieee.numeric_std.all;
|
|
|
|
entity ASCIIDecoder is
|
|
port (
|
|
clk : in std_logic; -- input clock, xx MHz.
|
|
reset : in std_logic;
|
|
|
|
--! ascii_in(7) represents the DP state so it is not decoded.
|
|
--! Symbol codes from 0x00 to 0x7F are without DP lit. Symbol codes from 0x80 to 0xFF have DP lit.
|
|
ascii_in: in std_logic_vector(7 downto 0);
|
|
|
|
disp_data_q : out std_logic_vector(14 downto 0)
|
|
);
|
|
end ASCIIDecoder;
|
|
|
|
architecture arch of ASCIIDecoder is
|
|
|
|
--! Q represents the symbol's bit mapping overlay over the 14-segment display.
|
|
signal Q : std_logic_vector(13 downto 0);
|
|
begin
|
|
|
|
--! @details Decoding table
|
|
rom_decoding_table: entity work.DistRomAsciiDecoder
|
|
port map(
|
|
Address => ascii_in(6 downto 0),
|
|
Q => Q
|
|
);
|
|
|
|
--! Inversion of ascii_in(7) is needed as '0' is display segment active level
|
|
disp_data_q <= (not ascii_in(7)) & Q;
|
|
|
|
|
|
end arch;
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.