Question

In: Electrical Engineering

Write the VHDL PROCESS statements for a D flip-flop with synchronous active-LOW clear, synchronous active-LOW preset,...

Write the VHDL PROCESS statements for a D flip-flop with synchronous active-LOW clear, synchronous active-LOW preset, and responsive to a rising edge clock. Use D for the input, Q for the output, PRE for the preset, CLR for the clear, and CLK for the clock. All signals are BIT type

Solutions

Expert Solution

--library declaration for the module.

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

--This is a D Flip-Flop with Synchronous Reset,Set and Clock Enable(posedge clk).

--Note that the reset input has the highest priority,Set being the next highest

--priority and clock enable having the lowest priority.

entity example_FDRSE is

port(

Q : out std_logic; -- Data output

CLK :in std_logic; -- Clock input

CE :in std_logic; -- Clock enable input

RESET :in std_logic; -- Synchronous reset input

D :in std_logic; -- Data input

SET : in std_logic -- Synchronous set input

);

end example_FDRSE;

architecture Behavioral of example_FDRSE is --architecture of the circuit.

begin --"begin" statement for architecture.

process(CLK) --process with sensitivity list.

begin --"begin" statment for the process.

if ( rising_edge(CLK) ) then --This makes the process synchronous(with clock)

if (RESET = '1') then

Q <= '0';

   else

if(SET = '1') then

Q <= '1';

else

if ( CE = '1') then

       Q <= D;

   end if;

       end if;

end if;

end if;

end process; --end of process statement.

end Behavioral;

--library declaration for the module.

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

--This is a D Flip-Flop with Synchronous Reset,Set and Clock Enable(posedge clk).

--Note that the reset input has the highest priority,Set being the next highest

--priority and clock enable having the lowest priority.

entity example_FDRSE is

port(

Q : out std_logic; -- Data output

CLK :in std_logic; -- Clock input

CE :in std_logic; -- Clock enable input

RESET :in std_logic; -- Synchronous reset input

D :in std_logic; -- Data input

SET : in std_logic -- Synchronous set input

);

end example_FDRSE;

architecture Behavioral of example_FDRSE is --architecture of the circuit.

begin --"begin" statement for architecture.

process(CLK) --process with sensitivity list.

begin --"begin" statment for the process.

if ( rising_edge(CLK) ) then --This makes the process synchronous(with clock)

if (RESET = '1') then

Q <= '0';

   else

if(SET = '1') then

Q <= '1';

else

if ( CE = '1') then

       Q <= D;

   end if;

       end if;

end if;

end if;

end process; --end of process statement.

end Behavioral;v


Related Solutions

You are to implement the following in VHDL: D flip-flop D flip-flop       with enable and reset J-K...
You are to implement the following in VHDL: D flip-flop D flip-flop       with enable and reset J-K flip flop with asynchronous set T Flip flop with asynchronous clear
Verify the operation of a D flip-flop by providing appropriate inputs to the D, Preset, and...
Verify the operation of a D flip-flop by providing appropriate inputs to the D, Preset, and Clear pins. Use CLOCK input to the flip-flop to function properly ( can be found under wiring in Logisim) //If you present a diagram designed in the "Logisim app" it would be very much appreciated. Thank you
A T flip-flop is a 1-bit synchronous storage component alternative to the D flip-flop, with a...
A T flip-flop is a 1-bit synchronous storage component alternative to the D flip-flop, with a slightly different interface. The T flip-flop has one input t to synchronously control the state of the flip-flop, as follows: When t is 0, the flip-flop does not change its state value. When t is 1, the flip-flop inverts its current state value (0 becomes 1, and 1 becomes 0). Write a Verilog module for the T flip-flop using a behavioral model. The flip-flop...
Create a VHDL code of a 4 bit Counter using D flip flop and a Frequency...
Create a VHDL code of a 4 bit Counter using D flip flop and a Frequency Divider that provides the clock signal input for counter
Write and verify a behavioral Verilog model of J-K flip-flop with active-low asynchronous reset.
Write and verify a behavioral Verilog model of J-K flip-flop with active-low asynchronous reset.
9. Why is the D flip flop the more common flip flop? 10. What is the...
9. Why is the D flip flop the more common flip flop? 10. What is the purpose of a clock in a digital system?
synchronous/preset/reset/clear vs. asynchronous preset/reset/clear Please explain the difference and the different in VDHL. thank you.
synchronous/preset/reset/clear vs. asynchronous preset/reset/clear Please explain the difference and the different in VDHL. thank you.
Design a synchronously settable flip-flop using a regular D flip-flop and additional gates.
Design a synchronously settable flip-flop using a regular D flip-flop and additional gates.
2. Design a falling-edge triggered SR flip-flop with an active-high asynchronous clear. a) Draw the logic...
2. Design a falling-edge triggered SR flip-flop with an active-high asynchronous clear. a) Draw the logic symbol and a truth table. b) Write a complete VHDL model (entity and behavioral architecture)
Implement the synchronous 2-bit Up/Down counter with saturation at the end states. The flip-flop outputs Q1,...
Implement the synchronous 2-bit Up/Down counter with saturation at the end states. The flip-flop outputs Q1, Q0 serve as the outputs of the counter. The counting direction is set with mode control input M. With M =1 the flip-flop outputs follow the incrementing binary sequence starting from a current state with saturation at state 11 as shown in the following example: 00-> 01-> 10-> 11-> 11-> 11... With M =0 the outputs follow the decrementing binary sequence from a current...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT