Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below is the code in VHDL for a sn74163 counter modify the code in order for it to act as a sn74162 counter. Must be

Below is the code in VHDL for a sn74163 counter modify the code in order for it to act as a sn74162 counter. Must be written in VHDL!!! ALl the inputs should stay the same only thing you should have to change is if statements and the COUT. PLz show all code!

library ieee;

use ieee.std_logic_1164.all;

use ieee.numeric_std.all;

entity sn74163 is

port(

ClrN: in std_logic;

LdN: in std_logic;

P: in std_logic;

T: in std_logic;

clk: in std_logic;

D: in std_logic_vector(3 downto 0);

Cout:out std_logic; Q: out std_logic_vector(3 downto 0)

);

end sn74163;

architecture behavior of sn74163 is

signal Qint: unsigned(Q'range);

begin

process(clk)

begin

-- note the use of the 'last_value attribute

-- to confirm the previous value of the clock

if( clk'event and clk'last_value='0' and clk='1') then

if(clrN='0') then Qint<="0000";

elsif(LdN='0') then Qint<=unsigned(D);

elsif(P='1' and T='1') then Qint<=Qint+1;

end if;

end if;

end process;

Q<=std_logic_vector(Qint);

Cout<=Qint(3) and Qint(2) and Qint(1) and Qint(0) and T;

end behavior;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago