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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lift.vhd.bak

?? 不同于網上的四層電梯
?? BAK
字號:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity lift is
 port(	buttonclk:in std_logic;
		liftclk:in std_logic;
		--clk:in std_logic;
		reset:in std_logic;
		f1upbutton:in std_logic;
		f2upbutton:in std_logic;
		f2dnbutton:in std_logic;
		f3upbutton:in std_logic;
		f3dnbutton:in std_logic;
		f4upbutton:in std_logic;
		f4dnbutton:in std_logic;
		f5upbutton:in std_logic;
		f5dnbutton:in std_logic;
		f6dnbutton:in std_logic;
		fuplight:buffer std_logic_vector(5 downto 1);
		fdnlight:buffer std_logic_vector(6 downto 2);
		stop1button,stop2button,stop3button:in std_logic;
		stop4button,stop5button,stop6button:in std_logic;
		stoplight:buffer std_logic_vector(6 downto 1);
		position:buffer integer range 1 to 6;
		lightout:out std_logic_vector(6 downto 0);
		doorlight:out std_logic;
		udsig:buffer std_logic);
end lift;

architecture behave of lift is
	type lift_state is
		(stopon1,dooropen,doorclose,doorwait1,doorwait2,doorwait3,doorwait4,
		up,down,stop);
	signal mylift:lift_state;
	signal clearup:std_logic;
	signal cleardn:std_logic;
	signal buttonclk:std_logic;
	component display
		PORT(clk: IN STD_LOGIC;--時鐘信號
			light: in integer range 1 to 6;--電梯的位置
			segout: OUT STD_LOGIC_VECTOR(6 downto 0));--數碼管顯示
	end component;
	--component fenpin
	--	PORT(clk: IN STD_LOGIC;
	--		clk1m,clk10,clk1: OUT STD_LOGIC);
	--end component;
begin

u2:display port map(buttonclk,position,lightout);
ctrlift:process(reset,liftclk)
		variable pos:integer range 6 downto 1;
begin 
if reset = '1' then
	mylift <= stopon1;
	clearup <= '0';
	cleardn <= '0';
