Question
please dont write the VHDL code on paper just copy and paste it from the program
Q1 K101 Fig. 2 (b) Use the structural design style to write the VHDL code (entity and architecture) to describe the circuit i
0 0
Add a comment Improve this question Transcribed image text
Answer #1

vhdl code for jk flip flop module:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_arith.all;

entity JKFF is
Port ( CLR,CLK,J,K : in STD_LOGIC;
Q,NQ : out STD_LOGIC);
end JKFF;

architecture Behavioral of JKFF is
begin
process(CLK)
variable temp:std_logic;
begin
if (CLR='1') then
temp:='0';
elsif(clk='1' and clk'event) then
if(J='0' and K='0')then
temp:= temp;
elsif(J='0' and K='1') then
temp:= '0';
elsif(J='1' and K='0') then
temp:= '1';
elsif(J='1' and K='1') then
temp:= not temp;
end if;
end if;
Q<=temp;
NQ<=not temp;
end process;
end Behavioral;

Portmapping according to the given circuit by taking the JKFF as component:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity logic_circuit is
Port ( CLK,CLR : in STD_LOGIC;
Q : out STD_LOGIC);
end logic_circuit;

architecture Behavioral of logic_circuit is
component JKFF is
Port ( CLR,CLK,J,K : in STD_LOGIC;
Q,NQ : out STD_LOGIC);
end component JKFF;

begin
L0: JKFF port map(Q0,NQ0,CLR,CLK,NQ1,1);
L1:JKFF port map(Q1,NQ1,CLR,CLK,1,NQ0);

end Behavioral;

Add a comment
Know the answer?
Add Answer to:
please dont write the VHDL code on paper just copy and paste it from the program...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • AIM: Write a VHDL code for IC7474a positive edge triggering D flip flop. TITLE: IC7474a positive...

    AIM: Write a VHDL code for IC7474a positive edge triggering D flip flop. TITLE: IC7474a positive edge triggering D flip flop. CIRCUIT DIAGRAM: pr_jb clr_1 D clk D Qn D

  • .For the following circuit, do: RR3R2R, Ro G G3G2G,Go Write structural VHDL code. Create two files:...

    .For the following circuit, do: RR3R2R, Ro G G3G2G,Go Write structural VHDL code. Create two files: i) flip flop, ii) top file (where you will interconnect the flip flops and the logic gates). Provide a printout. (10 pts) Write a VHDL testbench according to the timing diagram shown below. Complete the timing diagram by simulating your circuit (Behavioral Simulation). The clock frequency must be 100 MHz with 50% duty cycle. Provide a printout. (15 pts) Ro R1 R2 Ro resetn...

  • Given the following VHDL code, write the simplified Boolean equations for the outputs and sketch the...

    Given the following VHDL code, write the simplified Boolean equations for the outputs and sketch the circuit schematic. entity newFunction is                      /*entity declaration*/ port(a, b, c: in STD_LOGIC;        y:       out STD_LOGIC);        Z:       out STD_LOGIC); end; architecture synth of newFunction is       /*architecture body*/ begin y <= (not a and b and not c) or        (a and b and not c) z <= (a and b and c) or        (not a and b and not c) or...

  • Write a VHDL code using processes for the following logic circuit which include a shift register...

    Write a VHDL code using processes for the following logic circuit which include a shift register and 4x1 multiplexer. Use the entity below.              entity registers_min_max is port( din   : in std_logic_vector(3 downto 0);       reset : in std_logic;       clk   : in std_logic;       sel   : in std_logic_vector(1 downto 0);       reg_out : out std_logic_vector(3 downto 0)); end registers_min_max; din reset RO clk reset R1 A C clk reset R2 clk reset R3 clk 3 0 sel LE

  • Write a test bench for the following VHDL code -------------------------------------------------------------------------------------------------------------------------------- LIBRARY ieee ; USE ieee.std_logic_1164.all ;...

    Write a test bench for the following VHDL code -------------------------------------------------------------------------------------------------------------------------------- LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY registern IS GENERIC (N: INTEGER :=4);    -- INTEGER=32, 16, ….. PORT (D           : IN STD_LOGIC_VECTOR (N-1 downto 0); clk, reset, Load   : IN      STD_LOGIC ; Q           : OUT   STD_LOGIC_VECTOR (N-1 downto 0 )) ; END registern; ARCHITECTURE behavior OF registern IS BEGIN PROCESS (clk) BEGIN IF clk' EVENT AND clk='1' THEN IF (reset ='0') THEN    --synchronous reset Q<=(OTHERS=>’0’); ELSIF (L ='0') THEN Q<=D;...

  • subject: (digital circuit: Sequential LOGIC CIRCUIT.) Question: 1. Write the program code in VHDL to create...

    subject: (digital circuit: Sequential LOGIC CIRCUIT.) Question: 1. Write the program code in VHDL to create a simple OR application with 3 input , complete with its library, entity and architecture! 2. Explain the working principle of PAL and GAL! Search the IC GAL22V10D datasheet! and also Draw and explain the function of the legs of IC GAL22V10D!

  • Type down the code so I can copy it directly please. Dont write on papers or...

    Type down the code so I can copy it directly please. Dont write on papers or dont provide it as screenshots, only type it please. I will upvote too. Thanks. Figure 3 shows the connection between a common anode 7-segment display, three switches and an FPGA. Write the VHDL code that can be used to display odd numbers, given as an input using the three switches, on the 7-segment display. In the case of even numbers, display the letter 'E'....

  • Please Write it in VHDL and complete the following code Create an entity called "regs" where...

    Please Write it in VHDL and complete the following code Create an entity called "regs" where you infer a true dual port (both ports can independently either read or write to any location) memory consisting of 32 16-bit words (64 Bytes). It should have the following black box interface and behavior: entity regs is port clk, en, rst in std_logic; İdl, İd2 : in std logic vector (4 downto 0); __ Addresses wr_enl, wr_ en2 in std logic dinl, din2...

  • Please write in VHDL code: Design the minimal SOP circuit to implement the function F(a,b,c) =...

    Please write in VHDL code: Design the minimal SOP circuit to implement the function F(a,b,c) = MINTERMS(1,5,6,7).Create the gate-level structural architecture named struct1 of your design. Write a testbench to test struct1 above. Hold each input vector constant for 10ns. Your testbench needs verify the correct output for each of the eight input vectors. Your testbench should also include tests for the following transitions: 001->101, 001->110, 001->111, 101->001, 101->110, 101->111, 110->001, 110->101, 110->111, 111->001, 111->101, and 111->110. Hold each of...

  • 1) Based on the sequential circuit and answer the following questions SOV a) Write equations for...

    1) Based on the sequential circuit and answer the following questions SOV a) Write equations for J, K, T, and Z in terms of the input X and the current state given by flip flop outputs QA, QB b) Based on these equations and the properties of JK and Toggle FF's fill out the state table CURRENT NEVT STATE OUTPUT QA QB X- O X=1 X-OX=1 QAQB QAQB 0 0 STATE NEXT STATE OUTPUT c) Based on the State table...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT