亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 16lift.txt

?? 基于VHDL語言的實用電梯控制器的設(shè)計 源程序經(jīng)Xilinx公司的Foundation軟件仿真
?? TXT
字號:
library ieee; 
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all; 
entity led1 is
port(ledin:in std_logic_vector(3 downto 0);
ledout:out std_logic_vector(6 downto 0));
end led1;

architecture a_led of led1 is
begin
process(ledin)
begin 
case ledin is --The sequence is "g f e d c b a"
when "0000" => ledout<="0111111"; -- " show 0 "
when "0001" => ledout<="0000110"; -- " show 1 "
when "0010" => ledout<="1011011"; -- " show 2 "
when "0011" => ledout<="1001111"; -- " show 3 "
when "0100" => ledout<="1100110"; -- " show 4 "
when "0101" => ledout<="1101101"; -- " show 5 "
when "0110" => ledout<="1111101"; -- " show 6 "
when "0111" => ledout<="0000111"; -- " show 7 "
when "1000" => ledout<="1111111"; -- " show 8 "
when "1001" => ledout<="1101111"; -- " show 9 "
when "1010" => ledout<="1110111"; -- " show 10 "
when "1011" => ledout<="1111100"; -- " show 11 "
when "1100" => ledout<="0111001"; -- " show 12 "
when "1101" => ledout<="1011110"; -- " show 13 " 
when "1110" => ledout<="1111001"; -- " show 14 "
when "1111" => ledout<="1110001"; -- " show 15 "
when others => ledout<="XXXXXXX"; --必須有,Here it is 'X',single quote
end case;
end process ;
end a_led;
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;

entity lift1 is
port (
clk: in STD_LOGIC; --2hz信號
upin: in STD_LOGIC; --上升請求鍵
downin: in STD_LOGIC; --下降請求鍵
st_ch: in STD_LOGIC; --樓層選擇鍵
close: in STD_LOGIC; --提前關(guān)門鍵
delay: in STD_LOGIC; --延時關(guān)門鍵
run_stop: in STD_LOGIC; --電梯運行開關(guān)
lamp: out STD_LOGIC; --運行或停止燈
run_waitdis: out STD_LOGIC_VECTOR (6 downto 0); --運行或等待時間
st_outdis: out STD_LOGIC_VECTOR (6 downto 0); --電梯所在樓層指示
directdis: out STD_LOGIC_VECTOR (6 downto 0) --樓層選擇指示
);
end lift1;

architecture lift1_arch of lift1 is
component led1
port(ledin:in std_logic_vector(3 downto 0);
ledout:out std_logic_vector(6 downto 0));
end component;

signal ur,dr:STD_LOGIC_VECTOR (6 downto 1);
signal dir,liftor:integer range 0 to 5;
signal wai_t:STD_LOGIC_VECTOR (2 downto 0);
signal divide,hand,clkin:STD_LOGIC;
signal ladd:STD_LOGIC_VECTOR (1 downto 0);
signal closex,delayx:STD_LOGIC;
signal run_wait: STD_LOGIC_VECTOR (3 downto 0);
signal st_out: STD_LOGIC_VECTOR (3 downto 0);
signal direct: STD_LOGIC_VECTOR (3 downto 0);

begin
direct<='0'&conv_std_logic_vector(dir,3)+1;
st_out<='0'&conv_std_logic_vector(liftor,3)+1;
run_wait<='0'&wai_t;
lamp<=ladd(1);
hand<=wai_t(2) and (not wai_t(1)) and wai_t(0);
closex<=close and (not ladd(1));
delayx<=delay and (not ladd(1));

urun_wait:led1 port map(run_wait,run_waitdis);
ust_out:led1 port map(st_out,st_outdis);
udirect:led1 port map(direct,directdis);

