Question

2-(74196) write the code in VHDL Design and implementation of Pressetable ripple counter using behavioral style...

2-(74196) write the code in VHDL Design and implementation of Pressetable ripple counter using behavioral style of modeling by using pic74196.

Homework Answers

Answer #1
library ieee;
use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all;
-- ~ --
entity ripple_cnt is
  generic (
    n : natural := 4
  );
  port (
    clk   : in std_logic;
    clear : in std_logic;

    dout  : out std_logic_vector(n-1 downto 0)
  );
end ripple_cnt;
-- ~ --
architecture arch_rtl of ripple_cnt is
  -- signals declaration
  signal clk_i, q_i   : std_logic_vector(n-1 downto 0);

begin
  -- clocks
  clk_i(0)            <= clk;
  clk_i(n-1 downto 1) <= q_i(n-2 downto 0);

  -- flip-flops
  gen_cnt: for i in 0 to n-1 generate
    dff: process(clear, clk_i)
    begin
      if (clear = '1') then
        q_i(i) <= '1';
      elsif (clk_i(i)'event and clk_i(i) = '1') then
        q_i(i) <= not q_i(i);
      end if;
    end process dff;
  end generate;
  
  -- output
  dout <= not q_i;
  -- ~ --
end arch_rtl;
Know the answer?
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
Similar Questions
write and explant for me each part of the code to understood the code (write the...
write and explant for me each part of the code to understood the code (write the sample code in VHDL Design and implementation of Pressetable ripple counter using behavioral style of modeling by using pic74196)
write the truth table of 3-(7494) of 4 bit shift register using VHDL Behavioral style of...
write the truth table of 3-(7494) of 4 bit shift register using VHDL Behavioral style of modeling.
design 4 bit shift register IC 5495 using behavioral style in VHDL
design 4 bit shift register IC 5495 using behavioral style in VHDL
Write the VHDL code implementing a 6-bit synchronous counter with enable. The design should include the...
Write the VHDL code implementing a 6-bit synchronous counter with enable. The design should include the output to be connected to the next stage Then update the code to include an asynchronous reset
Ripple Counters and T-FFs. (a) Design a 5-bit ripple down-counter using T Flip-Flops and no other...
Ripple Counters and T-FFs. (a) Design a 5-bit ripple down-counter using T Flip-Flops and no other components. (b) Design a 5-bit ripple up-counter using T Flip-Flops and no other components. (c) What limits the maximum counting speed of your ripple counters? (d) Design a T Flip-Flop using only a D flip-flop with no extra logic gates.
Model 74LS164- an 8-Bit Serial In/Parallel Out Shift Register using behavioral style using VHDL, create a...
Model 74LS164- an 8-Bit Serial In/Parallel Out Shift Register using behavioral style using VHDL, create a test bench to apply various stimulus to it, and demonstrate its functionality for various test cases through simulated waveform and configuration on the DE2-115 target board.
Write a VHDL code for a Traffic Light
Write a VHDL code for a Traffic Light
VIVA QUESTIONS: 1. Implement the following function using VHDL coding. (Try to minimize if you can)....
VIVA QUESTIONS: 1. Implement the following function using VHDL coding. (Try to minimize if you can). F(A,B,C,D)=(A'+B+C). (A+B'+D'). (B+C'+D') . (A+B+C+D) 2. What will be the no. of rows in the truth table of N variables? 3. What are the advantages of VHDL? 4. Design Ex-OR gate using behavioral model? 5. Implement the following function using VHDL code f=AB+CD. 6. What are the differences between half adder and full adder? 7. What are the advantages of minimizing the logical expressions?...
Design a 4 to 16 decoder using Verilog HDL. The inputs are a four-bit vector W=...
Design a 4 to 16 decoder using Verilog HDL. The inputs are a four-bit vector W= [w1 w2 w3 w4] and an enable signal En. The outputs are represented by the 16-bit vector Y= [y0 y1 …..y15]. a) Write Verilog HDL behavioral style code for 2-to-4 decoder. b) Write Verilog HDL behavioral style code for 4-to-16 decoder by instantiation of 2-to-4 decoders.
Design a 4 to 16 decoder using Verilog HDL. The inputs are a four-bit vector W=...
Design a 4 to 16 decoder using Verilog HDL. The inputs are a four-bit vector W= [w1 w2 w3 w4] and an enable signal En. The outputs are represented by the 16-bit vector Y= [y0 y1 …..y15]. a) Write Verilog HDL behavioral style code for 2-to-4 decoder. b) Write Verilog HDL behavioral style code for 4-to-16 decoder by instantiation of 2-to-4 decoders.