freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

eda課程設(shè)計--乒乓球游戲電路設(shè)計(雙打)-預(yù)覽頁

2025-02-09 04:54 上一頁面

下一頁面
 

【正文】 以及構(gòu)造體的設(shè)計。首先考慮輸入端口,一般應(yīng)該設(shè)置一個異步置位端口reset,用于在系統(tǒng)不正常時回到初始狀態(tài):兩個發(fā)球輸入端serve1和serve2,邏輯‘1’分別表示甲乙丙丁的發(fā)球;四個個擊球輸入端hit1,hit2,hit3和hit4邏輯‘1’分別表示甲丙乙丁擊球;一個開始游戲按鈕startbutton,處于邏輯‘1’表示可以游戲;還得有一個時鐘輸入端口clk。use 。startbutton:int std_logic。 score11,score12,score21,score22:out std_logic_vector(1 to 7)); 4個用于控制4個7段譯碼器的輸出端口end pingponggame。乒乓球游戲機(jī)中有兩個計數(shù)器count1和count2,分別記憶甲乙和丙丁的得分,用發(fā)光二極管的輪流發(fā)光表示球的移動軌跡。count100000。elsif clk39。count100000。 theni=0。state=light1on。end case。count1=count1+1。when light8on= 進(jìn)程處于第八盞燈亮狀態(tài)i=7。elsestate=ballmoveto1。1’) theni=0。state=(allow1hit or allow3hit)。139。elsif i=7 then i=8。when (allow1hit or allow3hit)= 進(jìn)程處于允許甲或乙擊球狀態(tài)if (hit1=39。a=’1’。state=ballmoveto2。state=waitserve。) and (a=39。elsif (hit4=39。a=’0’。end if。end process。而狀態(tài)機(jī)中的記分是由5位二進(jìn)制碼來表示的,即count1和count2。use 。 七段譯碼器輸出端口bcdout2:out std_logic_vector(1 to 7))。case tembinaryin is 把0到9的5位二進(jìn)制碼轉(zhuǎn)換成七段譯碼when00000=bcdout1=1111110。when00010=bcdout1=1111110。when00100=bcdout1=1111110。when00110=bcdout1=1111110。when01000=bcdout1=1111110。把10到19的5位二進(jìn)制碼轉(zhuǎn)換成七段譯碼when01010=bcdout1=0110000。when00000=bcdout1=0110000。when01101=bcdout1=0110000。when10000=bcdout1=0110000。when10010=bcdout1=0110000。 把20到21的5位二進(jìn)制碼轉(zhuǎn)換成七段譯碼when10100=bcdout1=1101101。 如果5位二進(jìn)制碼不在0到21范圍內(nèi),那么兩個七段譯碼器都顯示0when others=bcdout1=1101101。end m。use 。 lopen:in std_logic。 end ying。 light:out std_logic_vector(1 to 8)。 5位二進(jìn)制碼的輸入端口 bcdout1 : out std_logic_vector(1 to 7)。beginu1 :pingponggame port map(count1=d,count2=e,hit1=red1,hit2=green1,hit3=red2,hit4=green2,clk=clk1,startbutton=lopen,serve=fire,reset=reset1,light=Llight)。從構(gòu)造體設(shè)計中可以看到,控制整個乒乓球游戲機(jī)運轉(zhuǎn)的就是狀態(tài)機(jī)進(jìn)程,它隊各個外圍部分起控制作用。 仿真及仿真結(jié)果分析編譯完成后進(jìn)行仿真波形圖和原理圖在仿真圖中,看到serve數(shù)組為1,代表丙或丁發(fā)球。甲在state為狀態(tài)6的時候擊球了,在圖上hit1在此時刻出現(xiàn)高電平,看到state轉(zhuǎn)移到了狀態(tài)2。當(dāng)“球”(點亮的那只LED)運動到某方的最后一位時,參賽者應(yīng)能果斷地按下位于自己一方的按鈕開關(guān),即表示啟動球拍擊球。甲乙和丙丁雙方各設(shè)一個發(fā)光二極管,表示擁有發(fā)球權(quán),每隔5次自動交換發(fā)球權(quán),擁有發(fā)球權(quán)的一方發(fā)球有效。這次課程設(shè)計總的說來收獲很大。但卻是我獨立自主的從設(shè)計電路到得出結(jié)論。12參考資料[1] (第二版). 北京:科學(xué)出版社,2005.[2] 劉艷. EDA 技術(shù)在數(shù)字系統(tǒng)電路設(shè)計實驗中的應(yīng)用[J]. 實驗室研究與探索,2002,21(3): 63264[3] 99 SE EDA技術(shù)及應(yīng)用[M].西安:潭會生,[M].西安:西安電子科技大學(xué)出版社,2004entity ying is port(reset1,clk1:in std_logic。 Llight:out std_logic_vector(1 to 8)。 startbutton,hit1,hit2,hit3,hit4:in std_logic。end ponent 。end ponent。u3 :mydecoder port map(binaryin=e,bcdout1=score21,bcdout2=score22)。use 。1 count1,count2 : buffer std_logic_vector(1 to 5)。 signal state : pingponggame。139。a=0。139。elsif startbutton=39。count2=00000。state=light8on。if (hit2=39。) theni=0。end if。) or (hit3=39。state=waitserve。139。count2=count2+1。else i=i1。) or (hit4=39。state=waitserve。end if。139。elsif (hit3=39。a=0。end if。state=ballmoveto1。) and (b=1) then i=2。i=0。end if。end one。use 。end entity mydecoder。bcdout2=1111110。bcdout2=1101101。bcdout2=0110011。bcdout2=1011111。bcdout2=1111111。bcdout2=1111110。bcdout2=1101101。bcdout2=0110011。bcdout2=1011111。bcdout2=1111111。bcdout2=1111110。bcdout2=1111110。18
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1