|
|
|
|
|
by kayson
2028 days ago
|
|
Not that this will ever matter for someone who isn't a circuit designer, but the "optimal" solution for the latch is actually really bad. If you use a "select" block (which should really be called "mux") and tie the output to the input, you create a race condition. If the data input is 1, and you change set from 1 to 0, the output can actually glitch to 0 for a very short period of time, which is a big no-no. (If you draw the equivalent circuit out with just nand gates and assume they all have some delay between input and output, you'll see why). A safer solution would be to cross couple two nand gates into an SR latch [0], use another two nand gates to control the Set and Reset signals, and an inverter to create NOT(data). Of course in reality, a latch is usually custom built out of transistors rather than logic gates, but there are some cases where I've used logic-gate-latches to make things easier. </pedanticism> [0] http://electronics-course.com/sr-nand-latch |
|
Especially because the d-flipflops found in standard cell libraries are frequently implemented as what amounts to two muxes and some inverters.
For a design that uses latches as stand-alone components the glitch considerations become a lot more important.