久久久久久久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://www.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
成人一区二区三区在线观看
|
日本精a在线观看
|
午夜视频网站
|
国产精品中文字幕在线
|
男女视频在线免费观看
|
最新中文字幕久久
|
国产精品一区在线观看
|
欧洲尺码日本国产精品
|
三级在线视频
|
欧美一区永久视频免费观看
|
国产精品久久久久久久久久免费看
|
成人不卡视频
|
av国产精品
|
欧美一区视频
|
国产精品视频久久久久久
|
日韩av看片
|
欧美日韩不卡合集视频
|
欧美激情欧美激情在线五月
|
999久久久
|
中文字幕精品一区二区三区精品
|
亚洲一区中文字幕
|
国产精品毛片
|
中文字幕免费在线观看
|
天堂在线中文字幕
|
一区二区三区小视频
|
中文字幕二区
|
国产精品视频专区
|
精品亚洲一区二区三区四区五区
|
韩日精品一区
|
国产成人高清在线观看
|
自拍第一页
|
欧美成人h版在线观看
|
久久99国产精品
|
欧美日本亚洲
|
中文字幕一区二区三区四区五区
|
欧美一区二区三区国产精品
|
在线免费观看黄网
|
国产精品亚洲一区二区三区在线
|
日韩综合
|
在线成人一区
|
久热精品免费
|