![本科生科技論文基于VHDL語(yǔ)言的八路數(shù)字搶答器設(shè)計(jì)_第1頁(yè)](http://file2.renrendoc.com/fileroot_temp3/2021-7/6/f88784b5-d697-424c-92fa-ecbd044d080c/f88784b5-d697-424c-92fa-ecbd044d080c1.gif)
![本科生科技論文基于VHDL語(yǔ)言的八路數(shù)字搶答器設(shè)計(jì)_第2頁(yè)](http://file2.renrendoc.com/fileroot_temp3/2021-7/6/f88784b5-d697-424c-92fa-ecbd044d080c/f88784b5-d697-424c-92fa-ecbd044d080c2.gif)
![本科生科技論文基于VHDL語(yǔ)言的八路數(shù)字搶答器設(shè)計(jì)_第3頁(yè)](http://file2.renrendoc.com/fileroot_temp3/2021-7/6/f88784b5-d697-424c-92fa-ecbd044d080c/f88784b5-d697-424c-92fa-ecbd044d080c3.gif)
![本科生科技論文基于VHDL語(yǔ)言的八路數(shù)字搶答器設(shè)計(jì)_第4頁(yè)](http://file2.renrendoc.com/fileroot_temp3/2021-7/6/f88784b5-d697-424c-92fa-ecbd044d080c/f88784b5-d697-424c-92fa-ecbd044d080c4.gif)
![本科生科技論文基于VHDL語(yǔ)言的八路數(shù)字搶答器設(shè)計(jì)_第5頁(yè)](http://file2.renrendoc.com/fileroot_temp3/2021-7/6/f88784b5-d697-424c-92fa-ecbd044d080c/f88784b5-d697-424c-92fa-ecbd044d080c5.gif)
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、石家莊經(jīng)濟(jì)學(xué)院本科生科技論文題目:基于vhdl語(yǔ)言的八路數(shù)字搶答器設(shè)計(jì)【作者簡(jiǎn)介】班級(jí): 班號(hào): 姓名: 學(xué)號(hào): 摘 要搶答器作為一種電子產(chǎn)品,早已廣泛應(yīng)用于各種智力和知識(shí)競(jìng)賽場(chǎng)合,是競(jìng)賽問(wèn)答中一種常用的必備裝置;從原理上講,它是一種典型的數(shù)字電路,其中包括了組合邏輯電路和時(shí)序邏輯電路電路結(jié)構(gòu)形式多種多樣,可以利用簡(jiǎn)單的與非門(mén)構(gòu)成,也可以利用觸發(fā)器構(gòu)成,也可以利用單片機(jī)來(lái)完成利用單片機(jī)來(lái)設(shè)計(jì)搶答器,使得結(jié)果更簡(jiǎn)單,功能更優(yōu)越。本設(shè)計(jì)是基于單片機(jī)控制的六路搶答器,利用單片機(jī)的定時(shí)器/計(jì)數(shù)器定時(shí)和記數(shù)的原理,將軟、硬件有機(jī)地結(jié)合起來(lái),使得系統(tǒng)能夠正確地進(jìn)行計(jì)時(shí),同時(shí)使數(shù)碼管能夠正確地顯示時(shí)間。用開(kāi)
2、關(guān)做鍵盤(pán)輸出,揚(yáng)聲器發(fā)生提示。同時(shí)系統(tǒng)能夠?qū)崿F(xiàn):在搶答中,只有開(kāi)始后搶答才有效,如果在開(kāi)始搶答前搶答為無(wú)效;搶答限定時(shí)間和回答問(wèn)題的時(shí)間可在1-99s設(shè)定;可以顯示是哪位選手有效搶答和無(wú)效搶答,正確按鍵后有音樂(lè)提示;搶答時(shí)間和回答問(wèn)題時(shí)間倒記時(shí)顯示,滿時(shí)后系統(tǒng)計(jì)時(shí)自動(dòng)復(fù)位及主控強(qiáng)制復(fù)位;按鍵鎖定,在有效狀態(tài)下,按鍵無(wú)效非法。關(guān)鍵詞搶答器;eda;vhdl語(yǔ)言abstractanswer devices as an electronic products, has long been widely used in a variety of occasions, intelligence and
3、knowledge competitions, quiz contests are essential in a commonly used device; from the principle, it is a typical digital circuit, including a combination of logic circuits and sequential logic circuit. circuit structure of a variety of forms, can make use of simple and non-gate structure can also
4、be used to trigger composition, can also be used to complete single-chip microcomputer. answer the use of single-chip design, and makes the results more simple function better. the design is based on the six-way scm answer, and the use of single-chip timer / counter timing and number of the principl
5、es in mind, the hardware and software combine to make the system time correctly, while the digital control able to correctly display the time. switch the keyboard to do with output, speaker prompted occurred. at the same time, the system can be realized: in the answer, only after the answer to be va
6、lid, if at the beginning of pre-answer answer invalid; answer to answer the question of limited time and the time can be set in 1-99s; can show whos effective and answer answer invalid, the correct button prompt after the music; answer question time and time倒記時(shí)show full time after the system automat
7、ically reset and master reset mandatory; keys locked in the effective state, the key is invalid illegal.key words answer devices;eda;vhdl language1、 設(shè)計(jì)原理與技術(shù)方法:(1) 整體簡(jiǎn)介 max+plusii(或?qū)懗蒻axplus2,或mp2) 是altera公司推出的的第三代pld開(kāi)發(fā)系統(tǒng)(altera第四代pld開(kāi)發(fā)系統(tǒng)被稱為:quartusii,主要用于設(shè)計(jì)新器件和大規(guī)模cpld/fpga).使用max+plusii的設(shè)計(jì)者不需精通器件內(nèi)部的
8、復(fù)雜結(jié)構(gòu)。設(shè)計(jì)者可以用自己熟悉的設(shè)計(jì)工具(如原理圖輸入或硬件描述語(yǔ)言)建立設(shè)計(jì),max+plusii把這些設(shè)計(jì)轉(zhuǎn)自動(dòng)換成最終所需的格式。其設(shè)計(jì)速度非???。對(duì)于一般幾千門(mén)的電路設(shè)計(jì),使用max+plusii,從設(shè)計(jì)輸入到器件編程完畢,用戶拿到設(shè)計(jì)好的邏輯電路,大約只需幾小時(shí)。設(shè)計(jì)處理一般在數(shù)分鐘內(nèi)內(nèi)完成。特別是在原理圖輸入等方面,maxplus2被公認(rèn)為是最易使用,人機(jī)界面最友善的pld開(kāi)發(fā)軟件,特別適合初學(xué)者使用。使用maxplus2基本上也是有以下幾個(gè)步驟:1.設(shè)計(jì)輸入 2.設(shè)計(jì)編譯 3.設(shè)計(jì)仿真 4.下載 搶答器的邏輯結(jié)構(gòu)主要由搶答鑒別lock模塊、定時(shí)模塊、譯碼模塊和報(bào)警器模塊組成。在整
9、個(gè)搶答器中最關(guān)鍵的是如何實(shí)現(xiàn)搶答封鎖,在控制鍵按下的同時(shí)計(jì)數(shù)器倒計(jì)時(shí)顯示有效剩余時(shí)間。除此之外,整個(gè)搶答器還需有一個(gè)“復(fù)位開(kāi)始”信號(hào),以便搶答器能實(shí)現(xiàn)清零和開(kāi)始。搶答器共有3個(gè)輸出顯示,選手代號(hào)、計(jì)數(shù)器的個(gè)位和十位,他們輸出全都為bcd碼輸出,這樣便于和顯示譯碼器連接。當(dāng)主持人按下控制鍵、選手按下?lián)尨疰I蜂鳴器短暫響起。整體原理框圖如圖1所示。圖1整體原理框圖 搶答器同時(shí)供8名選手或8個(gè)代表隊(duì)比賽,分別用8個(gè)按鈕a1a8。設(shè)置一個(gè)系統(tǒng)清除和搶答控制開(kāi)關(guān)reset, 該開(kāi)關(guān)由主持人控制。搶答器具有鎖存與顯示功能。即選手按動(dòng)按鈕,鎖存相應(yīng)的編號(hào),揚(yáng)聲器發(fā)出聲響提示,數(shù)碼顯示選手號(hào)碼。其他人再按鍵,系
10、統(tǒng)進(jìn)行了優(yōu)先鎖存,不再響應(yīng),優(yōu)先搶答選手的編號(hào)一直保持到主持人將系統(tǒng)清除為止,下一次搶答開(kāi)始。擴(kuò)展功能:該電路具有犯規(guī)報(bào)警功能。當(dāng)主持人未按下開(kāi)關(guān)開(kāi)始搶答前,參賽選手若按下開(kāi)關(guān),則搶答系統(tǒng)發(fā)出蜂鳴聲報(bào)警并顯示犯規(guī)組別。(二)搶答器工作流程 搶答器的基本工作原理:在搶答競(jìng)賽或呼叫時(shí),有多個(gè)信號(hào)同時(shí)或不同時(shí)送入主電路中,搶答器內(nèi)部的寄存器工作,并識(shí)別、記錄第一個(gè)號(hào)碼,同時(shí)內(nèi)部的定時(shí)器開(kāi)始工作,記錄有關(guān)時(shí)間并產(chǎn)生超時(shí)信號(hào)。在整個(gè)搶答器工作過(guò)程中,顯示電路、語(yǔ)音電路等還要根據(jù)現(xiàn)場(chǎng)的實(shí)際情況向外電路輸出相應(yīng)信號(hào)。搶答器的工作流程分為、系統(tǒng)復(fù)位、正常流程、犯規(guī)流程等幾部分,如圖2所示。加載程序運(yùn)行行開(kāi)始開(kāi)
11、始數(shù)碼管顯示30開(kāi)始搶按時(shí)間倒計(jì)時(shí)開(kāi)始前有選手搶按顯示犯規(guī)選手號(hào)碼并伴有語(yǔ)音報(bào)警倒計(jì)時(shí)結(jié)束,超時(shí)有選手搶按顯示fff顯示選手號(hào)碼,倒計(jì)時(shí)時(shí)間,語(yǔ)音報(bào)警,答題,答題時(shí)間倒計(jì)時(shí)正常流程犯規(guī)流程若超過(guò)答題時(shí)間,則數(shù)碼管示00答題完根據(jù)選手表現(xiàn)由主持人加分圖2搶答器工作流程(三)搶答器各部分電路1、 搶答器鑒別模塊: 在這個(gè)模塊中主要實(shí)現(xiàn)搶答過(guò)程中的搶答功能,并且能實(shí)現(xiàn)當(dāng)有一路搶答按鍵按下時(shí),該路搶答信號(hào)將其余個(gè)綠搶答封鎖的功能。在這個(gè)模塊輸入端有warn輸入(以時(shí)間控制系統(tǒng)的warn輸出信號(hào)為信號(hào)源)、一個(gè)和“時(shí)間控制系統(tǒng)”公用的clear端、6人搶答輸入信號(hào)端s0,s1,s2,s3,s4,s5和有
12、一個(gè)時(shí)鐘信號(hào)端clk,這個(gè)時(shí)鐘信號(hào)是個(gè)高頻信號(hào),用以掃描s0,s1,s2,s3是否有信號(hào)輸入。輸出端有對(duì)應(yīng)于s0,s1,s2,s3,s4,s5編號(hào)的6個(gè)指示燈led 和4線2進(jìn)制輸出端states(用于鎖存當(dāng)前的狀態(tài)),還有一個(gè)stop 端用于指示s0,s1,s2,s3,s4,s5按鈕狀態(tài)(控制計(jì)時(shí)器停止)。在此模塊中高頻時(shí)鐘信號(hào)一直作用,此時(shí),若主持人按下clear即為開(kāi)始搶答信號(hào),所有輸出端都自動(dòng)清零。在有效時(shí)間范圍(n秒)內(nèi)只要有人搶答,stop就有高電平輸出至“時(shí)間控制系統(tǒng)”的stop端以控制倒計(jì)時(shí)的停止,并且對(duì)應(yīng)的led指示燈點(diǎn)亮,states鎖存輸出到譯碼顯示模塊,用以顯示優(yōu)先搶答
13、人的組號(hào),并鎖定輸入端s以阻止系統(tǒng)響應(yīng)其他搶答者的信號(hào)。當(dāng)有效時(shí)間到了之后還沒(méi)有人搶答,則記時(shí)模塊發(fā)出報(bào)警信號(hào),同時(shí)反饋回來(lái)給搶答鑒別模塊,禁止選手在搶答。2、譯碼模塊: 將搶答過(guò)程中鎖存的bcd碼轉(zhuǎn)換成7段碼用于led的顯示。3、定時(shí)器模塊: 這個(gè)模塊的輸入端有時(shí)鐘信號(hào)clk1、系統(tǒng)復(fù)位信號(hào)clear和一個(gè)stop輸入信號(hào);輸出端有秒時(shí)間狀態(tài)顯示信號(hào)高位high和低位low,無(wú)人搶答時(shí)計(jì)時(shí)中止警報(bào)信號(hào)warn。 這個(gè)模塊中主要實(shí)現(xiàn)搶答過(guò)程中的計(jì)時(shí)功能,在搶答開(kāi)始后進(jìn)行n秒的倒計(jì)時(shí),并且在n秒倒計(jì)時(shí)后無(wú)人搶答的情況下顯示超時(shí)并輸出信號(hào)至warn報(bào)警,或者只要n秒內(nèi)有人搶答,由搶答鑒別模塊輸出的
14、stop信號(hào)控制停止計(jì)時(shí),并顯示優(yōu)先搶答者的搶答時(shí)刻,輸出一個(gè)信號(hào)經(jīng)warn傳至“搶答鑒別系統(tǒng)”,鎖存不再讓選手搶答。4、報(bào)警模塊:在這個(gè)模塊中主要實(shí)現(xiàn)搶答過(guò)程中的報(bào)警功能,當(dāng)主持人按下控制鍵,有限時(shí)間內(nèi)(n秒內(nèi))有人搶答或是倒計(jì)時(shí)到了之后蜂鳴器開(kāi)始報(bào)警,輸出sound有效電平為高。若有選手提前搶答或者延后搶答同時(shí)報(bào)警。5、 顯示模塊:由于試驗(yàn)箱的限制,附加了顯示電路的設(shè)計(jì)。6、 計(jì)分模塊: 設(shè)置一個(gè)計(jì)分電路,每組開(kāi)始設(shè)置100分,由主持人計(jì)分,答對(duì)一次加10分,答錯(cuò)一次減10分。(四)單元電路元件設(shè)計(jì)1、搶答器鑒別模塊vhdl程序及模塊:在這個(gè)模塊中主要實(shí)現(xiàn)搶答過(guò)程中的搶答功能,并且能實(shí)現(xiàn)當(dāng)
15、有一路搶答按鍵按下時(shí),該路搶答信號(hào)將其余個(gè)綠搶答封鎖的功能。在這個(gè)模塊輸入端有warn輸入(以時(shí)間控制系統(tǒng)的warn輸出信號(hào)為信號(hào)源)、一個(gè)和“時(shí)間控制系統(tǒng)”公用的clear端、6人搶答輸入信號(hào)端s0,s1,s2,s3,s4,s5和有一個(gè)時(shí)鐘信號(hào)端clk,這個(gè)時(shí)鐘信號(hào)是個(gè)高頻信號(hào),用以掃描s0,s1,s2,s3,s4,s5是否有信號(hào)輸入。輸出端有對(duì)應(yīng)于s0,s1,s2,s3,s4,s5編號(hào)的6個(gè)指示燈led 和4線2進(jìn)制輸出端states (用于鎖存當(dāng)前的狀態(tài)),還有一個(gè)stop 端用于指示s0,s1,s2,s3,s4,s5按鈕狀態(tài)(控制計(jì)時(shí)器停止)。生成模塊如圖3所示。 圖3 lock模塊圖
16、13library ieee;use ieee.std_logic_1164.all;entity lock is port( clk,clear:in std_logic; warn:in std_logic; s0,s1,s2,s3,s4,s5:in std_logic; states:out std_logic_vector(3 downto 0); stop:out std_logic; led:out std_logic_vector(5 downto 0);end lock;architecture one of lock issignal g:std_logic_vector(5
17、 downto 0);begin process(clear,clk,s0,s1,s2,s3,s4,s5) begin if clear=1 then g=000000;led=000000;stop=0; elsif clkevent and clk=1 then if warn=0 then if( s5=1)and not(g(0)=1 or g(1)=1 or g(2)=1or g(3)=1 or g(4)=1) then g(5)=1;led(5)=1; elsif( s4=1)and not(g(0)=1 or g(1)=1 or g(2)=1or g(3)=1 or g(5)=1
18、) then g(4)=1;led(4)=1;elsif( s3=1)and not(g(0)=1 or g(1)=1 or g(2)=1or g(4)=1 or g(5)=1) then g(3)=1;led(3)=1; elsif( s2=1)and not(g(0)=1 or g(1)=1 or g(3)=1or g(4)=1 or g(5)=1) then g(2)=1;led(2)=1; elsif( s1=1)and not(g(0)=1 or g(2)=1 or g(3)=1or g(4)=1 or g(5)=1) then g(1)=1;led(1)=1; elsif( s0=
19、1)and not(g(1)=1 or g(2)=1 or g(3)=1or g(4)=1 or g(5)=1) then g(0)=1;led(0)=1; end if; stopstatesstatesstatesstatesstatesstatesstatesqoutqoutqoutqoutqoutqoutqoutqoutqoutqoutqout=0000000; end case; end process;end architecture two;3.定時(shí)模塊vhdl程序及模塊:這個(gè)模塊的輸入端有時(shí)鐘信號(hào)clk、系統(tǒng)復(fù)位信號(hào)clear和一個(gè)stop輸入信號(hào);輸出端有秒時(shí)間狀態(tài)顯示信號(hào)高
20、位high和低位low,無(wú)人搶答時(shí)計(jì)時(shí)中止警報(bào)信號(hào)warn。這個(gè)模塊中主要實(shí)現(xiàn)搶答過(guò)程中的計(jì)時(shí)功能,在搶答開(kāi)始后進(jìn)行n秒的倒計(jì)時(shí),并且在n秒倒計(jì)時(shí)后無(wú)人搶答的情況下顯示超時(shí)并輸出信號(hào)至warn報(bào)警,或者只要n秒內(nèi)有人搶答,由搶答鑒別模塊輸出的stop信號(hào)控制停止計(jì)時(shí),并顯示優(yōu)先搶答者的搶答時(shí)刻,輸出一個(gè)信號(hào)經(jīng)warn傳至“搶答鑒別系統(tǒng)”,鎖存不再讓選手搶答。生成的模塊圖如圖5所示。 圖5 count 模塊圖library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity count is port(c
21、lk,clear,stop:in std_logic; warn:out std_logic; high,low:out std_logic_vector(3 downto 0);end count;architecture three of count issignal hs:std_logic_vector(3 downto 0);signal ls:std_logic_vector(3 downto 0);beginprocess(clk) begin if clear=1 then hs=1001;ls=1001;warn=0; elsif clkevent and clk=1 the
22、n ls=ls-1; if ls=0000 then ls=1001;hs=hs-1; if hs=0000 and ls=0000 then warn=1;hs=0000;ls=0000; if stop=1 then hs=hs; ls=ls; warn=1; end if; end if; end if; end if; high=hs;low=ls;end process;end architecture three; 4報(bào)警模塊vhdl:在這個(gè)模塊中主要實(shí)現(xiàn)搶答過(guò)程中的報(bào)警功能,當(dāng)主持人按下控制鍵,有限時(shí)間內(nèi)(n秒內(nèi))有人搶答或是倒計(jì)時(shí)到了之后蜂鳴器開(kāi)始報(bào)警,輸出sound有效電平為
23、高。生成的模塊圖如圖6所示。圖6 alarm 模塊圖library ieee;use ieee.std_logic_1164.all;entity alarm is port(clear,warn:in std_logic; sound:out std_logic);end ;architecture four of alarm isbegin process(warn,clear) begin if clear=1 then sound=0; elsif warn=1 then sound=1; else sound=0; end if;end process;end alarm;具有犯規(guī)設(shè)
24、置電路對(duì)提前搶答和超時(shí)搶答者,則報(bào)警并顯示組別。生成的模塊圖如圖7所示。圖7 foul 模塊圖library ieee;use ieee.std_logic_1164.all;entity foul is port( clear:in std_logic; s0,s1,s2,s3,s4,s5:in std_logic; lede:out std_logic_vector(5 downto 0); warns:out std_logic);end foul;architecture one of foul is begin process(clear,s0,s1,s2,s3,s4,s5)begi
25、nif clear=1then if s5=1 then lede(5)=1;warns=1; elsif s4=1then lede(4)=1;warns=1; elsif s3=1then lede(3)=1;warns=1; elsif s2=1 then lede(2)=1;warns=1; elsif s1=1 then lede(1)=1;warns=1; elsif s0=1 then lede(0)=1;warns=1; else lede=000000;warns=0;end if;end if;end process;end one; 5、 顯示模塊設(shè)計(jì): 由于試驗(yàn)箱的限制
26、,附加了動(dòng)態(tài)顯示模塊。模塊圖如圖8所示。 圖8 動(dòng)態(tài)顯示模塊圖library ieee;use ieee.std_logic_1164.all;entity mux18 isport(aa0,aa1,aa2:in std_logic_vector(3 downto 0); bb0,bb1,bb2:in std_logic_vector(3 downto 0); cc0,cc1,cc2:in std_logic_vector(3 downto 0); dd0,dd1,dd2:in std_logic_vector(3 downto 0); ee0,ee1,ee2:in std_logic_vec
27、tor(3 downto 0); ff0,ff1,ff2:in std_logic_vector(3 downto 0); xx0,xx1,xx2:in std_logic_vector(3 downto 0); choice:std_logic_vector(5 downto 0); g,h,i:in std_logic; yyy:out std_logic_vector(3 downto 0);end mux18;architecture rt1 of mux18 issignal sel:std_logic_vector(2 downto 0);beginsel=i&h&g;proces
28、s(sel,choice)beginif(choice=000001)then if(sel=000)then yyy=aa0; elsif(sel=001)then yyy=aa1; elsif(sel=010)then yyy=aa2; end if;elsif(choice=000010)then if(sel=000)then yyy=bb0; elsif(sel=001)then yyy=bb1; elsif(sel=010)then yyy=bb2; end if;elsif(choice=000100)then if(sel=000)then yyy=cc0; elsif(sel
29、=001)then yyy=cc1; elsif(sel=010)then yyy=cc2; end if;elsif(choice=001000)then if(sel=000)then yyy=dd0; elsif(sel=001)then yyy=dd1; elsif(sel=010)then yyy=dd2; end if;elsif(choice=010000)then if(sel=000)then yyy=ee0; elsif(sel=001)then yyy=ee1; elsif(sel=010)then yyy=ee2; end if;elsif(choice=100000)
30、then if(sel=000)then yyy=ff0; elsif(sel=001)then yyy=ff1; elsif(sel=010)then yyy=ff2; end if;end if;if(sel=011)then yyy=xx0;elsif(sel=100)then yyy=xx1;elsif(sel=101)then yyy=xx2;end if;end process;end rt1;6、計(jì)分模塊: 設(shè)置一個(gè)計(jì)分電路,每組開(kāi)始設(shè)置100分,由主持人計(jì)分,答對(duì)一次加10分,答錯(cuò)一次減10分。模塊如圖9所示。 圖9計(jì)分模塊圖library ieee;use ieee.std_
31、logic_1164.all;use ieee.std_logic_unsigned.all;entity score is port( clr,sub,add,clk:in std_logic; choose:in std_logic_vector(5 downto 0); aa0,aa1,aa2,bb0,bb1,bb2,cc0,cc1,cc2:out std_logic_vector(3 downto 0); dd0,dd1,dd2,ee0,ee1,ee2,ff0,ff1,ff2:out std_logic_vector(3 downto 0);end score;architecture
32、 rt1 of score isbeginprocess(choose,clk,add,sub)variable a1,a2:std_logic_vector(3 downto 0);variable b1,b2:std_logic_vector(3 downto 0);variable c1,c2:std_logic_vector(3 downto 0);variable d1,d2:std_logic_vector(3 downto 0);variable e1,e2:std_logic_vector(3 downto 0);variable f1,f2:std_logic_vector(
33、3 downto 0);beginif(clr=1)then a2:=0001;a1:=0000; -置100 b2:=0001;b1:=0000; c2:=0001;c1:=0000; d2:=0001;d1:=0000; e2:=0001;e1:=0000; f2:=0001;f1:=0000;elsif(clkevent and clk=1)then if(add=1)then if(choose=000001)then if(a1=1001)then a1:=0000; if(a2=1001)then a2:=0000; else a2:=a2+1; end if; else a1:=
34、a1+1; end if; elsif(choose=000010)then if(b1=1001)then b1:=0000; if(b2=1001)then b2:=0000; else b2:=b2+1; end if; else b1:=b1+1; end if; elsif(choose=000100)then if(c1=1001)then c1:=0000; if(c2=1001)then c2:=0000; else c2:=c2+1; end if; else c1:=c1+1; end if; elsif(choose=001000)then if(d1=1001)then
35、 d1:=0000; if(d2=1001)then d2:=0000; else d2:=d2+1; end if; else d1:=d1+1; end if; elsif(choose=010000)then if(e1=1001)then e1:=0000; if(e2=1001)then e2:=0000; else e2:=e2+1; end if; else e1:=e1+1; end if; elsif(choose=100000)then if(f1=1001)then f1:=0000; if(f2=1001)then f2:=0000; else f2:=f2+1; en
36、d if; else f1:=f1+1; end if; end if; elsif(sub=1)then if(choose=000001)then if(a1=0000)then if(a2=0000)then a1:=0000; a2:=0000; else a1:=1001; a2:=a2-1; end if; else a1:=a1-1; end if; elsif(choose=000010)then if(b1=0000)then if(b2=0000)then b1:=0000; b2:=0000; else b1:=1001; b2:=b2-1; end if; else b1:=b1-1; end if; elsif(choose=000100)then if(c1=0000)then if(c2=0000)then c1:=0000; c2:=0000; else c1:=1001; c2:=c2-1; end if; else c1:=c1-1; end if; elsif(choose=001000)then if(d1=0000)then if(d2=0000)then d1:=0000; d2:=000
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 現(xiàn)代企業(yè)創(chuàng)新管理與企業(yè)文化塑造的融合研究
- 環(huán)保材料在老房子裝修中的應(yīng)用與推廣
- 現(xiàn)代辦公室裝修中的可持續(xù)發(fā)展策略
- 現(xiàn)代辦公樓抗裂砂漿施工的標(biāo)準(zhǔn)化實(shí)踐
- 現(xiàn)代智能家居裝修的智能化照明方案
- 用醫(yī)療級(jí)設(shè)備輔助個(gè)人健康管理-針對(duì)男性的講解
- 環(huán)??萍荚谵k公空間改造中的應(yīng)用案例分析報(bào)告
- 《衣服的學(xué)問(wèn):3 我的扎染作品》說(shuō)課稿-2023-2024學(xué)年三年級(jí)下冊(cè)綜合實(shí)踐活動(dòng)滬科黔科版
- 七年級(jí)生物上冊(cè) 第2單元 第2章 第4節(jié)《單細(xì)胞生物》說(shuō)課稿 (新版)新人教版
- 2025年度電視劇導(dǎo)演聘用合同書(shū)(古裝武俠)
- 食品安全管理員考試題庫(kù)298題(含標(biāo)準(zhǔn)答案)
- 執(zhí)業(yè)醫(yī)師資格考試《臨床執(zhí)業(yè)醫(yī)師》 考前 押題試卷絕密1 答案
- 2024年山東濟(jì)寧初中學(xué)業(yè)水平考試地理試卷真題(含答案詳解)
- 社會(huì)保險(xiǎn)課件教學(xué)課件
- 訂婚協(xié)議書(shū)手寫(xiě)模板攻略
- 準(zhǔn)備單元 雪地上的“足跡”(教學(xué)設(shè)計(jì))-2023-2024學(xué)年五年級(jí)下冊(cè)科學(xué)大象版
- 宇航用商業(yè)現(xiàn)貨(COTS)器件保證指南-編制說(shuō)明
- 音樂(lè)學(xué)科閱讀方案
- 《立體倉(cāng)庫(kù)鋼結(jié)構(gòu)貨架技術(shù)規(guī)范(征求意見(jiàn)稿)》
- 2024年貴州蔬菜集團(tuán)有限公司招聘筆試參考題庫(kù)附帶答案詳解
- 2024江蘇省四校聯(lián)考高三下學(xué)期開(kāi)學(xué)考化學(xué)試題及答案
評(píng)論
0/150
提交評(píng)論