【正文】
end case。 3 when 4=d=1100110。 when others=null。 case w is when 000=n=s0。 end process。 when 0100=num=4。h0=h20。 else h=h+1。 and p=100 then m1=num。 c3=39。 end if。 進(jìn)位 else m0=m0+1。 分低位 mm0:process(c1) is begin if c139。039。139。 elsif en=39。039。 then count:=count+1。 數(shù)碼管顯示值 signal s0,s1,m0,m1,h0,h1:integer range 0 to 10。 置數(shù)開(kāi)關(guān) p:in std_logic_vector(2 downto 0)。 覺(jué)得自己還是思維方式太狹窄,解決問(wèn)題的方法太單一,以后要擴(kuò)展思維,一條路行不通就換另一種方法,也許會(huì)更簡(jiǎn)單。 end process。 when 011=n=m0。 then if w=111 then w=000。h0=h20。 else h=h+1。這里不再贅述。 end if。 then if en=39。139。 then if s0=9 then s0=0。 秒是 60 進(jìn)制的, 可以用一個(gè)十進(jìn)制計(jì)數(shù)器和一個(gè)六進(jìn)制計(jì)數(shù)器實(shí)現(xiàn)。基于 VHDL 語(yǔ)言的電子表設(shè)計(jì) 3 程序中對(duì) clk 進(jìn)行 512 分頻,所以需要一個(gè)相近的脈沖,試驗(yàn)箱上的 CLK4 的頻率范圍為 625KHz~,通過(guò)跳線(xiàn)帽選擇可以調(diào)出 624Hz 的頻率。039。 ④ 當(dāng) p2p1p0 為“ 011”時(shí), 分 低位置數(shù)。要讓結(jié)果顯示出來(lái),則用七段式數(shù)碼管輸出顯示計(jì)數(shù)值。 48 分,頻率分段設(shè)置 +3 分,頻率微調(diào) +5 分,頻率范圍酌情加分。 注意事項(xiàng): ,采用標(biāo)準(zhǔn)的作業(yè)考核類(lèi) 封面, A4 打印。可采用數(shù)碼管或液晶顯示,最好設(shè)計(jì)出個(gè)性化顯示界面。 ① 當(dāng) p2p1p0 為“ 000”時(shí),不選擇任何位,此時(shí)電子表只是停止計(jì)數(shù),不置數(shù)。event and t=39。 end if。 then count:=count+1。139。039。 基于 VHDL 語(yǔ)言的電子表設(shè)計(jì) 4 秒高位 ss1:process(c0) is begin if c039。 進(jìn)位 else s1=s1+1。 end if。event and c3=39。 when 10 to 19 =h1=1。 時(shí) 高位h1 時(shí)低 位h0 — 分 高位m1 分低 位m0 — 秒高位s1 秒低位s0 關(guān)鍵程序: process(clk,w) is begin if clk39。 when 001=n=s1。 when 111=n=h1。 連線(xiàn)照片如下: 電子表實(shí)物照片如下:從左到右為時(shí),分,秒。 use 。 architecture behaver of dzb is signal t:std_logic。 begin if clk39。event and t=39。 c0=39。 end process。139。 end if。 then if m0=9 then m0=0。139。 then if en=39。 end if。event and c3=39。 when 10 to 19 =h1=1。 when 0001=num=1。 when 1001=num=9。 else w=w+1。 when 101=n=10。 0 when 1=d=0000110。 8 when 9=d=1101111。 。 6 when 7=d=0000111。 sel=w。 when 011=n=m0。139。 when 0111=num=7。 end process。 case h is when 0 to 9 =h1=0。