VHDL Code for : Encoder


Please Copy for code

library ieee;
use ieee.std_logic_1164.all;
use work.callpack.all;

entity encoder is
generic(k:integer:=6);
port(clk:in std_logic;
I:in std_logic_vector(0 to k);
    C:out std_logic_vector(0 to (k+8)));
end entity;

architecture encoder_df of encoder is  
signal ct:integer:=0;
begin
process(I,clk) 
variable temp:std_logic_vector(0 to (k+8));
begin 
if clk='1' and clk'event then
temp(0 to k):=I;
enc(3,I(0) ,I(1), I(3),'0','0','0','0',temp(k+1));
enc(3,I(1) ,I(2), I(4),'0','0','0','0',temp(k+2));
enc(3,I(2) ,I(3), I(5),'0','0','0','0',temp(k+3));
enc(3,I(3) ,I(4), I(6),'0','0','0','0',temp(k+4));
enc(5,I(0) ,I(1), I(3),I(4), I(5),'0','0',temp(k+5));
enc(5,I(1) ,I(2), I(4),I(5), I(6),'0','0',temp(k+6));
enc(5,I(0) ,I(1) ,I(2),I(5), I(6),'0','0',temp(k+7));
enc(3,I(0) ,I(2), I(6),'0','0','0','0',temp(k+8));
C<=temp; 
ct<=ct+1;
if ct=2 then
C(12)<='1';
end if;
end if;
end process;

end architecture ;
VHDL Code for : Encoder VHDL Code for : Encoder Reviewed by Suresh Bojja on 7/11/2016 11:03:00 AM Rating: 5

Subjects & Labs

AC (6) ADS (2) ATMEL (6) AWP (5) C- Language (3) CAO (5) CDAC (1) Cloud Computing (1) CMC (6) CN (10) CONSERVATION & MANAGEMENT Complete Notes (1) Control Sys (2) CVSM (2) Data Analytics (1) DC (5) Digital System Design (3) DIP (17) DLD (10) DLD Lab Manual (1) DS (4) DSD&DICA (9) DSP (6) EDC (45) Electonic Components (2) Embedded (7) EMWTL (6) ENERGY AUDIT (1) Engg. Mechanics (2) Engg.Chemistry (11) Faculty Files (6) Faculty Labs (1) Fuzzy (3) II MID (1) Job Exam Papers (4) LICA (1) Linux OS (1) Materials (1) MATLAB (27) MCU IDE 8051 (1) MEMS (4) MPMC (57) MPMC LAB Manual (3) MTECH (6) MWE (2) OC (1) PDC (9) Projects (8) RADAR (1) Research (9) RVSP (3) SC (1) Softwares (1) SS (1) STLD (18) TCSS (1) TSSN (1) TV Engg (1) VHDL (4) VLSI (8) VLSI Lab manual (1) WCN (1) Wireless Commu. (1) WSN (2)

Contact Form :

Name

Email *

Message *

Theme images by enjoynz. Powered by Blogger.