【正文】
開頭部分,一般包括說明論文寫作的目的與意義,對所研究問題的認(rèn)識以及提出問題。 目錄 目錄應(yīng)獨立成頁,包括論文中全部章、節(jié)的標(biāo)題及頁碼。 摘要與關(guān)鍵詞 摘要 本科生畢業(yè)設(shè)計(論文)的摘要均要求用中、英兩種文字給出,中文在前。指導(dǎo)教師應(yīng)加強指導(dǎo),嚴(yán)格把關(guān)。 NET seg7[6] LOC = B12。 NET seg7[2] LOC = A10。 NET ks LOC = G5。 NET dig8[4] LOC = J13。 NET dig8[0] LOC = N13。 Inst_kaiguanxiaodou: kaiguanxiaodou PORT MAP( clk =clk_1K , kin1 =ks , kin2 =kr , kout1 =n1 , kout2 =n2 29 )。 amp。 amp。 begin Inst_fp48m_to_1k: fp48m_to_1k PORT MAP( clk =clk , q =clk_1k )。 signal n6 :std_logic:=39。 enc : OUT std_logic。 COMPONENT control PORT( clk : IN std_logic。 kin2 : IN std_logic。 seg_out : OUT std_logic_vector(6 downto 0) )。 t3 : IN std_logic_vector(3 downto 0)。 COMPONENT display PORT( clk_1k : IN std_logic。 t3 : OUT std_logic_vector(3 downto 0)。 display_in : IN std_logic。 t_2 : IN std_logic_vector(3 downto 0)。 coa : OUT std_logic )。 cout2 : OUT std_logic_vector(3 downto 0)。 clr : IN std_logic。 architecture Behavioral of timing_clock is COMPONENT fp48m_to_1k PORT( clk : IN std_logic。 kr : in STD_LOGIC。 Unment the following library declaration if instantiating any Xilinx primitives in this code. library UNISIM。 ( 7)頂層文件: library IEEE。 END COMPONENT。 end kaiguanxiaodou。 kin1 : in STD_LOGIC。 Unment the following library declaration if using arithmetic functions with Signed or Unsigned values use 。 key_out = not k1 and k2。039。 end if。139。 begin process(clk,key_in) begin if clk39。 key_out : out STD_LOGIC)。 Unment the following library declaration if instantiating any Xilinx primitives in this code. library UNISIM。 ( 6)按鍵消抖模塊: 消抖 : library IEEE。139。039。139。139。039。139。 end process。 end case。 when others= case key is when 10=n_state=01。 end case。 end if。 begin key=p amp。 end control。 q : in STD_LOGIC。 Unment the following library declaration if instantiating any Xilinx primitives in this code. library UNISIM。 ( 5) 控制模塊: library IEEE。 end case。 when 0111=seg=0001111。 when 0011=seg=0000110。 end process。 when 110=bcd=t4。 when 010=bcd=1010。 end case。 when 100=dig_out=11101111。 process(dig) begin case dig is when 000=dig_out=11111110。 else dig=dig+1。 begin process(clk_1k) begin if clk_1k39。 end display。 t5 : in STD_LOGIC_VECTOR (3 downto 0)。 t1 : in STD_LOGIC_VECTOR (3 downto 0)。 Unment the following library declaration if instantiating any Xilinx primitives in this code. library UNISIM。 ( 4)顯示譯碼模塊: 19 library IEEE。 t5=t_5。 t1=t_1。 end latch。 t2 : out STD_LOGIC_VECTOR (3 downto 0)。 t_5 : in STD_LOGIC_VECTOR (3 downto 0)。 t_1 : in STD_LOGIC_VECTOR (3 downto 0)。 18 Unment the following library declaration if using arithmetic functions with Signed or Unsigned values use 。 Inst_t_6b: t_6 PORT MAP( clk =clk_100 , clr =clr , en =o5 , co =coa , sum =cout5 )。 Inst_t_10b: t_10 PORT MAP( clk =clk_100 , clr =clr , en =o1, co =o2 , sum =cout1 )。 END COMPONENT。 clr : IN std_logic。 co : OUT std_logic。 END COMPONENT。 coa : out std_logic)。 cout2 : out STD_LOGIC_VECTOR (3 downto 0)。 clr : in STD_LOGIC。 Unment the following library declaration if using arithmetic functions with Signed or Unsigned values use 。 end process。 else co=39。 if temp=1001 and en=39。 else temp=temp+1。 and clk39。co=39。 architecture Behavioral of t_10 is signal temp:std_logic_vector(3 downto 0)。 en : in STD_LOGIC。 Unment the following library declaration if instantiating any Xilinx primitives in this code. library UNISIM。 模 10 計數(shù)器: library IEEE。 end if。 then co=39。 end if。139。 elsif (clk=39。139。 sum : out STD_LOGIC_VECTOR (2 downto 0))。 entity t_6 is Port ( clk : in STD_LOGIC。 use 。 end process。 else sum=sum+1。 begin process(clk) begin if falling_edge(clk) then if sum=4 then sum=(others=39。039。 entity fp1k_to_100 is port ( clk : in STD_LOGIC。 use 。 q=sum(15)。 end if。 begin process(clk) begin if falling_edge(clk) then if sum=47999 then sum=(others=39。039。 entity fp48m_to_1k is port ( clk : in STD_LOGIC。 use 。 希望以后能有更多的動手實踐機會,在硬件 實踐中發(fā)現(xiàn)自己的不足,彌補自己的不足 。在此基礎(chǔ)上設(shè)計秒表的VHDL 語言 ,顯得 條理清晰和檢查糾錯方便。 另一方面,通過 Modesim 仿真, 可以測 試各程序模塊, 并且可以清楚看到 各模塊仿真結(jié)果與其功能相符合 。 實現(xiàn)原理圖 : 按鍵消抖模塊 :功能是 消除按鍵輸入信號的影響,輸出單脈沖 。注:本實驗電路板使用共陽極,即低電平有效。而其他的兩個模 10 計數(shù)器則是 2 位模 10 計數(shù)。另一種是通過模為 10 的計數(shù)器進位輸出將上述 1KHz 的時鐘信號轉(zhuǎn)化為 100Hz的時鐘信號,作為計數(shù)器的時鐘輸入。 按鍵消抖電路:消除按鍵輸入信號抖動的影響,輸出單脈沖。 注:其中包含了一個 1kHz 到 100Hz 的分頻器 , 合并在一個模塊里 。 (4)時序仿真 :需要利用在布局布線中獲得的精確參數(shù),用仿真軟件驗證電路的時序。 ( 7)設(shè)計靈活,修改方便,同時也便于設(shè)計結(jié)果的交流、保存和重用,產(chǎn)品開發(fā)速度快,成本低。 ( 3) VHDL 有良好的可讀性,接近高級語言,容易理解。在秒表正常運行下,如果按下 split/reset,顯示停止在按鍵時的時間,但秒表仍然在計時;再次按下該鍵,秒表恢復(fù)正常顯示。除此以外,利用課余時間學(xué)習(xí)數(shù)字頻率計的硬件實現(xiàn)方法,即用 MultiSim 仿真等。本文目的就是基于計算機電路利用 VHDL語言設(shè)計出數(shù)字秒表。它在人們?nèi)粘I钜驯夭豢缮?,大多?shù)電子產(chǎn)品多是由計算機電路組成。該設(shè)計以 VHDL 作為硬件開發(fā)語言,以 ISE 作為軟件開發(fā)平臺,準(zhǔn)確地實現(xiàn)了秒表計數(shù)、清零、暫停等功能,并使用 ModelSim 仿真軟件對 VHDL 程序?qū)崿F(xiàn)了電路仿真,完成了綜合布局布線,最終將程序下載到芯片 Spartan3A,并通過板子上相應(yīng)模塊驗證實驗的正確性。在秒表正常運行的情況下,如果按下 state/reset 則秒表暫停計時;再次按下該鍵,秒表繼續(xù)計時。 ( 2)具有豐富的模擬仿真語句和庫函數(shù),隨時可對設(shè)計進行仿真模擬,因而能將設(shè)計中的錯誤消除在電路系統(tǒng)裝配之前,在設(shè)計早期就能檢查設(shè)計系統(tǒng)功能的可行性,有很強的預(yù)測能力。 ( 6)對于用 VHDL 完成的一個確定設(shè)計,可以利用 EDA 工具進行邏輯綜合和優(yōu)化,并能自動地把 VHDL 描述轉(zhuǎn)變成門電路級網(wǎng)表文件。 (3)邏輯綜合 :將源文件調(diào)入邏輯綜合軟件進行綜合,即把語言綜合成最簡的布爾表 達(dá)式。 計數(shù)器:對時間基準(zhǔn)脈沖進行 計數(shù) ,完成計時功能。 掃描顯示的控制電路:包括掃描計數(shù)器、和 7 段譯碼器;控制 8個數(shù)碼管以掃描方式顯示計時結(jié)果。 一種是通過模為 48000的計數(shù)器進位輸出實現(xiàn)將晶體振蕩器產(chǎn)生的 48MHz 的時鐘信號轉(zhuǎn)化為 1KHz 的時鐘信號作為基準(zhǔn),方便下面各個模塊的取用。具體而言,其中 2 個模 10 計數(shù)器和 2 個模 6 計數(shù)器分別級聯(lián)產(chǎn)生