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

正文內(nèi)容

eda課程設(shè)計(jì)--乒乓球游戲電路設(shè)計(jì)(雙打)-在線瀏覽

2025-03-05 04:54本頁面
  

【正文】 丙或丁擊球允許甲或乙發(fā)球允許丙或丁發(fā)球 甲乙沒擊球 丙丁沒擊球 或者擊球錯(cuò)誤 或者擊球錯(cuò)誤圖12 乒乓球游戲機(jī)原理圖 總體設(shè)計(jì)電路該乒乓球游戲機(jī)的設(shè)計(jì)主要包括的模塊與內(nèi)容有:乒乓球游戲機(jī)實(shí)體的設(shè)計(jì),游戲機(jī)編程的實(shí)現(xiàn),記分譯碼器的設(shè)計(jì)以及構(gòu)造體的設(shè)計(jì)。以下我們就詳細(xì)解析各個(gè)板快的設(shè)計(jì)與實(shí)現(xiàn)。首先考慮輸入端口,一般應(yīng)該設(shè)置一個(gè)異步置位端口reset,用于在系統(tǒng)不正常時(shí)回到初始狀態(tài):兩個(gè)發(fā)球輸入端serve1和serve2,邏輯‘1’分別表示甲乙丙丁的發(fā)球;四個(gè)個(gè)擊球輸入端hit1,hit2,hit3和hit4邏輯‘1’分別表示甲丙乙丁擊球;一個(gè)開始游戲按鈕startbutton,處于邏輯‘1’表示可以游戲;還得有一個(gè)時(shí)鐘輸入端口clk。實(shí)體的設(shè)計(jì)如下:library ieee。use 。 //引用必要的庫函數(shù)和包集合entity pingponggame is 實(shí)體名為pingponggame port(reset:int std_logic。startbutton:int std_logic。 發(fā)球輸入端口hit1,hit2,hit3,hit4 a,b:int std_logic。 score11,score12,score21,score22:out std_logic_vector(1 to 7)); 4個(gè)用于控制4個(gè)7段譯碼器的輸出端口end pingponggame。在波形模擬圖中是用數(shù)值來表示狀態(tài)的。乒乓球游戲機(jī)中有兩個(gè)計(jì)數(shù)器count1和count2,分別記憶甲乙和丙丁的得分,用發(fā)光二極管的輪流發(fā)光表示球的移動(dòng)軌跡。139。count100000。a=0。elsif clk39。139。count100000。elsif startbutton+39。 theni=0。count2=00000。state=light1on。state=light8on。end case。139。count1=count1+1。 elsestate=ballmoveto2。when light8on= 進(jìn)程處于第八盞燈亮狀態(tài)i=7。count2=count2+1。elsestate=ballmoveto1。 when ballmoveto1= 進(jìn)程處于球向丙丁移動(dòng)狀態(tài)if (hit1=39。1’) theni=0。state=waitserve。state=(allow1hit or allow3hit)。end if。139。ount1=count1+1。elsif i=7 then i=8。else i=i+1。when (allow1hit or allow3hit)= 進(jìn)程處于允許甲或乙擊球狀態(tài)if (hit1=39。) and (a=’0’)then i=2。a=’1’。139。state=ballmoveto2。else count2=count2+1。state=waitserve。when (allow2hit or allow4hit)= 進(jìn)程處于允許丙或丁擊球狀態(tài)if (hit2 =39。) and (a=39。state=ballmoveto1。elsif (hit4=39。) and (a=’1’) then i=2。a=’0’。i=0。end if。end if。end process。所謂七段譯碼器,其實(shí)是由7段發(fā)光二極管組成的用于顯示數(shù)字的器件。而狀態(tài)機(jī)中的記分是由5位二進(jìn)制碼來表示的,即count1和count2。library ieee。use 。 entity mudecoder isport(binaryin:int std_logic_vector(1 to 5)。 七段譯碼器輸出端口bcdout2:out std_logic_vector(1 to 7))。architecture m of mydecoder issignal tembinaryin:std_logic_vector(1 to 5)。case tembinaryin is 把0到9的5位二進(jìn)制碼轉(zhuǎn)換成七段譯碼when00000=bcdout1=1111110。when00001=bcdout1=1111110。when00010=bcdout1=1111110。when00011=bcdout1=1111110。when00100=bcdout1=1111110。when00101=bcdout1=1111110。when00110=bcdout1=1111110。when00111=bcdout1=1111110。when01000=bcdout1=1111110。when01001=bcdout1=1111110。把10到19的5位二進(jìn)制碼轉(zhuǎn)換成七段譯碼when01010=bcdout1=0110000。when01011=bcdout1=0110000。when00000=bcdout1=0110000。when01100=bcdout1=0110000。when01101=bcdout1=0110000。when01111=bcdout1=0110000。when10000=bcdout1=0110000。when10001=bcdout1=0110000。when10010=bcdout1=0110000。when10011=bcdout1=0110000。 把20到21的5位二進(jìn)制碼轉(zhuǎn)換成七段譯碼when10100=bcdout1=1101101。when10101=bcdout1=1101101。 如果5位二進(jìn)制碼不在0到21范圍內(nèi),那么兩個(gè)七段譯碼器都顯示0when others=bcdout1=1101101。end case。end m。 構(gòu)造體的設(shè)計(jì)library ieee。use 。entity ying is port(reset1,clk1:in std_logic。 lopen:in std_logic。 Llight:out std_logic_vector(1 to 8)。 end ying。 startbutton,hit1,hit2,hit3,hit4:in std_logic。 light:out std_logic_vector(1 to 8)。end ponent 。 5位二進(jìn)制碼的輸入端口 bcdout1 : out std_logic_vector(
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1