【正文】
ELSEclk50 = 39。clk50 : OUT STD_LOGIC)。event and clk=39。 WHEN 0110=dout=0000010。 else alm=39。 ta,tb:in integer range 0 to 9。event and co=39。 if start=39。use 。 ) then st(3)=39。139。)and not( st(0)=39。139。entity xuanshou is port(rst,clk2:in std_logic。3.搶答器具有鎖存與顯示功能。即選手按動(dòng)按鈕,鎖存相應(yīng)的編號(hào),并在LED和數(shù)碼管上顯示,同時(shí)提示燈亮。 s0,s1,s2,s3:in std_logic。 or st(0)=39。139。 or st(3)=39。139。use 。139。139。 stop:in std_logic。039。 WHEN 0111=dout=1111000。139。END fenpin。039。139。ENTITY fenpin ISPORT(clk : IN STD_LOGIC。 begin process(clk) begin if clk39。 WHEN 0101=dout=0010010。then alm=clk。 clk:in std_logic。 elsif co39。039。2. 搶答鑒別仿真圖3.搶答鑒別元件圖(二)計(jì)數(shù)模塊1. VHDL源程序library ieee。139。 or st(1)=39。139。 then if (s0=39。use 。,該開(kāi)關(guān)由主持人控制。選手搶答實(shí)行優(yōu)先鎖存,優(yōu)先搶答選手的編號(hào)一直保持到主持人將系統(tǒng)清除為止。 states:buffer std_logic_vector(3 downto 0)。139。 or st(2)=39。139。 end if 。entity JS is port(clk1,rst,start,stop:in std_logic。 then if ta=0000 then ta=1001。 then if start=39。 alm:out std_logic )。 end if。 WHEN 1000=dout=0000000。thenif num=99 then num=0。ARCHITECTURE rtl OF fenpin ISSIGNAL count : STD_LOGIC_VECTOR(25 DOWNTO 0)。END IF 。) THENIF(count=10111110101111000010000000) THENclk50 = 39。USE 。 signal temp:std_logic。 WHEN 0100=dout=0011