diff options
author | fossee | 2019-09-03 11:07:32 +0530 |
---|---|---|
committer | fossee | 2019-09-03 11:07:32 +0530 |
commit | f8d3dbc8c0f1c59a0546998cb9365e5c291dca07 (patch) | |
tree | 28f0d2fe7f00f1ee854e411b82689eae861a9c52 /Example/trial_demux | |
parent | 491e95ad13764229c3e27dfb625c5dbef9ddec59 (diff) | |
download | nghdl-f8d3dbc8c0f1c59a0546998cb9365e5c291dca07.tar.gz nghdl-f8d3dbc8c0f1c59a0546998cb9365e5c291dca07.tar.bz2 nghdl-f8d3dbc8c0f1c59a0546998cb9365e5c291dca07.zip |
added examples and modified server
Diffstat (limited to 'Example/trial_demux')
-rw-r--r-- | Example/trial_demux/t_demux.vhdl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Example/trial_demux/t_demux.vhdl b/Example/trial_demux/t_demux.vhdl new file mode 100644 index 0000000..1e1f0bd --- /dev/null +++ b/Example/trial_demux/t_demux.vhdl @@ -0,0 +1,32 @@ +library IEEE; +use IEEE.STD_LOGIC_1164.all; + +entity t_demux is + port( + + F : in STD_LOGIC_vector(0 downto 0); + S0: in STD_LOGIC_vector(0 downto 0); + S1: in STD_LOGIC_vector(0 downto 0); + A: out STD_LOGIC_vector(0 downto 0); + B: out STD_LOGIC_vector(0 downto 0); + C: out STD_LOGIC_vector(0 downto 0); + D: out STD_LOGIC_vector(0 downto 0) + ); +end t_demux; + +architecture bhv of t_demux is +begin +process (F,S0,S1) is +begin + if (S0 ="0" and S1 = "0") then + A <= F; + elsif (S0 ="1" and S1 = "0") then + B <= F; + elsif (S0 ="0" and S1 = "1") then + C <= F; + else + D <= F; + end if; + +end process; +end bhv;
\ No newline at end of file |