by using vhdl, Build a counter to count up from 0 to 9, then repeat, using D flip-flops.
State Table:
PRESENT STATE |
NEXT STATE |
||||||
Q3 |
Q2 |
Q1 |
Q0 |
Q3+ |
Q2+ |
Q1+ |
Q0+ |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
X |
X |
X |
X |
1 |
0 |
1 |
1 |
X |
X |
X |
X |
1 |
1 |
0 |
0 |
X |
X |
X |
X |
1 |
1 |
0 |
1 |
X |
X |
X |
X |
1 |
1 |
1 |
0 |
X |
X |
X |
X |
1 |
1 |
1 |
1 |
X |
X |
X |
X |
K Map Simplification for D Flip Flop Inputs
--VHDL code of D Flip Flop
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port ( clock : in
std_logic;
reset : in
std_logic;
din : in
std_logic;
Q : out std_logic
);
end dff;
architecture arch of dff is
begin
process (clock, reset)
begin
if (reset = '1') then
Q <= '0';
else
if rising_edge(clock) then
Q <=
din;
end if;
end if;
end process;
end arch;
------------------------------------------------------------------------------------------------------------------------------------------------------
---Top File
library ieee;
use ieee.std_logic_1164.all;
entity bcd_counter is
port ( clock : in
std_logic;
reset : in
std_logic;
Q : out
std_logic_vector (3 downto 0)
);
end bcd_counter;
architecture arch of bcd_counter is
component dff is
port ( clock : in
std_logic;
reset : in
std_logic;
din : in
std_logic;
Q : out std_logic
);
end component;
signal Q0, Q1, Q2, Q3, D0, D1, D2, D3 : std_logic;
begin
D0 <= not Q0;
D1 <= (not Q3 and not Q1 and Q0) or (Q1 and not Q0);
D2 <= (Q2 and not Q1) or (Q2 and not Q0) or (not Q2 and Q1 and
Q0);
D3 <= (Q3 and not Q0) or (Q2 and Q1 and Q0);
UUT0: dff port map (clock, reset, D0, Q0);
UUT1: dff port map (clock, reset, D1, Q1);
UUT2: dff port map (clock, reset, D2, Q2);
UUT3: dff port map (clock, reset, D3, Q3);
Q <= (Q3 & Q2 & Q1 & Q0);
end arch;
----------------------------------------------------------------------------------------------------------------------------------------------
by using vhdl, Build a counter to count up from 0 to 9, then repeat, using...
2. Synchronous Counters: a. Design a count up/count down counter that counts from 0 up to 4, then 4 down to 0 using D flip flop. b. Design a count up counter that counts from 0 up to 12 using JK flip flops.
Digital Logic Design Design a 0-9 counter using four D flip flops. The counter should run on the SCLK output of the clock divider. It should have a four-bit binary output that increments from 0 to 9 one step on each clock cycle. When it reaches the value of 9, it should restart a 0 on the next clock cycle. Hint: consider using D flip flops with a reset input and using logic to reset the flip flops when the...
Design a two-bit up/down binary counter using D flip-flops that can count in binary from 0 to 7. When the control input x is 0, the circuit counts down, and when it is 1, the circuit counts up. (a) Obtain the state table of the two-bit counter. (b) Obtain the state diagram (c) Draw the logic diagram of the circuit.
Please design a 4 bit synchrous counter (0-9 count) using t flip flops. Counter should reset to 0 after 9. Kindly provide all steps including state table. I will be thankful to you.
Design serial (asynchronous) counter modulo 7 using synchronous flip-flops (T, D or JK). The counter should count up.
(a) Design an asynchronous Binary Coded Decimal (BCD) count-up counter using JK flip-flops. Draw the counter circuit clearly showing the configuration of the JK flip-flops and the necessary logic gate(s). Sketch the input and output waveforms of this counter (7 Marks) (b) The binary up/down counter for a cargo lift controller in a 7-storey building has an up-down (UID) control input and a buzzer output (B). The buzzer will sound B 1) when the lift is at level 1 or...
Design C-1 (modulo-10 up-counter): Using the behavioral VHDL coding, create an up-counter to count upward. The up counter has the following control inputs En.reset, CLK. The counting outputs are Q0, O1, Q2. and O3 reset clears the outputs of the counter to 0. En enables the counting when En-1. When En-0, the counter stops. The counter sequentially counts all the possible numbers and loops again, from 0 to 9, back to 0 and 9, etc Design C-2: Ten-second Counter with...
Design a counter to count-up from 2 to 5 using 3 D Flip-Flops similar to the following sample: Important Steps: After you simplify D2, D1 and DO by kmap Have a piece of paper to draw it then open iCircuit to design it using BCD If it works well as a counter, copy the design from iCircuit and paste it here. 3-Bit Counter Using D Flip-Flop: The State Equation of D Flip-Flop: Q(t+1)=D(t) => Dn=An Count Up From 3 To...
Q3. Synchronous Counter Figure 8.3(a) shows a modulo-8 synchronous up-counter (Modulo-8 because this counter can count only from 0 to 7 with its 3 bits qo, q1 and 92.). Treat each gray cell in the figure as a component and write generic VHDL codes to create a modulo-2N counter, where N is the number of flip-flops required. Use nominal mapping for this problem while instantiating components. When the asynchronous reset signal rst is high, the counter is set to 0...
Design and build a sequential circuit in Logisim to count in the following manner: Q(t + 1) = (Q(t) + 5) MOD 9. That is, your circuit should count 0, 5, 1, 6, 2, 7, 3, 8, 4, and 0 (then it will repeat). To build this circuit, we will be using JK flip flops.