Implement D flip-flop with a couple of latches? Write a VHDL
Code for a D flip-flop?

Answers were Sorted based on User's Feedback



Implement D flip-flop with a couple of latches? Write a VHDL Code for a D flip-flop?..

Answer / muthu

ibrary IEEE;
use IEEE.STD_LOGIC_1164.all;

entity gh_DFF is
port(
D : in STD_LOGIC;
CLK : in STD_LOGIC;
rst : in STD_LOGIC;
Q : out STD_LOGIC
);
end gh_DFF;

architecture a of gh_DFF is
begin

process(CLK,rst)
begin
if (rst = '1') then
Q <= '0';
elsif (rising_edge(CLK)) then
Q <= D;
end if;
end process;

end a;

Is This Answer Correct ?    36 Yes 2 No

Implement D flip-flop with a couple of latches? Write a VHDL Code for a D flip-flop?..

Answer / balaji

library ieee;
use ieee.std_logic_1164.all;

entity d_ff is
port(d,clk:in std_logic;
q,q'bar:out std_logic);
end d_ff;

architecture a_d_ff of d_ff is
begin
process(clk)
begin
if rising_edge(clk) then
q<=d;
q'bar<=not d;
end if;
end process;
end a_d_ff;

Is This Answer Correct ?    32 Yes 13 No

Implement D flip-flop with a couple of latches? Write a VHDL Code for a D flip-flop?..

Answer / seetharamukg

D flip-flop can be implemented by using 2 D-Latches.



---------- -----------
--|Din Q |-----|Din Q|---output of Flop
| D-latch1| | D-latch2 |
| ^ | | ^ |
----|----- ----|------
Clk -------------not-----

Is This Answer Correct ?    21 Yes 12 No

Implement D flip-flop with a couple of latches? Write a VHDL Code for a D flip-flop?..

Answer / harvir

ibrary IEEE;
use IEEE.STD_LOGIC_1164.all;

entity gh_DFF is
port(
D : in STD_LOGIC;
CLK : in STD_LOGIC;
rst : in STD_LOGIC;
Q : out STD_LOGIC
);
end gh_DFF;

architecture a of gh_DFF is
begin

process(CLK,rst)
begin
if (rst = '1') then
Q <= '0';
elsif (rising_edge(CLK)) then
Q <= D;
end if;
end process;

end a;

Is This Answer Correct ?    12 Yes 3 No

Implement D flip-flop with a couple of latches? Write a VHDL Code for a D flip-flop?..

Answer / hps

ibrary IEEE;
use IEEE.STD_LOGIC_1164.all;

entity gh_DFF is
port(
D : in STD_LOGIC;
CLK : in STD_LOGIC;
rst : in STD_LOGIC;
Q : out STD_LOGIC
);
end gh_DFF;

architecture a of gh_DFF is
begin

process(CLK,rst)
begin
if (rst = '1') then
Q <= '0';
elsif (rising_edge(CLK)) then
Q <= D; // The latch should_not be included
// ie:- instead of D ; D should used
end if;
end process;

end a;

Is This Answer Correct ?    5 Yes 0 No

Implement D flip-flop with a couple of latches? Write a VHDL Code for a D flip-flop?..

Answer / rakesh

ibrary IEEE;
use IEEE.STD_LOGIC_1164.all;

entity DFlip_Flop is
port(
D : in STD_LOGIC;
CLK : in STD_LOGIC;
rst : in STD_LOGIC;
Q : out STD_LOGIC
);
end DFlip_Flop;

Architecture of DFlip_Flop is

begin

---ANother way of writing code for creating D_Flip_Flop in VHDL

process(Clk, Rst)
begin
if (Rst ='1') then
Q <= '0';
elsif(clk='1' and clk'event) then
Q <= D;
end if;
end process;

end ;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VLSI Interview Questions

For f = AB+CD if B is S-a-1, what r the test vectors needed to detect the fault?

5 Answers   Intel,


If the current through the poly is 20nA and the contact can take a max current of 10nA how would u overcome the problem?

0 Answers   Intel,


Mention what are the different gates where Boolean logic are applicable?

0 Answers  


What is the difference between fifo and the memory?

6 Answers   DewSoft, Intel, Pentagon Rugged Systems,


Given a layout, draw its transistor level circuit. (I was given a 3 input AND gate and a 2 input Multiplexer. You can expect any simple 2 or 3 input gates)

0 Answers   Infosys,






What?s the critical path in a SRAM?

2 Answers   Infosys, Intel, Texas,


what is conductance and valence band?

1 Answers  


A circuit has 1 input X and 2 outputs A and B. If X = HIGH for 4 clock ticks, A = 1. If X = LOW for 4 clock ticks, B = 1. Draw a state diagram for this Spec?

3 Answers   Intel,


Tell me the parameters as many as possible you know that used to character an amplifier?

1 Answers  


How do you size NMOS and PMOS transistors to increase the threshold voltage?

0 Answers   Infosys,


For an AND-OR implementation of a two input Mux, how do you test for Stuck-At-0 and Stuck-At-1 faults at the internal nodes? (You can expect a circuit with some redundant logic)

0 Answers   Infosys,


What are the main issues associated with multiprocessor caches and how might you solve them?

1 Answers   Intel,


Categories