Presentation is loading. Please wait.

Presentation is loading. Please wait.

使用VHDL設計—4位元位移器 通訊一甲 B09622048 楊穎穆.

Similar presentations


Presentation on theme: "使用VHDL設計—4位元位移器 通訊一甲 B09622048 楊穎穆."— Presentation transcript:

1 使用VHDL設計—4位元位移器 通訊一甲 B 楊穎穆

2 目錄 目的 設計原理 程式 實驗結果 參考資料

3 目的 1. 使用VHDL設計一個4位元向右位移1位元位移器電路 2. 將電路加以模擬 3. 將程式燒錄到IC執行
2. 將電路加以模擬 3. 將程式燒錄到IC執行 4. 將以上原理撰寫成PPT格式報告交出 5. 將以上原理與操作過程講述一便並錄製成影音檔交出

4 設計原理 Ip(0)op(4) 1 1 位移器主要的功用就是位移,可分為左、右位移。 1
Ip(3 downto 1)op(3 downto 0) 1 1 Ip(0)op(4)

5 程式 library ieee; use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity right1 is 電路內部要做的電路名稱 port( 接腳 ip:in std_logic_vector(3 downto 0); --輸入腳 ip,內部有四個位元數 op:out std_logic_vector(4 downto 0) --輸出腳 op,內部有五個位元數 ); end;

6 architecture behav of right1 is --電路內部結構
begin process(ip) 處理影響內部訊號 ip op(3 downto 0)<='0'& ip(3 downto 1); --將輸入端的值 ip後三個位元前串上'0',並搬入到op op(4)<=ip(0); --將輸入端第一個值搬入到輸出端第五個位元 end process; 結束process 程式 end behav; 程式結束

7 實驗結果(1) 當我輸入值為“1111”時,輸出會為”0111”,ip(0)會搬入到op(4),顯示為‘1’ ,右移一位。

8 實驗結果(2) 當我輸入值為“0110”時,輸出會為”0011”,ip(0)會搬入到op(4),顯示為‘0’ ,右移一位。

9 參考資料 主要的資料內容是參考王志湖老師上課所教授的內容及“數位邏輯”這本書。

10 END


Download ppt "使用VHDL設計—4位元位移器 通訊一甲 B09622048 楊穎穆."

Similar presentations


Ads by Google