Question: Project VHDL Sequential Logic Follow the instructions below. Use the attached VHDL files as a basis for the project. ( The instructions are shown in
Project VHDL Sequential Logic
Follow the instructions below.Use the attached VHDL files as a basis for the project.
The instructions are shown in the imageas well as the testbench code and design
Please Provide the modified testbench code and design
The objective for this assignment is to implement a clocked JKFlip Flop in VHDL using the test bench code given
C Question: Clocked JKFlipflop
Use the circuitVHDL code below againfound on the page with this assignmentto implement a clocked JKflipflop. See the diagram below:
NOTE: LEAVE THE RESET ALONE, DO NOT CHANGE THE WIRING FOR ITYOU WILL HAVE TO TRIGGER THE RESET WHENEVER J OR K CHANGES, HOWEVER!! Basically you are treating the circuit beling supplied to you as the box in the circuit diagram above. For a JK flipflop
J K D OutputQQcomplement of previous output Q no change to output Table : JK Flipflip Truth Table. Output always next clock edge after input
THE TEST BENCH CODE
LIBRARY ieee;
USE ieee.stdlogicALL;
ENTITY DFFtb IS
END DFFtb;
ARCHITECTURE behavior OF DFFtb IS
COMPONENT Dlatchnand
PORT
D : IN stdlogic;
Reset : IN stdlogic;
Q : OUT stdlogic;
clock : IN stdlogic;
;
END COMPONENT;
signal din : stdlogic :;
signal clk : stdlogic :;
signal rst : stdlogic :;
signal dout : stdlogic;
constant clkperiod : time :ns;
BEGIN
uut: Dlatchnand PORT MAP
D din
Reset rst
Q dout
clock clk
;
clkprocess :process
begin
for i in to loop
clk ;
wait for ns;
clk ;
wait for ns;
end loop;
wait;
end process;
stimproc: process
begin
set upstore zero
rst ;
din ;
wait for ns;
read a zero, ignore input
rst ;
din ;
wait for ns;
ignore input, still output zero
rst ;
din ;
wait for ns;
ignore input, still output zero
rst ;
din ;
wait for ns;
store a
rst ;
din ;
wait for ns;
ignore input, read a
rst ;
din ;
wait for ns;
store zero again
rst ;
din ;
wait for ns;
read a zero, ignore input
rst ;
din ;
wait for ns;
store a
rst ;
din ;
wait for ns;
ignore input, read a
rst ;
din ;
wait for ns;
wait;
end process;
END;
DESIGN CODE
library IEEE;
use IEEE.STDLOGICALL;
entity Dlatchnand is
Port D : in STDLOGIC;
Reset : in STDLOGIC;
Q : inout STDLOGIC;
clock : in STDLOGIC;
end Dlatchnand;
architecture Behavioral of Dlatchnand is
signal notQ : STDLOGIC;
signal SR : STDLOGIC;
signal intermedTop, intermedBottom : STDLOGIC ;
begin
intermedBottom not D and reset and R;
intermedTop S nand intermedBottom ;
AND gates for enable
S not clock and Reset and intermedTop;
R not clock and S and intermedBottom;
SR latch
Q S nand notQ;
notQ not R and Q and Reset;
end Behavioral;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
