【正文】
to 0); led_c_d:out std_logic_vector(2 downto 0); led_d : out std_logic_vector(2 downto 0); wahaha : out std_logic; ud,alarm : out std_logic; up,down : out std_logic ); end dianti; architecture behav of dianti is signal d11,d22,d33:std_logic; signal c_u11,c_u22:std_logic; 畢業(yè)設(shè)計 23 signal c_d22,c_d33:std_logic; signal q:integer range 0 to 1; signal q1:integer range 0 to 6; signal q2:integer range 0 to 9; signal dd,cc_u,cc_d,dd_cc:std_logic_vector(2 downto 0); signal opendoor:std_logic; signal updown:std_logic; signal en_up,en_dw:std_logic; begin :process(clk) begin if clk39。event and clk=39。139。 then if clr=39。139。 then q1=0; q2=0; wahaha=39。039。; elsif full=39。139。 then alarm=39。139。; q1=0; if q1=3 then door=10; else door=00; end if; elsif q=1 then q=0; alarm=39。039。; if q2=3 then wahaha=39。139。; else if opendoor=39。139。 then door=10; q1=0; q2=0; up=39。039。; down=39。039。; elsif en_up=39。139。 then if deng=39。139。 then door=10; q1=0; q2=q2+1; elsif quick=39。139。 then q1=3; elsif q1=6 then door=00; updown=39。139。; up=39。139。; elsif q1=3 then door=01; q1=q1+1; else q1=q1+1; door=00; end if; elsif en_dw=39。139。 then if deng=39。139。 then door=10; q1=0; q2=q2+1; elsif quick=39。139。 then q1=3; elsif q1=6 then door=00; updown=39。039。; down=39。139。; elsif q1=3 then door=01; q1=q1+1; else q1=q1+1; door=00; 畢業(yè)設(shè)計 24 end if; end if; if g1=39。139。 then led=1001111; if d11=39。139。 or c_u11=39。139。 then d11=39。039。 ; c_u11=39。039。 ;opendoor=39。139。; elsif dd_cc000001 then en_up=39。139。; opendoor=39。039。; elsif dd_cc=000000 then opendoor=39。039。; end if; elsif g2=39。139。 then led=0010010; if updown=39。139。 then if d22=39。139。 or c_u22=39。139。 then d22=39。039。 ; c_u22=39。039。 ; opendoor=39。139。; elsif dd_cc000011 then en_up=39。139。; opendoor=39。039。; elsif dd_cc000010 then en_dw=39。139。; opendoor=39。039。; end if; elsif d22=39。139。 or c_d22=39。139。 then d22=39。039。 ; c_d22=39。039。 ;opendoor=39。139。; elsif dd_cc000010 then en_dw=39。139。; opendoor=39。039。; elsif dd_cc000011 then en_up=39。139。; opendoor=39。039。; end if; elsif g3=39。139。 then led=0000110; if d33=39。139。 or c_d33=39。139。 then d33=39。039。 ; c_d33=39。039。 ;opendoor=39。139。; elsif dd_cc011 then en_dw=39。139。; opendoor=39。039。; end if; else en_up=39。039。; en_dw=39。039。; end if; end if; else q=1; alarm=39。039。; if d1=39。139。 then d11=d1; elsif d2=39。139。 then d22=d2; elsif d3=39。139。 then d33=d3; end if; if c_u1=39。139。 then c_u11=c_u1; 畢業(yè)設(shè)計 25 elsif c_u2=39。139。 then c_u22=c_u2; end if; if c_d2=39。139。 then c_d22=c_d2; elsif c_d3=39。139。 then c_d33=c_d3; end if; dd=d33amp。d22amp。d11; cc_u=39。039。amp。c_u22amp。c_u11; cc_d=c_d33amp。c_d22amp。39。039。; dd_cc=dd or cc_u or cc_d; end if; ud=updown; led_d=dd; led_c_u=cc_u; led_c_d=cc_d; end if; end process; end behav; 畢業(yè)設(shè)計 26 附錄二 引腳鎖定情況 畢業(yè)設(shè)計 27 參考文獻(xiàn) [1]王志鵬、付麗琴 .可編程邏輯器件 — 開發(fā)技術(shù) MAX+社 .2022 [2]王俊峰、薛鴻德 .理工科學(xué)生怎樣搞畢業(yè)設(shè)計 .電子工業(yè)出版社 .2022 [3]甘 歷 .VHDL應(yīng)用與開發(fā)實際 .科學(xué)出版社 .2022 [4]李惠升 .電梯控制技術(shù) .機械工業(yè)出版社 .2022 [5]張婭莉、曲國峰 .單片機在電梯自動控制中的應(yīng)用 .工業(yè)控制計算機 .2022 [6]楊曉慧 .電子技術(shù) EDA實踐教程 .國防工業(yè)出版社 .2022 [7]康華光 .電子技術(shù)基礎(chǔ)(數(shù)字部分) .高等教育出版社 .2022 [8]潘 松、黃繼業(yè) . EDA技術(shù)實用教程 .科學(xué)出版社 .2022