【正文】
。 end case。when 1101= a=1011110。when 1001= a=1101111。when 0101= a=1101101。when 0001= a=0000110。 entity led_controller is port(d:in std_logic_vector(3 downto 0)。 end one。 then cqi:=d。 then cqi:=cqi。 end latch4。 use 。 u4:t10 port map(fx=e(2),rst=rst,ena=ena,cout=e(3),outy=d(15 downto 12))。 signal e:std_logic_vector(3 downto 0)。 architecture one of t10_4 is ponent t10 port (rst,fx,ena:in std_logic。 use 。 outy =cqi。039。 end if。039。 then if cqi 9 then cqi:=cqi+1。event and fx=39。 then cqi :=(others =39。 end t10。 use 。 用 QuartusII 對設(shè)計進行編譯、綜合、仿真,給出仿真波形和時序分析數(shù)據(jù)(不包括數(shù)碼管顯示部分)。 試驗內(nèi)容: 根據(jù)頻率計的工作原理,將電路劃分成控制器、計數(shù)器、鎖存器和 LED 顯示幾個模塊, 控制器 —— 產(chǎn)生 1 秒脈寬的計數(shù)允許信號、鎖存信號和計數(shù)器清零信號 計數(shù)器 —— 對輸入信號的脈沖數(shù)進行累計 鎖存器 —— 鎖存 測得的頻率值 LED 顯示 —— 將頻率值顯示在數(shù)碼管上 頂層文件框圖如下: c o n t r o l l e rD e c i m a lc o u n t e rO u t p u tb u f f e rL E Dc o n t r o l l e rr s tc l kE n aa , b , c , d , e , f , g , d pS 0 ~ 1 用元件例化語句寫出頻率計的頂層文件。 實驗原理: 根據(jù)頻率的定義和頻率測量的基本原理,測定信號的頻率必須有一個脈寬為 1 秒的脈沖計數(shù)允許信號, 1 秒計數(shù)結(jié)束后,計數(shù)值(即所測信號頻率)鎖入鎖存器,并為下一次測頻作準(zhǔn)備,