⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rom.vhd

📁 暑假时参加电子设计大赛曾经用EDA开发实现液晶显示TJUCI学校名的一个小程序
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity ROM is port   
(CR,A6,A5,A4,A3,A2,A1,A0:  in std_logic;   
 L15,L14,L13,L12,L11,L10,L9,L8,L7,L6,L5,L4,L3,L2,L1,L0: out std_logic);
end;
architecture arc_ROM of ROM is
signal din:  std_logic_vector(6 downto 0);
signal dout:  std_logic_vector(15 downto 0);
begin
   din<=A6&A5&A4&A3&A2&A1&A0;
process(din)     
begin          
if(CR='0')then 
case din is
 when"0000000"=>dout<="0000000000100001"; --1    
 when"0000001"=>dout<="0110000000100010"; --2    
 when"0000010"=>dout<="0001000000100010"; --3    
 when"0000011"=>dout<="0000100000100010"; --4    
 when"0000100"=>dout<="0000010000100010"; --5    
 when"0000101"=>dout<="0000001000100010"; --6    
 when"0000110"=>dout<="0000000100100010"; --7    
 when"0000111"=>dout<="0000000010100010"; --8    天
 when"0001000"=>dout<="0000000001111110"; --9    
 when"0001001"=>dout<="0000000010100010"; --10    
 when"0001010"=>dout<="0000000101100010"; --11    
 when"0001011"=>dout<="0000001000100010"; --12    
 when"0001100"=>dout<="0000010000100010"; --13   
 when"0001101"=>dout<="0001100000100010"; --14    
 when"0001110"=>dout<="0011000000100010"; --15    
 when"0001111"=>dout<="0111000000100000"; --16

 when"0010000"=>dout<="1110000001000010"; --1    
 when"0010001"=>dout<="0110000110001100"; --2    
 when"0010010"=>dout<="0010000000000000"; --3    
 when"0010011"=>dout<="0010000000100000"; --4    
 when"0010100"=>dout<="0010010100100100"; --5    
 when"0010101"=>dout<="0010010100100100"; --6    
 when"0010110"=>dout<="0010010100100100"; --7    
 when"0010111"=>dout<="1111111111111111"; --8    津
 when"0011000"=>dout<="0010010100100100"; --9    
 when"0011001"=>dout<="0010010100100100"; --10 
 when"0011010"=>dout<="0010010100100100"; --11    
 when"0011011"=>dout<="0010010100100100"; --12    
 when"0011100"=>dout<="0010010100100100"; --13   
 when"0011101"=>dout<="0010010100100100"; --14    
 when"0011110"=>dout<="0010010111111110"; --15    
 when"0011111"=>dout<="0010000000100000"; --16

 when"0100000"=>dout<="0000000000000000"; --1    
 when"0100001"=>dout<="0100000001000000"; --2   
 when"0100010"=>dout<="0010000010000000"; --3    
 when"0100011"=>dout<="0011111111110000"; --4    
 when"0100100"=>dout<="0010000010000000"; --5    
 when"0100101"=>dout<="0001000000000000"; --6    
 when"0100110"=>dout<="0111111111110000"; --7    
 when"0100111"=>dout<="0010000010001000"; --8    
 when"0101000"=>dout<="0000100010001000"; --9    城
 when"0101001"=>dout<="0001111110011110"; --10    
 when"0101010"=>dout<="0000001001101000"; --11    
 when"0101011"=>dout<="0000000110001000"; --12    
 when"0101100"=>dout<="0000011000100100"; --13   
 when"0101101"=>dout<="0001000000000000"; --14    
 when"0101110"=>dout<="0000100000000000"; --15   
 when"0101111"=>dout<="0000000000000000"; --16

 when"0110000"=>dout<="0000000000000000"; --1    
 when"0110001"=>dout<="0000000000000000"; --2    
 when"0110010"=>dout<="0000000000000000"; --3    
 when"0110011"=>dout<="0001111111110000"; --4    
 when"0110100"=>dout<="0000000000001000"; --5    
 when"0110101"=>dout<="0000000000001000"; --6    
 when"0110110"=>dout<="0000000000001001"; --7    
 when"0110111"=>dout<="1111111111111110"; --8    
 when"0111000"=>dout<="0000000000001000"; --9    市
 when"0111001"=>dout<="0000100000001000"; --10    
 when"0111010"=>dout<="0001111111110000"; --11    
 when"0111011"=>dout<="0000000000000000"; --12    
 when"0111100"=>dout<="0000000000000000"; --13   
 when"0111101"=>dout<="0000000000000000"; --14    
 when"0111110"=>dout<="0000000000000000"; --15    
 when"0111111"=>dout<="0000000000000000"; --16
 
 when"1000000"=>dout<="0000000000000000"; --1    
 when"1000001"=>dout<="0000010000001000"; --2    
 when"1000010"=>dout<="0100100100001111"; --3    
 when"1000011"=>dout<="0011111011111000"; --4    
 when"1000100"=>dout<="0010000000100010"; --5    
 when"1000101"=>dout<="0100010100100100"; --6    
 when"1000110"=>dout<="0101010100100100"; --7    
 when"1000111"=>dout<="0101010100100100"; --8    
 when"1001000"=>dout<="0111111111111111"; --9    建
 when"1001001"=>dout<="0101010100100100"; --10    
 when"1001010"=>dout<="0100010100100100"; --11    
 when"1001011"=>dout<="0100000011111000"; --12    
 when"1001100"=>dout<="0100000000100000"; --13   
 when"1001101"=>dout<="0100000000100000"; --14    
 when"1001110"=>dout<="1000000000000000"; --15    
 when"1001111"=>dout<="0000000000000000"; --16

 when"1010000"=>dout<="0000000000000000"; --1    
 when"1010001"=>dout<="0000000000010001"; --2    
 when"1010010"=>dout<="0000000000011110"; --3    
 when"1010011"=>dout<="0111111111110000"; --4    
 when"1010100"=>dout<="0010000000000000"; --5    
 when"1010101"=>dout<="0100000000010000"; --6    
 when"1010110"=>dout<="0100000111011111"; --7    
 when"1010111"=>dout<="0010110001000001"; --8    
 when"1011000"=>dout<="0001110001000001"; --9    设
 when"1011001"=>dout<="0010000111011111"; --10    
 when"1011010"=>dout<="0100000000010000"; --11    
 when"1011011"=>dout<="0100000000000000"; --12    
 when"1011100"=>dout<="0000000000000000"; --13   
 when"1011101"=>dout<="0000000000000000"; --14    
 when"1011110"=>dout<="0000000000000000"; --15    
 when"1011111"=>dout<="0000000000000000"; --16


 when"1100000"=>dout<="0000000000000000"; --1    
 when"1100001"=>dout<="0000000000000000"; --2    
 when"1100010"=>dout<="0000000000110001"; --3    
 when"1100011"=>dout<="0000000000001010"; --4    
 when"1100100"=>dout<="0000001000000100"; --5   
 when"1100101"=>dout<="0000001000010101"; --6  
 when"1100110"=>dout<="0000001000010010"; --7    
 when"1100111"=>dout<="0001001001010100"; --8    
 when"1101000"=>dout<="0011111110110100"; --9    学
 when"1101001"=>dout<="0000001000000100"; --10    
 when"1101010"=>dout<="0000001000100110"; --11   
 when"1101011"=>dout<="0000001000101010"; --12    
 when"1101100"=>dout<="0000001000010001"; --13   
 when"1101101"=>dout<="0000000000000000"; --14    
 when"1101110"=>dout<="0000000000000000"; --15    
 when"1101111"=>dout<="0000000000000000"; --16


 when"1110000"=>dout<="0000000000000000"; --1    
 when"1110001"=>dout<="1111111111111110"; --2    
 when"1110010"=>dout<="0000100000100010"; --3    
 when"1110011"=>dout<="0000010001010010"; --4    
 when"1110100"=>dout<="0100001110001110"; --5   
 when"1110101"=>dout<="0010000000011100"; --6  
 when"1110110"=>dout<="0001100010000100"; --7    
 when"1110111"=>dout<="0000011010010100"; --8    院
 when"1111000"=>dout<="0000000111110111"; --9    
 when"1111001"=>dout<="0000011010010100"; --10    
 when"1111010"=>dout<="0011100010000100"; --11   
 when"1111011"=>dout<="0100000000010100"; --12    
 when"1111100"=>dout<="0011000000001100"; --13   
 when"1111101"=>dout<="0000110000000000"; --14     
 when"1111110"=>dout<="0000000000000000"; --15    
 when"1111111"=>dout<="0000000000000000"; --16
 when others=>dout<="0000000000000000";
             end case;          
        end if;
end process;
L15<=dout(15);
L14<=dout(14);
L13<=dout(13);
L12<=dout(12);
L11<=dout(11);
L10<=dout(10);
L9<=dout(9);
L8<=dout(8);
L7<=dout(7);
L6<=dout(6);
L5<=dout(5);
L4<=dout(4);
L3<=dout(3);
L2<=dout(2);
L1<=dout(1);
L0<=dout(0);
end arc_ROM;


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -