【正文】
5 WHEN 0110=DOUT7=1011111。 DOUT7: OUT STD_LOGIC_VECTOR(6 DOWNTO 0))。 end case。)then if(count=10)then count=00。 architecture body_chooser of sjxz is signal count: std_logic_vector (1 downto 0)。 use 。 end if。 then tb=0010。 end if。 then co=39。 begin p1:process(clk,rst,s,stop,ta) begin if rst=39。 (二)計時模塊 VHDL 源程序 library ieee。 elsif (st=0010) then states=0010。 ) then st(3)=39。 or st(3)=39。139。 end if 。)and not( st(0)=39。139。139。039。 use 。 設(shè)置一個計分電路,每組開始預(yù)置 100分,由主持人記分,答對一次加 10分,答錯一次減 10分。當(dāng)主持人按下 “復(fù)位 ”按鈕,所有組的按鍵才可用。本輪搶答完畢,主持人操作控制開關(guān),使系統(tǒng)回復(fù)到禁止工作狀態(tài),以便進行下一輪搶答。 states:buffer std_logic_vector(3 downto 0)。st=0000。)and not( st(1)=39。 end if 。139。 or st(2)=39。 ) then st(2)=39。139。 tmp=s0 or s1 or s2 or s3。 end if。 entity js is port(clk,rst,s,stop:in std_logic。139。139。 end process p1。139。 end process p2。 entity sjxz is port (a,b,c: in std_logic_vector(3 downto 0)。039。 end if。 數(shù)據(jù)選擇模塊圖 在這個模塊中主要實現(xiàn)搶答過程中的數(shù)據(jù)輸入功能,輸入信號 a[3..0]、b[3..0]、 c[3..0];計數(shù) 輸出信號 s;數(shù)據(jù)輸出信號 y;計數(shù)脈沖 clk2,實現(xiàn) a、b、 c 按脈沖輪流選通,在數(shù)碼管上顯示。 0 WHEN 0001=DOUT7=0110000。 8 WHEN 1001=DOUT7=1111011。仿真圖上顯示的為 A 先搶答,因為在 微秒之間 A、 C雖然都按搶答鍵,但 CLR 為有效狀態(tài),所以在此時間段內(nèi)的搶答無效。其他搶答者搶答成功后的加分操作與此相同。 在實驗的過程中,連接線路很重要。 參考資料 [1] 潘松著 .EDA 技術(shù)實用教程 (第二版 ). 北京:科學(xué)出版社 ,2020. [2] 康華光主編 .電子技術(shù)基礎(chǔ) 模擬部分 . 北京:高教出版社 ,2020. [3] 閻石主編 .數(shù)字電子技術(shù)基礎(chǔ) . 北京:高教出版社 ,2020. [4] 謝自美 主編《電子線路設(shè)計實驗測試》 華中科技大學(xué)出版社 [5] 趙世強、許杰等編 《電子電路 EDA 技術(shù)》 西安電子科技大學(xué)出版社