p0:process(clk)
begin
if (clk'event and clk='1') then
clkin<=not clkin;
end if;
end process p0;

p1:process(clkin)
begin
if (clkin'event and clkin='1') then
divide<=not divide;
if (dir=5) then
dir<=0;
else
dir<=dir+1;
end if;
end if;
end process p1;

p2:process(ur,dr,dir,upin,downin,st_ch,liftor,wai_t,run_stop,hand)
variable num,t:integer range 0 to 6;
begin
num:=liftor+1;
t:=dir+1;
if (run_stop='1') then
if (((t>num) and (st_ch='1')) or (upin='1')) then
case t is
when 1 => ur(1)<='1';
when 2 => ur(2)<='1';
when 3 => ur(3)<='1';
when 4 => ur(4)<='1';
when 5 => ur(5)<='1';
when 6 => ur(6)<='1';
when others =>Null;
end case;
elsif (hand='1') then 
case num is
when 1 => ur(1)<='0';
when 2 => ur(2)<='0';
when 3 => ur(3)<='0';
when 4 => ur(4)<='0';
when 5 => ur(5)<='0';
when 6 => ur(6)<='0';
when others =>Null;
end case;
end if;
if (((t<num) and (st_ch='1')) or (downin='1')) then
case t is
when 1 => dr(1)<='1';
when 2 => dr(2)<='1';
when 3 => dr(3)<='1';
when 4 => dr(4)<='1';
when 5 => dr(5)<='1';
when 6 => dr(6)<='1';
when others =>Null;
end case;
elsif (hand='1') then
case num is
when 1 => dr(1)<='0';
when 2 => dr(2)<='0';
when 3 => dr(3)<='0';
when 4 => dr(4)<='0';
when 5 => dr(5)<='0';
when 6 => dr(6)<='0';
when others =>Null;
end case;
end if;
else
ur<="000000";
dr<="000000";
end if;
end process p2;

p3:process(ur,dr,liftor,ladd,wai_t,run_stop)
begin
if (run_stop='1') then
if (wai_t="110") then
if ((ur or dr)="000000") then
ladd(1)<='0';
else
case liftor is
when 0 =>if ((ur(1) or dr(1))>'0') then
ladd(1)<='0';
else
ladd<="11";
end if;
when 1 =>if ((ur(2) or dr(2))>'0') then
ladd(1)<='0';
elsif(((ladd(0)='1') and ((ur(6 downto 3) or dr(6 downto 3))>"0000")) or((ur(1) or dr(1))='0')) then
ladd<="11";
else
ladd<="10";
end if; 
when 2 =>if ((ur(3) or dr(3))>'0') then
ladd(1)<='0';
elsif(((ladd(0)='1') and ((ur(6 downto 4) or dr(6 downto 4))>"000")) or((ur(2 downto 1) or dr(2 downto 1))="00")) then
ladd<="11";
else
ladd<="10";
end if; 
when 3 =>if ((ur(4) or dr(4))>'0') then
ladd(1)<='0';
elsif(((ladd(0)='1') and ((ur(6 downto 5) or dr(6 downto 5))>"00")) or((ur(3 downto 1) or dr(3 downto 1))="000")) then
ladd<="11";
else
ladd<="10";
end if;
when 4 =>if ((ur(5) or dr(5))>'0') then
ladd(1)<='0';
elsif(((ladd(0)='1') and ((ur(6) or dr(6))>'0')) or((ur(4 downto 1) or dr(4 downto 1))="0000")) then
ladd<="11";
else
ladd<="10";
end if;
when 5 =>if ((ur(6) or dr(6))>'0') then
ladd(1)<='0'; 
else
ladd<="10";
end if;
when others=>null;
end case;
end if;
end if;
else
ladd<="00";
end if;
end process p3;

p4:process(divide,wai_t,ladd,closex,delayx)
begin
if (divide'event and divide='1') then
if (wai_t="000" or closex='1') then
wai_t<="110";
else
if (delayx='0') then
wai_t<=wai_t-1;
else
wai_t<="010";
end if;
if (wai_t="001") then
if (ladd="11") then 
liftor<=liftor+1;
elsif (ladd="10") then
liftor<=liftor-1;
end if;
end if;
end if;
end if;
end process p4;
end lift1_arch;
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;

entity lifter is
port (
clk: in STD_LOGIC; --4mhz信號
upin: in STD_LOGIC; --上升請求鍵
downin: in STD_LOGIC; --下降請求鍵
st_ch: in STD_LOGIC; --樓層選擇鍵
close: in STD_LOGIC; --提前關(guān)門鍵
delay: in STD_LOGIC; --延時關(guān)門鍵
run_stop: in STD_LOGIC; --電梯運行開關(guān)
lamp: out STD_LOGIC; --運行或停止燈
selout:out STD_LOGIC_VECTOR (2 downto 0);
segout: out STD_LOGIC_VECTOR (6 downto 0) 
);
end lifter;

architecture lift1_arch of lifter is
component led1
port(ledin:in std_logic_vector(3 downto 0);
ledout:out std_logic_vector(6 downto 0));
end component;

signal ur,dr:STD_LOGIC_VECTOR (6 downto 1);
signal dir,liftor:integer range 0 to 5;
signal wai_t:STD_LOGIC_VECTOR (2 downto 0);
signal div,cp,hand,clkin:STD_LOGIC;
signal ladd,s:STD_LOGIC_VECTOR (1 downto 0);
signal closex,delayx:STD_LOGIC;
signal run_wait: STD_LOGIC_VECTOR (3 downto 0);
signal st_out: STD_LOGIC_VECTOR (3 downto 0);
signal direct: STD_LOGIC_VECTOR (3 downto 0);
signal dout: STD_LOGIC_VECTOR (3 downto 0);
signal q:STD_LOGIC_VECTOR (21 downto 0);

begin
direct<='0'&conv_std_logic_vector(dir,3)+1;
st_out<='0'&conv_std_logic_vector(liftor,3)+1;
run_wait<='0'&wai_t;
lamp<=ladd(1);
hand<=wai_t(2) and (not wai_t(1)) and wai_t(0);
closex<=(not close) and (not ladd(1));
delayx<=(not delay) and (not ladd(1));
selout<="001" when s=0 else
"010" when s=1 else
"100" when s=2 else
"000";
dout<=direct when s=0 else
run_wait when s=1 else
st_out when s=2 else
"0000000";

u:led1 port map(dout,segout);

p0:process(clk)
begin
if (clk'event and clk='1') then
q<=q+1;
end if;
end process p0;
cp<=q(20);
s<=q(14 downto 13);
p1:process(cp)
begin
if (cp'event and cp='1') then
div<=not div;
if (dir=5) then
dir<=0;
else
dir<=dir+1;
end if;
end if;
end process p1;

p2:process(ur,dr,dir,upin,downin,st_ch,liftor,wai_t,run_stop,hand)
variable num,t:integer range 0 to 6;
begin
num:=liftor+1;
t:=dir+1;
if (run_stop='1') then
if (((t>num) and (st_ch='0')) or (upin='0')) then
case t is
when 1 => ur(1)<='1';
when 2 => ur(2)<='1';
when 3 => ur(3)<='1';
when 4 => ur(4)<='1';
when 5 => ur(5)<='1';
when 6 => ur(6)<='1';
when others =>Null;
end case;
elsif (hand='1') then 
case num is
when 1 => ur(1)<='0';
when 2 => ur(2)<='0';
when 3 => ur(3)<='0';
when 4 => ur(4)<='0';
when 5 => ur(5)<='0';
when 6 => ur(6)<='0';
when others =>Null;
end case;
end if;
if (((t<num) and (st_ch='0')) or (downin='0')) then
case t is
when 1 => dr(1)<='1';
when 2 => dr(2)<='1';
when 3 => dr(3)<='1';
when 4 => dr(4)<='1';
when 5 => dr(5)<='1';
when 6 => dr(6)<='1';
when others =>Null;
end case;
elsif (hand='1') then
case num is
when 1 => dr(1)<='0';
when 2 => dr(2)<='0';
when 3 => dr(3)<='0';
when 4 => dr(4)<='0';
when 5 => dr(5)<='0';
when 6 => dr(6)<='0';
when others =>Null;
end case;
end if;
else
ur<="000000";
dr<="000000";
end if;
end process p2;

p3:process(ur,dr,liftor,ladd,wai_t,run_stop)
begin
if (run_stop='1') then
if (wai_t="110") then
if ((ur or dr)="000000") then
ladd(1)<='0';
else
case liftor is
when 0 =>if ((ur(1) or dr(1))>'0') then
ladd(1)<='0';
else
ladd<="11";
end if;
when 1 =>if ((ur(2) or dr(2))>'0') then
ladd(1)<='0';
elsif(((ladd(0)='1') and ((ur(6 downto 3) or dr(6 downto 3))>"0000")) or((ur(1) or dr(1))='0')) then
ladd<="11";
else
ladd<="10";
end if; 
when 2 =>if ((ur(3) or dr(3))>'0') then
ladd(1)<='0';
elsif(((ladd(0)='1') and ((ur(6 downto 4) or dr(6 downto 4))>"000")) or((ur(2 downto 1) or dr(2 downto 1))="00")) then
ladd<="11";
else
ladd<="10";
end if; 
when 3 =>if ((ur(4) or dr(4))>'0') then
ladd(1)<='0';
elsif(((ladd(0)='1') and ((ur(6 downto 5) or dr(6 downto 5))>"00")) or((ur(3 downto 1) or dr(3 downto 1))="000")) then
ladd<="11";
else
ladd<="10";
end if;
when 4 =>if ((ur(5) or dr(5))>'0') then
ladd(1)<='0';
elsif(((ladd(0)='1') and ((ur(6) or dr(6))>'0')) or((ur(4 downto 1) or dr(4 downto 1))="0000")) then
ladd<="11";
else
ladd<="10";
end if;
when 5 =>if ((ur(6) or dr(6))>'0') then
ladd(1)<='0'; 
else
ladd<="10";
end if;
when others=>null;
end case;
end if;
end if;
else
ladd<="00";
end if;
end process p3;

p4:process(div,wai_t,ladd,closex,delayx)
begin
if (div'event and div='1') then
if (wai_t="000" or closex='1') then
wai_t<="110";
else
if (delayx='0') then
wai_t<=wai_t-1;
else
wai_t<="010";
end if;
if (wai_t="001") then
if (ladd="11") then 
liftor<=liftor+1;
elsif (ladd="10") then
liftor<=liftor-1;
end if;
end if;
end if;
end if;
end process p4;
end lift1_arch;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品综合久久久久久8888| 成人三级在线视频| 亚洲欧洲三级电影| 日韩欧美你懂的| 欧美亚洲免费在线一区| 丁香婷婷综合五月| 久久国产日韩欧美精品| 亚洲综合免费观看高清完整版在线| 久久综合九色综合97_久久久| 欧美婷婷六月丁香综合色| 成人亚洲精品久久久久软件| 乱中年女人伦av一区二区| 亚洲国产日韩精品| 中文字幕一区二区三区乱码在线| 日韩欧美国产系列| 69堂精品视频| 欧美专区日韩专区| 色综合久久88色综合天天| 成人激情文学综合网| 国产一二三精品| 久久精品国产免费| 日韩av中文字幕一区二区三区| 一区二区三区电影在线播| 国产精品高清亚洲| 亚洲国产精品精华液ab| 国产亚洲综合性久久久影院| 久久久久久电影| 精品国产91亚洲一区二区三区婷婷| 欧美美女一区二区在线观看| 欧美剧情片在线观看| 欧美视频在线一区| 欧美日韩一级片网站| 欧美亚洲国产一区在线观看网站| 91丝袜高跟美女视频| 99re6这里只有精品视频在线观看| 成人黄色小视频| 94色蜜桃网一区二区三区| 成人国产精品免费观看| 成人一区二区三区中文字幕| 成人的网站免费观看| 成人午夜私人影院| 91在线porny国产在线看| 91色在线porny| 色天天综合色天天久久| 欧美日韩综合在线免费观看| 欧美喷水一区二区| 91精品国产色综合久久久蜜香臀| 欧美一区二区久久| 久久久久久久久久久久久久久99 | 日韩av在线发布| 免费看日韩a级影片| 免费日本视频一区| 国产乱码精品一品二品| 成人app网站| 色国产综合视频| 欧美丰满一区二区免费视频| 日韩一区二区三区四区| 久久精品视频免费| 国产精品不卡一区二区三区| 亚洲欧美日韩国产综合| 视频在线观看国产精品| 国产一区欧美二区| av成人免费在线观看| 欧美在线观看18| 精品美女一区二区三区| 国产精品美女久久久久久2018| 亚洲自拍偷拍综合| 精品在线观看视频| 色综合色综合色综合 | 欧美日韩一区二区在线视频| 在线不卡欧美精品一区二区三区| 欧美成人综合网站| 中文字幕一区在线观看| 日韩专区一卡二卡| 成人国产精品免费观看视频| 欧美日韩和欧美的一区二区| 久久噜噜亚洲综合| 一区二区在线观看av| 久久精品国产亚洲高清剧情介绍| 成人国产精品免费观看视频| 3atv在线一区二区三区| 日本一区二区三区久久久久久久久不 | 日本一区二区三区在线不卡| 亚洲一区国产视频| 国产久卡久卡久卡久卡视频精品| 色综合视频一区二区三区高清| 91精品国产欧美一区二区18| 欧美高清在线一区| 日韩高清在线电影| jlzzjlzz亚洲女人18| 日韩视频在线一区二区| 最近中文字幕一区二区三区| 蜜桃视频在线一区| 色综合天天综合网天天狠天天| 精品国内片67194| 亚洲一二三四区| 成人爱爱电影网址| 久久众筹精品私拍模特| 亚洲一区二区三区四区在线观看 | 国产成人av电影| 日韩一级在线观看| 亚洲免费在线视频一区 二区| 久久99久久久欧美国产| 欧美日韩免费高清一区色橹橹 | 日产国产高清一区二区三区| 91蝌蚪porny| 国产欧美精品国产国产专区| 美日韩一级片在线观看| 欧美三级日韩三级| 亚洲男人天堂av| 国产·精品毛片| 欧美成人a视频| 亚洲成av人片一区二区梦乃| 99久久免费视频.com| 国产调教视频一区| 国产美女久久久久| 日韩欧美一区二区在线视频| 亚洲成人av在线电影| 日本韩国一区二区| 亚洲男女一区二区三区| av电影在线观看不卡| 中文字幕国产一区| 国产 欧美在线| 日本一区二区三区电影| 国产成人免费9x9x人网站视频| 精品日韩99亚洲| 激情综合色播五月| 亚洲精品在线免费观看视频| 久久精品国产网站| 欧美精品一区二区精品网| 美女视频网站久久| 欧美精品一区二区三区久久久| 美女网站视频久久| 精品少妇一区二区三区在线视频| 蜜臀av一级做a爰片久久| 日韩欧美久久久| 国产麻豆视频精品| 国产午夜久久久久| 成人爱爱电影网址| 亚洲日本成人在线观看| 91极品美女在线| 亚洲国产视频直播| 91精品国产免费久久综合| 美腿丝袜一区二区三区| 2020国产精品自拍| 高清不卡一区二区在线| 亚洲色图视频网| 在线国产亚洲欧美| 日韩有码一区二区三区| 亚洲精品一区二区三区香蕉| 国产成人午夜99999| 国产三级久久久| 色琪琪一区二区三区亚洲区| 亚洲综合色网站| 日韩精品一区二区三区在线播放| 麻豆精品一区二区av白丝在线| 久久免费偷拍视频| 91一区在线观看| 无码av中文一区二区三区桃花岛| 欧美成人a在线| 不卡的电视剧免费网站有什么| 有码一区二区三区| 91精品国产欧美一区二区成人| 国产一二三精品| 一区二区三区国产豹纹内裤在线| 欧美高清视频一二三区 | 日韩免费福利电影在线观看| 国产mv日韩mv欧美| 亚洲一区二区视频在线观看| 日韩欧美中文字幕一区| 成人免费高清在线| 亚洲成人av免费| 久久精品一区蜜桃臀影院| 色一区在线观看| 久久精品国产成人一区二区三区| 欧美激情综合五月色丁香小说| 在线中文字幕一区二区| 黄色小说综合网站| 亚洲一区在线观看免费| 2019国产精品| 欧美日韩成人在线| 大白屁股一区二区视频| 日本sm残虐另类| 亚洲欧美国产高清| 精品成人佐山爱一区二区| 色一情一伦一子一伦一区| 极品尤物av久久免费看| 一级精品视频在线观看宜春院 | 毛片av一区二区| 1000精品久久久久久久久| 日韩欧美国产一区二区三区| 色八戒一区二区三区| 国产精一品亚洲二区在线视频| 亚洲一区二区三区小说| 国产精品国产自产拍在线| 亚洲精品在线网站| 91麻豆精品国产91久久久| 色哟哟亚洲精品| 99视频在线精品| 国产一区二区三区四区五区美女 |