0% found this document useful (0 votes)
73 views4 pages

Aim:-Program To Implement An Encoder

This document describes a program to implement an 8-3 encoder. The entity encoder_8_3 has an 8-bit input port a and a 3-bit output port q. The architecture uses a case statement to assign the appropriate 3-bit output code to q depending on the value of the 8-bit input a, effectively encoding it to a 3-bit representation. Diagrams of the register-transfer level schematic and internal technology scheme of the encoder are also mentioned.

Uploaded by

shahbunaf
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views4 pages

Aim:-Program To Implement An Encoder

This document describes a program to implement an 8-3 encoder. The entity encoder_8_3 has an 8-bit input port a and a 3-bit output port q. The architecture uses a case statement to assign the appropriate 3-bit output code to q depending on the value of the 8-bit input a, effectively encoding it to a 3-bit representation. Diagrams of the register-transfer level schematic and internal technology scheme of the encoder are also mentioned.

Uploaded by

shahbunaf
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

AIM :- PROGRAM TO IMPLEMENT AN ENCODER

library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all;

entity encoder_8_3 is Port ( a : in STD_LOGIC_VECTOR (7 downto 0); q : out STD_LOGIC_VECTOR (2 downto 0)); end encoder_8_3;

architecture Behavioral of encoder_8_3 is

begin q<="000" when a="00000001" else "001" when a="00000010" else "010" when a="00000100" else "011" when a="00001000" else "100" when a="00010000"else "101" when a="00100000" else "110" when a="01000000" else "111";

end Behavioral;

FIG (5.1) SHOWING RTL SCHEMATIC OF AN ENCODER

FIG(5.2) SHOWING INTERNAL TECHNOLOGY SCHEME OF FIG(5.1)

You might also like