數電實驗報告

2021-03-04 02:32:27 字數 2860 閱讀 1935

課程名稱: 數字電子技術基礎實驗指導老師成績

實驗名稱: quartus ii使用練習——二進位制加法器設計實驗型別: 基本訓練實驗

同組學生姓名

一、實驗目的和要求(必填

二、實驗內容和原理(必填)

三、主要儀器裝置(必填

四、操作方法和實驗步驟

五、實驗資料記錄和處理

六、實驗結果與分析(必填)

七、討論、心得

一、實驗目的

1.熟悉quartus ii軟體的使用。

2.掌握邏輯功能的vhdl描述和原理圖描述的方法。

3.進一步掌握4位序列進製二進位制加法器的設計方法。

4.掌握用**波形驗證電路功能的方法。

二、實驗原理

4位序列進製二進位制全加器的工作原理

4為序列進製二進位制全加器的工作原理如圖所示,它以1位二進位制全加器的設計為期初,將4個1位二進位制全加器串接即可構成4位二進位制全加器。因此,可以採用層次化方法設計,頂層採用原理圖描述,底層採用vhdl描述,充分發揮原理圖描述的直觀性和hdl的靈活性。

三、主要儀器裝置

1.計算機

四、實驗內容

1.用原理圖方式描述4位全加器的功能;

2.用vhdl語言描述1位二進位制全加器的功能;

3.通過波形**驗證4位全加器的功能。

五、實驗結果

1.設計乙個4位序列進製加法器

用vhdl語言表示:

library ieee;

use ieee.std_logic_1164.all;

entity adder is

-- } do not remove this line!

port

(a : in std_logic;

b : in std_logic;

ci : in std_logic;

co : out std_logic;

s : out std_logic

);-- } do not remove this line!

end adder;

architecture adder_architecture of adder is

begin

s<=a xor b xor ci;

co<=(a and b)or(a and ci)or(b and ci);

end adder_architecture;

按照4位序列進製二進位制全加器的工作原理可以繪製成如下的原理圖:

檢驗正確後通過波形**得到下圖(波形過長只取部分,全部波形見4adder資料夾內波形檔案):

由圖可見能滿足4為二進位制全加器的功能要求。

六、拓展內容

只採用vhdl語言描述實現4位序列進製二進位制加法器:

首先用vhdl語言編寫一位二進位制加法器:

library ieee;

use ieee.std_logic_1164.all;

entity adder1 is

-- } do not remove this line!

port

(a : in std_logic;

b : in std_logic;

c : in std_logic;

s : out std_logic;

ci : out std_logic

);end adder1;

architecture adder1_architecture of adder1 is

begin

s<= a xor b xor c;

ci<= (a and b) or (c and(a xor b));

end adder1_architecture;

之後,通過對映,編寫四位全加器:

library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all;

entity fox is

-- } do not remove this line!

port

(a : in std_logic_vector (3 downto 0);

b : in std_logic_vector (3 downto 0);

c0 : in std_logic;

c4 : out std_logic;

s : out std_logic_vector (3 downto 0)

);end fox;

architecture fun of fox is

***ponent adder1

port (a : in std_logic;

b : in std_logic;

c : in std_logic;

s : out std_logic;

ci : out std_logic);

end ***ponent;

signal c1,c2,c3 :std_logic;

begin

u1 : adder1 port map ( a=> a(0),b=> b(0),c=> c0,ci=> c1,s=> s(0));

u2 : adder1 port map ( a=> a(1),b=> b(1),c=> c1,ci=> c2,s=> s(1));

u3 : adder1 port map ( a=> a(2),b=> b(2),c=> c2,ci=> c3,s=> s(2));

u4 : adder1 port map ( a=> a(3),b=> b(3),c=> c3,ci=> c4,s=> s(3));

end fun;

對程式進行**:

由圖可見能滿足4為二進位制全加器的功能要求。

數電實驗報告

數位電路技術基礎實驗 報告班級 學號 姓名 學院 實驗一組合邏輯電路分析 一 實驗目的 熟悉用74ls00和74ls20元件利用與非門電路設計組合電路的原理和方法步驟 二 實驗內容 實驗一 圖1 1 實驗一的邏輯關係圖的真值表如下 所示 真值表說明此邏輯電路圖實現的是與活功能。實驗二 密碼鎖的開鎖條...

數電實驗報告

數位電路課程設計報告書 題目 彩燈控制器的設計 學號 010900201 一 實驗目的 1 掌握電路板焊接技術 2 學習除錯系統電路,提高實驗技能 3 了解彩燈控制器的工作原理及其結構。二 實驗內容 1 設計任務 節目的彩燈五彩繽紛,彩燈的控制電路種類繁多。用移位暫存器為核心元件設計製作乙個8路彩燈...

數電實驗報告

國家電工電子實驗教學中心 數字電子技術基礎 實驗報告 實驗題目 中頻自動增益控制數位電路的研究 2015年11月 17日 實驗目的 1.掌握中頻自動增益數位電路設計可以提高學生系統地構思問題和解決問題的能力。2.通過自動增益數位電路實驗可以系統地歸納用加法器 a d和d a轉換電路設計加法 減法 乘...