2
\$\begingroup\$

What is the difference between a positive-level D latch and a negative-level D latch?

How to create positive and negative D latch in VHDL using NAND structure? Can you share some example codes for these?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

What is the difference between a positive-level D latch and a negative-level D latch?

Go from the words: The "positive-level D latch" latches the data when the level on the control/clock input is positive. The "Negative-level …" when the level is negative.

How to create…

you use a procedural list, triggered by a sensitivity on high or low state, essentially. This is really VHDL basics, so giving you an example is of little worth.

in VHDL using NAND structure

Note that "VHDL" doesn't care about whether your logic elements is NAND, NOR, 6-bit input logic cells, or elementary school children that you told to behave in a specific way, so that question doesn't in itself make too much sense: Either your technology mapper has a logic mapping that maps to a D-Latch, or it doesn't. Note that in most things you'd define using VHDL, edge triggering is more common.

\$\endgroup\$
1
  • \$\begingroup\$ Also, I should mention that if you did go and wire up a bunch of NAND gates in VHDL, it probably wouldn't work correctly. The tools would likely infer several LUTs instead of a proper D flip flop, and it's unclear if the tools would be able to do the timing analysis properly since it's effectively an async circuit. And even if they did, you would be using a lot more logic resources than you need to, and the achievable clock frequency would be significantly reduced. \$\endgroup\$ Commented Apr 17, 2024 at 5:40

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.