반응형
Demultiplexer(Demux)
데이터 분배 회로(data distributor)라고도 하며, 한 개의 선으로부터 입수된 정보를 받아들임으로써 N개의 선택 입력에 의해 2^N개의 가능한 출력선 중의 하나를 선택하여 정보를 전송하는 조합 회로. 출력선의 선택은 선택 입력의 비트 조합에 의해 결정된다.
1x4 demux
▶1x4 Demux(behavioral,dataflow)modeling
동작적모델링에서 Mux와는 다르게 if문 대신 case ~ when문 사용!
좌측은 진리식을 그대로 기술해준 dataflow문 / 우측은 when ~else 문을 사용한 dataflow문
1x4 demux 결과 및 시뮬레이션
■ 1x8 demux
▶ 1x8 demux behavioral modeling VHDL
library ieee;
use ieee.std_logic_1164.all;
entity eightdemux is --eightdemux에 대한 포트 설정
port ( I : in std_logic; --I는 입력로직
S : in std_logic_vector( 2 downto 0); --S는 2부터0까지 내림차순의 로직벡터 S2S1S0
Y : out std_logic_vector(7 downto 0) -- Y는 7부터0까지 내림차순의 로직벡터 S(7)S(6)S(5)S(4)S(3)S(2)S(1)S(0)
);
end eightdemux;
architecture Behavioral_case of eightdemux is --eight mux에 대한 동작적모델
begin
process(I,S) -- case문은 순차적기술문이므로 process를 사용(병행적기술문은 process밖)
begin
case S is
when "000" => Y <= I & "0000000";
when "001" => Y <= '0' & I & "000000";
when "010" => Y <= "00" & I & "00000";
when "011" => Y <= "000" & I & "0000";
when "100" => Y <= "0000" & I & "000";
when "101" => Y <= "00000" & I & "00";
when "110" => Y <= "000000" & I & '0';
when others => Y <= "0000000" & I ;
end case;
end process;
end Behavioral_case;
▶1x8 Demux dataflow modeling
library ieee;
use ieee.std_logic_1164.all;
entity eightdemux_wse is --eightdemux_wse에 대한 포트설정
port (I : in std_logic; -- I는 입력 로직
S : in std_logic_vector(2 downto 0); -- S는 2부터 0까지 내림차순의 입력 로직 벡터 S(2)S(1)S(0)
Y : out std_logic_vector(7 downto 0) --Y는 7부터 0까지 내림차순의 출력 로직 벡터 Y(7)Y(6)Y(5)Y(4)Y(3)Y(2)Y(1)Y(0)
);
end eightdemux_wse;
architecture dataflow_with_select_when of eightdemux_wse is --자료흐름적모델링
begin
with S select
Y <= I & "0000000" when "000",
'0' & I & "000000" when "001",
"00" & I & "00000" when "010",
"000" & I & "0000" when "011",
"0000" & I & "000" when "100",
"00000" & I & "00" when "101",
"000000" & I & '0' when "110",
"0000000" & I when others;
end dataflow_with_select_when;
1x8 demux 결과 및 시뮬레이션
반응형
'VHDL' 카테고리의 다른 글
조합회로 - Multiplexer(Mux) 4x1,8x1 (0) | 2021.06.08 |
---|---|
ALU dataflow (0) | 2021.06.08 |
조합회로 - 비교기 (자료흐름적 모델링) (0) | 2021.06.08 |
4비트 병렬 가감산기 (0) | 2021.06.08 |
4비트 가산기, (0) | 2021.06.08 |