else
	if liftclk'event and liftclk = '1' then
		case mylift is
			when stopon1 =>
				 doorlight <= '1';
				 position <= 1;
				 pos:=1;
				 mylift <= doorwait1;

			when doorwait1 =>
				mylift <= doorwait2;

			when doorwait2 =>
				 clearup <= '0';
				 cleardn <= '0';
				 mylift <= doorwait3;

			when doorwait3 =>
				mylift <= doorwait4;

			when doorwait4 =>
				mylift <= doorclose;

			when doorclose =>
				doorlight <= '0';
				if udsig = '0' then
					if position = 6 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							  udsig <= '1';
							  mylift <= doorclose;
						else 
							udsig <= '1';  mylift <= down;
						end if;
					elsif position = 5 then
						if stoplight = "0000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '0';
							 mylift <= doorclose;
						elsif stoplight(6) = '1' or (stoplight(6) = '0' and fdnlight(6) = '1') then
							 udsig <= '0';
							 mylift <= up;
						else udsig <= '1'; mylift <= down;
						end if;
					elsif position = 4 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '0';
							 mylift <= doorclose;
						elsif stoplight(6) = '1' or (stoplight(6) = '0' and fdnlight(6) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(5) = '1' or (stoplight(5) = '0' and fdnlight(5) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(5) = '1' or (stoplight(5) = '0' and fuplight(5) = '1') then
							 udsig <= '0';
							 mylift <= up;
						else udsig <= '1'; mylift <= down;
						end if;
					elsif position = 3 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '0';
							 mylift <= doorclose;
						elsif stoplight(6) = '1' or (stoplight(6) = '0' and fdnlight(6) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(5) = '1' or (stoplight(5) = '0' and fdnlight(5) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(5) = '1' or (stoplight(5) = '0' and fuplight(5) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(4) = '1' or (stoplight(4) = '0' and fdnlight(4) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(4) = '1' or (stoplight(4) = '0' and fuplight(4) = '1') then
							 udsig <= '0';
							 mylift <= up;
						else 
							udsig <= '1'; 
							mylift <= down;
						end if;
					elsif position = 2 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '0';
							 mylift <= doorclose;
						elsif stoplight(6) = '1' or (stoplight(6) = '0' and fdnlight(6) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(5) = '1' or (stoplight(5) = '0' and fdnlight(5) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(5) = '1' or (stoplight(5) = '0' and fuplight(5) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(4) = '1' or (stoplight(4) = '0' and fdnlight(4) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(4) = '1' or (stoplight(4) = '0' and fuplight(4) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(3) = '1' or (stoplight(3) = '0' and fdnlight(3) = '1') then
							 udsig <= '0';
							 mylift <= up;
						elsif stoplight(3) = '1' or (stoplight(3) = '0' and fuplight(3) = '1') then
							 udsig <= '0';
							 mylift <= up;
						else 
							udsig <= '1'; 
							mylift <= down;
						end if;
					elsif position = 1 then
					   if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							udsig <= '0';
							mylift <= doorclose;
						else 
							udsig <= '0'; 
							mylift <= up;
						end if;
					end if;
				elsif udsig = '1' then
					if position = 1 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							udsig <= '0';
							mylift <= doorclose;
						else 
							udsig <= '0'; mylift <= up;
						end if;
					elsif position = 2 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '1';
							 mylift <= doorclose;
						elsif stoplight(1) = '1' or (stoplight(1) = '0' and fuplight(1) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						else
							udsig <= '0'; mylift <= up;
						end if;
					elsif position = 3 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '1';
							 mylift <= doorclose;
						elsif stoplight(2) = '1' or (stoplight(2) = '0' and fdnlight(2) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(2) = '1' or (stoplight(2) = '0' and fuplight(2) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(1) = '1' or (stoplight(1) = '0' and fuplight(1) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						else
							udsig <= '0'; mylift <= up;
						end if;
					elsif position = 4 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '1';
							 mylift <= doorclose;
						elsif stoplight(3) = '1' or (stoplight(3) = '0' and fdnlight(3) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(3) = '1' or (stoplight(3) = '0' and fuplight(3) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(2) = '1' or (stoplight(2) = '0' and fdnlight(2) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(2) = '1' or (stoplight(2) = '0' and fuplight(2) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(1) = '1' or (stoplight(1) = '0' and fuplight(1) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						else
							udsig <= '0'; mylift <= up;
						end if;
					elsif position = 5 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '1';
							 mylift <= doorclose;
						elsif stoplight(4) = '1' or (stoplight(4) = '0' and fdnlight(4) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(4) = '1' or (stoplight(4) = '0' and fuplight(4) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(3) = '1' or (stoplight(3) = '0' and fdnlight(3) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(3) = '1' or (stoplight(3) = '0' and fuplight(3) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(2) = '1' or (stoplight(2) = '0' and fdnlight(2) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(2) = '1' or (stoplight(2) = '0' and fuplight(2) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						elsif stoplight(1) = '1' or (stoplight(1) = '0' and fuplight(1) = '1' ) then
							 udsig <= '1';
							 mylift <= down;
						else
							udsig <= '0'; mylift <= up;
						end if;
					elsif position = 6 then
						if stoplight = "000000" and fuplight = "00000" and fdnlight = "00000" then
							 udsig <= '1';
							 mylift <= doorclose;
						else 
							udsig <= '1';
							mylift <= down;
						end if;
					end if;
				end if;
			when up =>
				position <= position + 1;
				pos:=pos + 1;
				if pos < 6 and (stoplight(pos) = '1'or fuplight(pos) = '1')then 
					mylift <= stop;
				elsif pos = 6 and (stoplight(pos) = '1' or fdnlight(pos) = '1') then 
					mylift <= stop;
				else 
					mylift <= doorclose;
				end if;
			when down =>
				position <= position - 1;
				pos:=pos - 1;
				if pos > 1 and (stoplight(pos) = '1' or fdnlight(pos) = '1')then 
					mylift <= stop;
				elsif pos = 1 and (stoplight(pos) = '1' or fuplight(pos) = '1')then 
					mylift <= stop;
				else
					mylift <= doorclose;
				end if;
			when stop =>
				mylift <= dooropen;
			when dooropen =>
				doorlight <= '1';
				if udsig = '0' then
					if position<=5 and(stoplight(position) = '1'or fuplight(position)='1')then
						clearup <= '1';
					else 
						clearup <= '1';cleardn <= '1';
					end if;
				elsif udsig = '1' then
					if position>=2 and(stoplight(position) = '1' or fdnlight(position)='1')then
						cleardn <= '1';
					else 
						clearup <= '1';cleardn <= '1';
					end if;
				end if;
				mylift <= doorwait1;
		end case;
	end if;
end if;
end process ctrlift;

ctrlight:process(reset,buttonclk)
begin
	if reset = '1' then
		stoplight<="000000";fuplight<="00000";fdnlight<="00000";
	else
		if buttonclk'event and buttonclk='1' then
			if clearup='1' then
				stoplight(position)<='0';
				fuplight(position)<='0';
			else
				if f1upbutton='1' then
					fuplight(1)<='1';
				elsif f2upbutton='1' then 
					fuplight(2)<='1';
				elsif f3upbutton='1' then 
					fuplight(3)<='1';
				elsif f4upbutton='1' then 
					fuplight(4)<='1';
				elsif f5upbutton='1' then 
					fuplight(5)<='1';
				end if;
			end if;
			if cleardn = '1' then
				stoplight(position)<='0';
				fdnlight(position)<='0';
			else
				if f2dnbutton='1' then
					fdnlight(2)<='1';
				elsif  f3dnbutton='1' then 
					fdnlight(3)<='1';
				elsif  f4dnbutton='1' then 
					fdnlight(4)<='1';
				elsif  f5dnbutton='1' then 
					fdnlight(5)<='1';
				elsif  f6dnbutton='1' then 
					fdnlight(6)<='1';
				end if;
			end if;
			if stop1button = '1' then 
				stoplight(1) <= '1';
			elsif stop2button = '1' then 
				stoplight(2) <= '1';
			elsif stop3button = '1' then 
				stoplight(3) <= '1';
			elsif stop4button = '1' then 
				stoplight(4) <= '1';
			elsif stop5button = '1' then 
				stoplight(5) <= '1';
			elsif stop6button = '1' then 
				stoplight(6) <= '1';
			end if;
		end if;
	end if;
end process ctrlight;
end;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费视频中文字幕| 欧美亚洲日本一区| 美女视频一区二区| 日韩av中文在线观看| 日韩国产一二三区| 性做久久久久久免费观看欧美| 亚洲人成人一区二区在线观看| 亚洲欧美电影院| 亚洲免费高清视频在线| 亚洲欧洲韩国日本视频| 欧美激情综合五月色丁香| 久久精品人人做人人爽97| 日本一区二区三区四区在线视频| 中文字幕av资源一区| 日韩一区中文字幕| 亚洲一区二区四区蜜桃| 日韩精品成人一区二区三区| 精品一区二区综合| zzijzzij亚洲日本少妇熟睡| 97久久精品人人爽人人爽蜜臀| 91色视频在线| 欧美精品黑人性xxxx| 久久综合久色欧美综合狠狠| 亚洲图片激情小说| 亚洲一区二区欧美| 国产自产v一区二区三区c| 国产成人丝袜美腿| 91视频一区二区三区| 欧美午夜影院一区| 久久网这里都是精品| 国产精品美女视频| 日韩成人精品在线| 成人短视频下载| 精品视频一区三区九区| 精品久久久久久久人人人人传媒 | 在线观看中文字幕不卡| 欧美精品乱人伦久久久久久| 久久网站最新地址| 亚洲六月丁香色婷婷综合久久| 日本三级亚洲精品| 成人精品一区二区三区四区| 欧美日韩中文字幕一区| 国产欧美精品区一区二区三区 | 亚洲午夜在线视频| 国产精品自拍一区| 欧美日韩色综合| 中文欧美字幕免费| 久久精品国产精品亚洲综合| 色综合久久99| 久久久高清一区二区三区| 亚洲综合久久av| 成人app网站| 精品国产91乱码一区二区三区 | 2021久久国产精品不只是精品| 综合自拍亚洲综合图不卡区| 国产在线精品一区在线观看麻豆| 欧美综合在线视频| 综合久久一区二区三区| 成人在线综合网站| 欧美日韩国产一级片| 91久久奴性调教| www.欧美.com| 欧美精品一区二区三区蜜桃视频 | 天天综合色天天综合色h| 丰满放荡岳乱妇91ww| 日韩一二三区视频| 亚洲va欧美va人人爽午夜| 成人a区在线观看| 国产亚洲精品7777| 韩国av一区二区三区| 欧美tickle裸体挠脚心vk| 日韩高清欧美激情| 欧美日韩国产高清一区二区| 亚洲精品国产精品乱码不99| 懂色一区二区三区免费观看| 久久日韩粉嫩一区二区三区| 久久66热偷产精品| 精品伦理精品一区| 激情小说欧美图片| www激情久久| 国产成人午夜片在线观看高清观看| 欧美zozozo| 久草在线在线精品观看| 久久无码av三级| 精品系列免费在线观看| 69堂国产成人免费视频| 午夜影视日本亚洲欧洲精品| 色婷婷亚洲综合| 午夜私人影院久久久久| 欧美精品黑人性xxxx| 免费不卡在线视频| 精品久久一区二区| 欧美激情在线一区二区三区| 国产精品美女久久久久久久久 | 日韩一区二区视频| 毛片av一区二区| 久久精品夜夜夜夜久久| 精品一区二区三区在线播放| 欧美一级黄色录像| 国产精品99久久久| 国产欧美日韩三级| 色吧成人激情小说| 亚洲视频 欧洲视频| 一本一道综合狠狠老| 夜夜揉揉日日人人青青一国产精品 | 蜜臀久久99精品久久久画质超高清 | 91官网在线观看| 日韩电影免费在线| 国产精品视频在线看| 欧美日韩国产精选| 国产成人亚洲精品狼色在线| 亚洲精品高清视频在线观看| 日韩一区二区高清| 在线免费观看一区| 精品一二三四在线| 亚洲福利国产精品| 久久久久国产精品麻豆ai换脸| 91视频www| 国产麻豆日韩欧美久久| 一区二区欧美精品| 久久久久久久国产精品影院| 国产成人在线观看免费网站| 亚洲欧美成aⅴ人在线观看| 91.xcao| 成人av网在线| 激情五月激情综合网| 亚洲图片自拍偷拍| 成人免费一区二区三区视频| 欧美精品一级二级三级| 91在线小视频| 高清久久久久久| 久久99国产精品久久| 偷拍亚洲欧洲综合| 亚洲午夜激情av| 国产精品剧情在线亚洲| www国产亚洲精品久久麻豆| 欧美日韩的一区二区| 91免费视频网| 99精品偷自拍| 91污在线观看| av不卡免费电影| 国产iv一区二区三区| 国产在线国偷精品免费看| 久久精品国产澳门| 偷偷要91色婷婷| 日韩国产精品久久| 亚洲国产一区二区a毛片| 一区二区三区中文在线观看| 国产精品丝袜久久久久久app| 精品日韩欧美在线| 精品少妇一区二区三区视频免付费 | 国精产品一区一区三区mba视频 | 国产精品美女久久久久aⅴ国产馆| 91偷拍与自偷拍精品| 成人精品gif动图一区| 亚洲欧美日韩小说| 欧美一区二区三区免费视频| 国产精品一区免费在线观看| 国产精品一区二区黑丝| 国产高清视频一区| 色94色欧美sute亚洲13| 欧美日韩一区三区| 久久综合九色综合欧美亚洲| 国产喂奶挤奶一区二区三区| 国产欧美一区二区精品婷婷| 国产欧美一区二区精品久导航 | 亚洲美女淫视频| 91色porny在线视频| 波多野结衣一区二区三区| 美女精品一区二区| 不卡的av中国片| 日韩欧美一区在线| 一区二区不卡在线播放 | 视频精品一区二区| 午夜精品视频在线观看| 日韩1区2区日韩1区2区| 日本sm残虐另类| 另类人妖一区二区av| 精品在线观看视频| 国产电影精品久久禁18| 国内精品国产成人国产三级粉色| 日本少妇一区二区| 国产麻豆成人精品| caoporen国产精品视频| 欧美色综合网站| 97久久精品人人澡人人爽| 国产婷婷色一区二区三区在线| 亚洲另类色综合网站| 国产aⅴ综合色| 日韩美女一区二区三区四区| 精品国产髙清在线看国产毛片| 日韩精品一区二区三区四区视频| 91精品国产一区二区三区| 亚洲精品在线观| 中文字幕在线不卡一区| 日韩一区欧美二区| 91在线你懂得| 国产精品久久久久精k8| 成人av片在线观看| 中文字幕字幕中文在线中不卡视频|