8-Bit Counter VHDL: Cornejo Pillco, Javier Jail 155193

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

8-Bit Counter VHDL

Cornejo Pillco, Javier Jail 155193

February 2, 2018

1 library IEEE;
2 use IEEE.numeric bit.all;
3
4 entity eight bit counter is
5 port(ClrN,LdN,P,T1,Clk: in bit;
6 Din1,Din2: in unsigned(3 downto 0);
7 Count: out integer range 0 to 255;
8 Carry2: out bit);
9 end eight bit counter;
10
11 architecture cascaded counter of eight bit counter is
12 component c74163
13 port(LdN,ClrN,P,T,Clk: in bit;
14 D: in unsigned(3 downto 0);
15 Cout: out bit;Qout: out unsigned(3 downto 0));
16 end component;
17 signal Carry1: bit;
18 signal Qout1,Qout2: unsigned(3 downto 0);
19 begin
20 ct1: c74163 port map(LdN,ClrN,P,T1,Clk,Din1,Carry1,Qout1);
21 ct2: c74163 port map(LdN,ClrN,P,Carry1,Clk,Din2,Carry2,Qout2);
22 Count≤ to integer(Qout2 & Qout1);
23 end cascaded counter;

You might also like