answersLogoWhite

0

What is VHDL program for 4 to 16 decoder?

Updated: 10/3/2023
User Avatar

Ramarav

Lvl 1
11y ago

Best Answer

entity decoder3x8 is

port ( ctrl : in std_logic_vector (2 downto 0);

z : out std_logic_vector (7 downto 0) );

end decoder3x8;

architecture dec3x8_Dflow of decoder3x8 is

begin

z <= "00000001" when ctrl = "000" else

"00000010" when ctrl = "001" else

"00000100" when ctrl = "010" else

"00001000" when ctrl = "011" else

"00010000" when ctrl = "100" else

"00100000" when ctrl = "101" else

"01000000" when ctrl = "110" else

"10000000" ;

end dec3x8_Dflow;

-- the above code is dataflow modelling...still other modelling, ie structural and

--sequential

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity dec2to4df is

Port ( en1 : in STD_LOGIC;

a : in STD_LOGIC_VECTOR (1 downto 0);

z : out STD_LOGIC_VECTOR (3 downto 0));

end dec2to4df;

architecture df of dec2to4df is

begin

z(0)<= (not (en1))and(not a(1)) and (not a(0));

z(1)<= (not (en1))and (not a(1)) and a(0) ;

z(2)<= (not (en1))and a(1) and (not a(0));

z(3)<= (not (en1))and a(1) and a(0);

end df;

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity dec3to8 is

port(G1,G2a_l,G2b_l:in std_logic;

A: in STD_LOGIC_VECTOR(2 downto 0);

Y: out STD_LOGIC_VECTOR(0 to 7));

end dec3to8;

architecture behv of dec3to8 is

signal y_l:STD_LOGIC_VECTOR(0 to 7);

signal G:STD_LOGIC;

begin

process(G1,G2a_l,G2b_l,A,G)


begin

G<=(G1 and (not(G2a_l)) and (not(G2b_l)));

case A is

when "000"=>Y_l <= "01111111";

when "001"=>y_l <= "10111111";

when "010"=>y_l <= "11011111";

when "011"=>y_l <= "11101111";

when "100"=>y_l <= "11110111";

when "101"=>y_l <= "11111011";

when "110"=>y_l <= "11111101";

when "111"=>y_l <= "11111110";

when others=>y_l<= "11111111";

end case;

if (G='1') then y<=not(y_l);

else

y<="00000000";

end if;

end process;

end behv;

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity dec4to16 is

Port ( en : in STD_LOGIC;

i : in STD_LOGIC_VECTOR (3 downto 0);

y : out STD_LOGIC_VECTOR (15 downto 0));

end dec4to16;

architecture struct of dec4to16 is

signal n1,n2,n3,n4,n5:std_logic;

signal s:std_logic_vector(3 downto 0);

component dec2to4

Port ( en1 : in STD_LOGIC;

a : in STD_LOGIC_VECTOR (1 downto 0);

z : out STD_LOGIC_VECTOR (3 downto 0));

end component;

component notg

Port ( p : in STD_LOGIC;

q : out STD_LOGIC);

end component;

begin

u1:notg port map (en,n1);

u2:dec2to4 port map (n1,i(3 downto 2),s(3 downto 0));

u3:notg port map(s(3),n2);

u4:notg port map(s(2),n3);

u5:notg port map(s(1),n4);

u6:notg port map(s(0),n5);

u7:dec2to4 port map(n2,i(1 downto 0),y(15 downto 12));

u8:dec2to4 port map(n3,i(1 downto 0),y(11 downto 8));

u9:dec2to4 port map(n4,i(1 downto 0),y(7 downto 4));

u10:dec2to4 port map(n5,i(1 downto 0),y(3 downto 0));

end struct;

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is VHDL program for 4 to 16 decoder?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is VHDL program for 64 to 1 multiplexer using four 4 to 1 multiplexers?

Personally describing VHDL code for multiplexer can be quite difficult without prior knowledge. It takes many VHDLs to be a multiplexer.


4 Difference between c program and vhdl program?

There are 4 main differences between C programming and VHDL programming. C is a mid-level language, while VHDL is a hardware description language. C can handle one type of instruction, while VHDL can handle two. C does not require as much resource usage as VHDL. C can be written only with logical thinking, but a VHDL programmer must understand hardware circuits.


Impliment 8 into 256 decoder using decoder circuit?

8:256 decoder circuit can be implemented by using 4:16 decoder circuit


How can one make 6-to-64 decoder with the help of 4-to-16 decoders?

for design 6-to-64 decoder we need four 4-to-16 decoders for last stage and one 2-to-4 decoder for selecting each of them..


Number of control lines for a 16 output decoder?

4


Why does your LCD not isplay the full picture from your decoder It is zoomed by default and I cant reset it?

Oh I had to change the settings on the decoder to send the signal as 4:3 instead of 16:9


How can I program 4 x 16 decoder in VHDL?

There are many different optional codes. Here are brought three of them.1st - 2:4 decoder using "enable" :entity DECODER isport (A, B, Enable : in std_logic ;Out : out std_logic_vector(3 downto 0));end DECODER;architecture ARC.DECODER of DECODER isbeginOut(0)


How do you do the decoder on Poptropica?

Click on the decoder 4 times the type in 130928:):):):):) I hope this helped:):):)


How can you design 4-to-16 decoder with five 2-to-4 decoder?

It turned out to be very easy))) But I was thinking for a while to solve the problem... )))Ok. Lets say we have inputs S3..S0. Let S3 and S2 go to inputs of each of FOUR of decoders; and S1 with S0 go to the inputs of the FIFTH decoder. The four outputs of the FIFTH decoder go to enable lines of the four decoders. Voila! It might be confusing, but just draw the whole thing and you'll see. Now you just need to enable the fifth decoder... HA-HA!


How do you make a decoder with symbols?

To create a decoder with symbols, you need to assign a unique symbol to each input combination of the decoder. For example, in a 2-to-4 decoder, you could use symbols like A, B, C, and D to represent the output signals corresponding to the input combinations. By using symbols that are easy to understand and differentiate, you can effectively represent the decoder's logic and functionality.


How do you make 3 8 decoder?

Use two 2-4 decoders.


What are the release dates for Grim and Evil - 2001 Happy Huggy Stuffy Bears Secret Decoder Ring 4-4?

Grim and Evil - 2001 Happy Huggy Stuffy Bears Secret Decoder Ring 4-4 was released on: USA: 15 April 2005