1
\$\begingroup\$

They both seem identical - they both have an "enable" and a single input. When enable is high, the value stored in the element is set to the input. Are they functionally different in any way? (I know they are implemented differently, but I want to know if there is a difference in functionality)

\$\endgroup\$
0
1
\$\begingroup\$

An SRAM cell is functionally equivalent to a D latch (but not to a D-type master-slave flip-flop).

As you say, the implementation details are different: An SRAM cell is typically built so that it is written and read using the same pair of wires ("bit lines") — the difference is whether or not the bit lines are being driven by the control circuitry. On the other hand, a D latch normally uses separate wires for input and output, and the "write enable" logic is built right into it.

\$\endgroup\$
0
\$\begingroup\$

A typical D latch will have a single data input along with an enable; internal logic will combine those so as to yield "write-zero" and "write-one" behaviors. An SRAM cell will have one or two bidirectional data wires and one or two enable signals (if two, one will control each data wire; if one, it will control both. To read a memory cell, drive an enable signal while "floating" the data wire; the memory cell will drive the wire with its current state. To write a memory cell, drive the data wire which should be low with a transistor that is stronger than the P-transistors in the memory cell and drive its enable.

Making an SRAM array can support two simultaneous independent reads requires only adding the additional wire necessary to give each cell two independent enables. The extra wire often isn't "free" (it may require spacing things out a little wider than would otherwise be necessary) but it's still a cheap way of allowing dual-read capability. Performing a write, however, generally requires using both data wires, since one of them can only be used to turn zeroes to ones, and the other can only be used to turn ones to zeroes. It would probably be possible to design a memory system which could write ones to selected bits of location XX while reading YY, or read location XX while writing zeroes to selected bits of location YY, or write ones to selected bits of location XX while writing zeroes to an independent set of bits of location YY, but I'm unaware of such designs being used in practice even though there are many situations where they could be useful.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.