?? 1_4.txt
字號(hào):
題目:
設(shè)計(jì)一個(gè)1對(duì)4分用器(輸入:D ,輸出: Y3 Y2 Y1 Y0,另有兩個(gè)輸入控制端S1與S0控制輸出選擇),真值表如圖4。
S1 S0 Y3 Y2 Y1 Y0
0 0
0 1
1 0
1 1 D 1 1 0
1 D 1 1
1 1 D 1
1 1 1 D
本軟件設(shè)計(jì)的目的和任務(wù):1.使學(xué)生全面了解如何應(yīng)用該硬件描述語(yǔ)言進(jìn)行高速集成電路設(shè)計(jì);2.通過(guò)軟件安裝環(huán)節(jié)、設(shè)計(jì)環(huán)節(jié)與仿真環(huán)節(jié)使學(xué)生熟悉XILINX PROJECT NAVIGATOR設(shè)計(jì)環(huán)境與MODEL SIM SE仿真工具;3. 通過(guò)對(duì)基本題、綜合題的設(shè)計(jì)實(shí)踐,使學(xué)生掌握硬件系統(tǒng)設(shè)計(jì)方法(自底向上或自頂向下),熟悉VHDL語(yǔ)言三種設(shè)計(jì)風(fēng)格,并且培養(yǎng)學(xué)生應(yīng)用VHDL語(yǔ)言解決實(shí)際問(wèn)題的能力。
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity xg is
Port ( D : in std_logic;
S1 : in std_logic;
S0 : in std_logic;
Y : out std_logic_vector(3 downto 0));
end xg;
architecture Behavioral of xg is
signal sel : std_logic_vector(1 downto 0);
begin
sel<=S1&S0;
Y(0) <= D when sel = "00" else '1';
Y(1) <= D when sel = "10" else '1';
Y(2) <= D when sel = "01" else '1';
Y(3) <= D when sel = "11" else '1';
end Behavioral;
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -