What is a D-latch? Write the VHDL Code for it?

Answer Posted / bhushan

D-Latch is a level sensitive flip-flop.
output changes as long as clock is High(for +ve level
sensitive) or High(for -ve level sensitive)


library ieee;
use ieee.std_logic_1164.all;

entity D_latch is
port (
clk : in std_logic;
d : in std_logic;
q : out std_logic
);
end D_latch;

architecture arch_D_latch of D_latch is
begin
process(d,clk)
begin
-- +ve level sensitive
if(clk = '1') then
q <= d;
else
q <= q;
end if;
end process;

end arch_D_latch;

Is This Answer Correct ?    23 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the above code synthesize to?

2028


Insights of a 4bit adder/Sub Circuit?

2855


Draw the stick diagram of a NOR gate. Optimize it

766


Explain how logical gates are controlled by Boolean logic?

634


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

676






Basic Stuff related to Perl?

2411


What is the critical path in a SRAM?

2625


In Verilog code what does “timescale 1 ns/ 1 ps” signifies?

697


Draw a 6-T SRAM Cell and explain the Read and Write operations

805


Explain the working of 4-bit Up/down Counter?

4003


what is Slack?

711


Explain what is the use of defpararm?

665


Let A & B be two inputs of the NAND gate. Say signal A arrives at the NAND gate later than signal B. To optimize delay, of the two series NMOS inputs A & B, which one would you place near the output?

888


In a SRAM layout, which metal layers would you prefer for Word Lines and Bit Lines? Why?

3604


What are the Advantages and disadvantages of Mealy and Moore?

714