📄 memoire_alphabet.vhdl
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.NUMERIC_STD.all;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity memoire_alphabet is
Port ( clk : in std_logic;
adress_in : in std_logic_vector(7 downto 0);
ligne : in std_logic_vector(2 downto 0);
texture : out std_logic_vector(7 downto 0));
end memoire_alphabet;
architecture Behavioral of memoire_alphabet is
signal adress_alphabet : std_logic_vector(10 downto 0);
signal data_out_alphabet : std_logic_vector(5 downto 0);
type TYPE_ROM is array (0 to 2047) of
std_logic_vector(5 downto 0);
----------------------------------------------------
--memoire contenant les symboles
constant alphabet: TYPE_ROM :=
(
--A
"000000",
"001100",
"001100",
"010010",
"011110",
"100001",
"100001",
"000000",
--B
"000000",
"111100",
"100010",
"111110",
"100001",
"100001",
"111110",
"000000",
--C
"000000",
"011110",
"100001",
"100000",
"100000",
"100001",
"011110",
"000000",
--D
"000000",
"111100",
"100010",
"100001",
"100001",
"100010",
"111100",
"000000",
--E
"000000",
"111111",
"100000",
"111100",
"100000",
"100000",
"111111",
"000000",
--F
"000000",
"111111",
"100000",
"100000",
"111110",
"100000",
"100000",
"000000",
--G
"000000",
"011110",
"100001",
"100000",
"100111",
"100011",
"011101",
"000000",
--H
"000000",
"100001",
"100001",
"111111",
"100001",
"100001",
"100001",
"000000",
--I
"000000",
"001110",
"000100",
"000100",
"000100",
"000100",
"001110",
"000000",
--J
"000000",
"000111",
"000010",
"000010",
"000010",
"100010",
"011100",
"000000",
--K
"000000",
"100001",
"100010",
"110100",
"111000",
"100110",
"100001",
"000000",
--L
"000000",
"100000",
"100000",
"100000",
"100000",
"100000",
"111111",
"000000",
--M
"000000",
"100001",
"110011",
"101101",
"101101",
"100001",
"100001",
"000000",
--N
"000000",
"100001",
"110001",
"101001",
"100101",
"100011",
"100001",
"000000",
--O
"000000",
"011110",
"100001",
"100001",
"100001",
"100001",
"011110",
"000000",
--P
"000000",
"111100",
"100010",
"100010",
"111100",
"100000",
"100000",
"000000",
--Q
"000000",
"001100",
"010010",
"100001",
"100101",
"010010",
"001101",
"000000",
--R
"000000",
"111110",
"100001",
"100001",
"111110",
"100010",
"100001",
"000000",
--S
"000000",
"011110",
"100001",
"011000",
"000110",
"100001",
"011110",
"000000",
--T
"000000",
"111111",
"001100",
"001100",
"001100",
"001100",
"001100",
"000000",
--U
"000000",
"100001",
"100001",
"100001",
"100001",
"100001",
"011110",
"000000",
--V
"000000",
"100001",
"100001",
"010010",
"010010",
"001100",
"001100",
"000000",
--W
"000000",
"100001",
"100001",
"100001",
"100001",
"101101",
"010010",
"000000",
--X
"000000",
"100001",
"010010",
"001100",
"001100",
"010010",
"100001",
"000000",
--Y
"000000",
"100001",
"010010",
"001100",
"001100",
"001100",
"001100",
"000000",
--Z
"000000",
"111111",
"000010",
"000100",
"001000",
"010000",
"111111",
"000000",
others => "111111"
);
-------------------------------------------------------
begin
--adressage de l'alphabet
process(clk)
begin
if rising_edge(clk) then
adress_alphabet <= adress_in & ligne ;
data_out_alphabet <= alphabet(to_integer(unsigned(adress_alphabet)));
texture <= '0' & data_out_alphabet & '0' ;
end if;
end process;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -