久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標題:
vhdl驅動lcd解決了ISE聯合modelsim仿真看不見波形的問題
[打印本頁]
作者:
liuqq
時間:
2015-5-19 23:06
標題:
vhdl驅動lcd解決了ISE聯合modelsim仿真看不見波形的問題
本帖最后由 liuqq 于 2015-5-19 23:07 編輯
搞一個月解決了ISE聯合modelsim仿真看不見波形的問題,寫了一整天代碼,最后結果還是有點問題,明天找老師幫忙吧~
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library
declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity LCDb is
Port ( clk : in STD_LOGIC;--48MHZ
reset : in STD_LOGIC;
display : in STD_LOGIC;
xck : out STD_LOGIC;--6MHz
din : in STD_LOGIC_VECTOR(2 downto 0);
dout : out STD_LOGIC_VECTOR(7
downto 0));
end LCDb;
architecture LCDb_arch of LCDb is
signal sram1 :std_LOGIC_VECTOR(8 downto 0)
:="000000000";--數據寄存器
signal sram2 :std_LOGIC_VECTOR(8 downto 0)
:="000000000";
signal sram3 :std_LOGIC_VECTOR(8 downto 0)
:="000000000";
signal sram4 :std_LOGIC_VECTOR(8 downto 0)
:="000000000";
signal sram5 :std_LOGIC_VECTOR(8 downto 0)
:="000000000";
signal sram6 :std_LOGIC_VECTOR(8 downto 0)
:="000000000";
signal sram7 :std_LOGIC_VECTOR(8 downto 0)
:="000000000";
signal sram8 :std_LOGIC_VECTOR(8 downto 0)
:="000000000";
signal a : STD_LOGIC :='0';--系??分頻用
signal b : integer range 0 to 3;--系統分頻用clk八分頻得到xck
signal c : integer range 0 to 72;--寄存器數據寫入計數
signal d : integer range 0 to 9;--寄存器數據讀出計數
begin
xck<=a;
process(clk)
variable a_a :integer range 0 to 3;
begin
if(reset='1') then
if(clk'event and clk='0') then
if(a_a=3) then
a_a:=0;
a<=not a;
else
a_a:=a_a+1;
end
if;
end if;
end if;
end process;
process(clk)
begin
if(display='1') then
if(clk'event and clk='0') then
if(c=72) then
c<=0;
c<=c+1;
else
if(c=2) then
sram1(8 downto 6)<=din;
c<=c+1;
elsif(c=5) then
c<=c+1;
sram1(5 downto 3)<=din;
elsif(c=8) then
sram1(2 downto 0)<=din;
c<=c+1;
elsif(c=11) then
sram2(8 downto 6)<=din;
c<=c+1;
elsif(c=14) then
sram2(5 downto 3)<=din;
c<=c+1;
elsif(c=17) then
sram2(2 downto 0)<=din;
c<=c+1;
elsif(c=20) then
sram3(8 downto 6)<=din;
c<=c+1;
elsif(c=23) then
sram3(5 downto 3)<=din;
c<=c+1;
elsif(c=26) then
sram3(2 downto 0)<=din;
c<=c+1;
elsif(c=29) then
sram4(8 downto 6)<=din;
c<=c+1;
elsif(c=32) then
sram4(5 downto 3)<=din;
c<=c+1;
elsif(c=35) then
sram4(2 downto 0)<=din;
c<=c+1;
elsif(c=38) then
sram5(8 downto 6)<=din;
c<=c+1;
elsif(c=41) then
sram5(5 downto 3)<=din;
c<=c+1;
elsif(c=44) then
sram5(2 downto 0)<=din;
c<=c+1;
elsif(c=47) then
sram6(8 downto 6)<=din;
c<=c+1;
elsif(c=50) then
sram6(5 downto 3)<=din;
c<=c+1;
elsif(c=53) then
sram6(2 downto 0)<=din;
c<=c+1;
elsif(c=56) then
sram7(8 downto 6)<=din;
c<=c+1;
elsif(c=59) then
sram7(5 downto 3)<=din;
c<=c+1;
elsif(c=62) then
sram7(2 downto 0)<=din;
c<=c+1;
elsif(c=65) then
sram8(8 downto 6)<=din;
c<=c+1;
elsif(c=68) then
sram8(5 downto 3)<=din;
c<=c+1;
elsif(c=71) then
sram8(2 downto 0)<=din;
c<=c+1;
else
c<=c+1;
end if;
end
if;
end if;
end if;
end process;
process(a)
begin
if(display='1') then
if(a'event and a='0') then
if(d=9) then
dout<=sram1(8 downto 1);
d<=0;
d<=d+1;
else
if(d=0) then
dout<=sram1(8 downto 1);
elsif(d=1) then
dout(7)<=sram1(0);
dout(6 downto 0)<=sram2(8 downto 2);
elsif(d=2) then
dout(7 downto 6)<=sram2(1 downto 0);
dout(5 downto 0)<=sram3(8 downto 3);
elsif(d=3) then
dout(7 downto 5)<=sram3(2 downto 0);
dout(4 downto 0)<=sram4(8 downto 4);
elsif(d=4) then
dout(7 downto 4)<=sram4(3 downto 0);
dout(3 downto 0)<=sram5(8 downto 5);
elsif(d=5) then
dout(7 downto 3)<=sram5(4 downto 0);
dout(2 downto 0)<=sram6(8 downto 6);
elsif(d=6) then
dout(7 downto 2)<=sram6(5 downto 0);
dout(1 downto 0)<=sram7(8 downto 7);
elsif(d=7) then
dout(7 downto 1)<=sram7(6 downto 0);
dout(0)<=sram8(8);
else
dout<=sram8(7 downto 0);
end if;
d<=d+1;
end
if;
end if;
end if;
end process;
end LCDb_arch;
復制代碼
psb1.jpeg
(113.48 KB, 下載次數: 232)
下載附件
2015-5-19 23:05 上傳
psb.jpeg
(96.88 KB, 下載次數: 249)
下載附件
2015-5-19 23:05 上傳
歡迎光臨 (http://m.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
久久久久国产精品视频
|
91精品国产成人www
|
91在线精品秘密一区二区
|
久久精品99久久久久久
|
99热国产在线
|
欧洲美一区二区三区亚洲
|
青青青操
|
国产av一级毛片
|
中文字幕一区二区三区在线观看
|
欧美精品在线看
|
欧美1级片
|
久久久成人免费视频
|
女人黄网站
|
午夜黄色影院
|
日本少妇视频
|
日韩精品一级
|
成人免费黄色大片
|
成人做爰9片免费视频
|
五月婷婷中文字幕
|
国产激情在线视频
|
成人性色生活片
|
51成人网
|
av色在线
|
亚洲精品xxx
|
天天曰天天干
|
日本一级一片免费视频
|
人人爱人人插
|
亚洲精选在线观看
|
国产美女视频
|
精品久久久久久久久久久久久久
|
亚洲成人免费在线
|
日韩免费精品视频
|
亚洲激情在线
|
波多野吉衣一二三区乱码
|
亚洲欧美另类在线
|
一级大片免费看
|
一区二区三区在线播放
|
欧美区一区二
|
精品国产区一区二
|
亚洲免费看片
|
国产伦精品一区二区免费
|