- Learn
- Engineering
- Electrical Engineering
- Digital Logic Design
- Memory and Programmable Logic
Memory and Programmable Logic
BeginnerLesson 6 of 7 in Digital Logic Design Course
What you will learn
- Describe a random-access memory by its words, address lines and data lines, follow its read and write cycles in time, and compare static and dynamic RAM.
- Describe a memory by its words, addresses and data linesSize a memory as words times bits, find the address and data lines it needs, and use its control inputs to read or write one word.
- Follow read and write cycles in timeRead memory timing diagrams, distinguish access time from cycle time, and count how many clock periods a processor must allow for each memory operation.
- Compare static and dynamic RAMExplain how SRAM and DRAM keep their data, why DRAM needs refresh and sends its address in two halves, and where each type is used.
- Describe a memory by its words, addresses and data lines
- Build a memory from storage cells and a decoder, cut the decoding logic with row and column selection, and combine chips into larger memories with a clear address map.
- Build a small RAM from cells and a decoderModel a memory cell as a one-bit storage element with select and read/write control, and connect cells, a decoder and output gates into a word-organized array with one or more ports.
- Select words with coincident (row and column) decodingArrange cells in a two-dimensional array selected by a row decoder and a column decoder, locate a word from its address, and compare the decoder cost with linear decoding.
- Combine memory chips into larger memoriesWiden words by placing chips side by side, add words with a decoder on the upper address bits, and work out the address range that each chip answers.
- Build a small RAM from cells and a decoder
- Protect stored words with parity and Hamming codes: add check bits, find and correct a single-bit error, and detect double-bit errors.
- Detect errors with a parity bitGenerate and check even and odd parity, and explain which errors a single parity bit can and cannot detect.
- Build a Hamming code wordFind how many check bits a word needs, place them at the power-of-two positions, and compute each one from the positions it covers.
- Locate and correct errors with the syndromeRecheck the parity groups of a word read from memory, read the result as the position of a single error, and add an overall parity bit to detect double errors.
- Detect errors with a parity bit
- Describe how a ROM is built and which kinds exist, and implement a combinational circuit by storing its truth table in a ROM.
- Describe ROM structure and typesExplain a ROM as a decoder feeding programmable OR connections, find its size, and compare mask ROM, PROM, EPROM, EEPROM and flash.
- Implement a combinational circuit with a ROMTurn a truth table into ROM contents, reduce the ROM size by spotting outputs that need no storage, and judge when a ROM is a sensible way to build a function.
- Describe ROM structure and types
- Program sum-of-products functions into programmable AND and OR arrays, work within each device's product-term limits, and add flip-flops for sequential designs.
- Program a PLARead programmable-logic array notation, size a PLA by its inputs, product terms and outputs, and write the programming table for a set of functions that share product terms.
- Fit functions into a PALImplement functions in a PAL's programmable AND array and fixed OR gates, respect the product-term limit of each output, and use feedback when a function needs more terms.
- Add flip-flops: registered PLDs and CPLDsExplain how macrocells with flip-flops make programmable devices sequential, how a CPLD joins many PAL-like blocks, and how to choose among ROM, PLA, PAL, CPLD and FPGA.
- Program a PLA
- Explain how lookup tables, flip-flops, programmable routing and embedded blocks let an FPGA implement a design, and how that configuration is stored, loaded and produced.
- Implement logic with lookup tables and logic blocksExplain a lookup table as a small memory that holds a truth table, fill one for a given function, split larger functions across several tables, and describe what a logic block adds.
- Explain FPGA routing, embedded blocks and configurationDescribe the programmable interconnect, input/output blocks, block RAM, DSP and clock resources, how the configuration is stored and loaded, and how a design is turned into a configuration.
- Implement logic with lookup tables and logic blocks
Memory and Programmable Logic study guide
1Size a RAM and follow its operations
A memory interface has to answer three questions: which word is selected, which bits move, and when they are safe to use. You will connect word counts to address lines, follow the signals during reads and writes, and turn memory timing into clock periods. SRAM and DRAM then show two ways to keep the same binary information, with different demands on the hardware that controls it.
1.1 Read memory sizes and select a word
A memory word is a group of bits stored and accessed together. Its address identifies its location; the address is separate from the value stored there. Writing a different value changes the word's contents, not its address.
Count words and bits separately
A memory contains words, each bits wide. The address lines choose one word. The data lines carry all its bits together. Some chips have separate input and output data lines; others use one bidirectional set.
For a RAM, 64K means words. It needs 16 address lines and 16 data lines. Its capacity is
Dividing by eight gives 131,072 bytes, or 128 KiB. The highest address is 65,535 because numbering starts at zero.
The binary prefixes Ki, Mi, and Gi explicitly mean powers of 1,024. Thus 1 KiB is 1,024 bytes, while 1 kB is 1,000 bytes. In memory word counts, K, M, and G conventionally mean , , and . Reading 64K as 64,000 gives a capacity about 2.3% too small.
Choose enough address patterns
Address lines depend on words, not total bits. Both a memory and a memory need 20 address lines. The second has wider data paths, not more locations.
For a word count that is not a power of two, choose the smallest whole number of lines that gives enough patterns. A 5,000-word memory needs 13 lines: 12 give only 4,096 addresses; 13 give 8,192. Some address patterns will be unused. In symbols, the line count is for words.
Tell the chip what to do
Memory enable, also called chip select, activates the chip. A read/write input chooses the operation. One common active-high enable interface behaves as follows:
| Enable | Read/write | Operation |
|---|---|---|
| 0 | Either | No operation |
| 1 | 0 | Write |
| 1 | 1 | Read |
Other interfaces use active-low signals such as , , and . Their asserted level is zero. Read the signal names and function table before assigning levels. An inactive chip normally releases its output pins into high impedance, so another chip can drive the shared data lines.
To write, apply an address and data, then activate the write control with the required timing. Writing 1010 at address 2 of a RAM replaces only word 2. To read, apply address 2 and enable reading; the outputs provide a copy of 1010, and the stored word remains intact.
Random access means a word is reached directly from its address without stepping through earlier words. RAM is volatile and loses its contents without power; ROM is nonvolatile. A RAM can be pictured as registers plus a selection decoder, but its compact storage cells allow much greater capacity than a bank of ordinary flip-flops.
Key Takeaways
- Capacity equals word count times bits per word.
- Address lines select words; data lines carry a word.
- K in a memory word count means 1,024; kB means 1,000 bytes.
- Signal polarity determines which control level is active.
- A read copies the selected word; a write replaces it.
1.2 Decide when memory data is ready
A correct address does not make data valid immediately. Memory operations take time, and the circuit using the memory must respect both the delay before data is ready and the interval before another operation may begin.
Access time and cycle time
Access time runs from applying a new address, with reading enabled, until the selected word is valid. Cycle time is the minimum interval between the starts of successive operations. Cycle time is at least as long as access time and may include extra recovery time.
Suppose access time is 25 ns and cycle time is 35 ns. A read started at time zero can supply valid data at 25 ns, but the next operation cannot start until 35 ns. Sampling the first word at 30 ns may work; starting a second operation then violates the cycle time. One nanosecond is s.
Follow an asynchronous read
An asynchronous RAM has no clock input. It responds to its address and control signals. A processor may use its own clock to schedule those signals, but that does not turn the memory into a synchronous device.
Start by making the address stable and enabling the chip for reading. Wait until the specified access delay has elapsed. Only then capture the output bits. If the processor captures at 30 ns, a 25 ns access time meets that data-valid deadline; a 35 ns access time does not. The output can still show an old word or changing values before the deadline.
Follow an asynchronous write
- Apply the address and let it settle.
- Enable the chip and assert write.
- Keep the intended data stable for the required setup time before write ends.
- Keep it stable for the required hold time after write ends.
- Allow the complete cycle time before starting another operation.
Setup time is the required stable interval before the relevant event; hold time is the interval after it. The datasheet identifies that event and the address timing limits. Changing the address while write is active risks writing the wrong word or corrupting more than one location.
Convert timing into clock periods
At 100 MHz, a clock period is
A 35 ns memory cycle spans 3.5 periods, so allow four whole periods, or 40 ns. Three periods provide only 30 ns. The required count is : always round up. Check the data-capture time separately from the start-to-start cycle interval; meeting one does not establish the other.
Recognize a synchronous interface
A synchronous RAM samples address, data, and control on clock edges. Its latency specifies when a requested word becomes available in clock cycles. The device timing diagram identifies the edge associated with a result and the finite output delay after that edge. Optional output registers can add another cycle, so the controller must use the configured latency.
SDRAM and FPGA block RAM use clocked interfaces. Their surrounding logic must match the configured read latency; it cannot treat a clocked memory as an immediate combinational lookup.
Key Takeaways
- Access time measures data readiness; cycle time limits successive starts.
- Asynchronous RAM responds to signals without its own clock.
- Respect write setup, hold, and address stability.
- Round the number of clock periods up.
- Synchronous memory returns data at a specified cycle latency.
1.3 Compare SRAM and DRAM storage
SRAM and DRAM both store writable binary data, and both lose it when power is removed. Their difference is how a powered cell keeps its bit. That difference explains refresh, density, and the interface used to reach the data.
Keep a stable state or restore charge
Static RAM (SRAM) uses a bistable storage element that behaves like a latch. It remains in either stable state while powered, without periodic refresh. Dynamic RAM (DRAM) stores a bit as charge on a capacitor. Charge leaks, so the memory must restore it before it becomes too small to distinguish reliably.
| Feature | SRAM | DRAM |
|---|---|---|
| Storage principle | Bistable state | Capacitor charge |
| Periodic refresh | Not needed | Required |
| Cell size | Larger | Smaller |
| Typical trade-off | Fast, simpler control | Dense, low cost per bit |
| Typical use | Small on-chip memories | Large main memory |
SRAM's speed and simple control suit register files and buffers inside processors and FPGAs. DRAM's smaller cells put more bits on a chip and reduce cost per bit. The word “static” describes the absence of refresh while powered; it does not mean the data survives a power failure.
Budget refresh time
Refresh reads and restores rows automatically. A controller or internal refresh circuit schedules it; software does not rewrite every word. Refresh preserves the data but temporarily occupies the affected memory resources.
For an example DRAM organized into 8,192 rows with a 64 ms refresh window, an evenly spaced schedule gives
That is about 7.8 µs between row refreshes. A 64 ms window is common for DDR3 and DDR4 at normal temperature; the device specification sets the actual requirement. A real refresh command can service a device-defined group of rows, so the example's row count describes this organization.
DRAM reads also disturb the stored charge. The chip restores the row as part of the read operation. From the outside, a completed read leaves the stored word unchanged, just as an SRAM read does.
Send an address in parts
A DRAM can reduce pin count through address multiplexing. The row and column parts of the address arrive at different times on the same physical pins. RAS, the row address strobe, marks the row part; CAS, the column address strobe, marks the column part.
Consider one-bit words arranged as 1,024 rows by 1,024 columns. Selecting a row takes 10 bits and selecting a column takes another 10. The full logical address still contains 20 bits. Sending the two 10-bit parts over the same pins uses only 10 address pins, plus the control interface.
This saving is in package pins, not storage locations or logical address information. Supplying only one 10-bit part would identify a row or a column, not one bit in the complete array.
Key Takeaways
- SRAM needs power but no refresh; DRAM needs both.
- DRAM refresh restores charge and occupies memory resources.
- DRAM restores a disturbed row during a read.
- Address multiplexing reuses pins for row and column bits.
2Build memory arrays and combine chips
A decoder turns a binary address into the selection of a storage location. Following that selection from one-bit cells to a large array explains word lines, bit lines, and memory ports. Row and column decoding reduces the selection logic inside a chip. Outside the chip, width and depth expansion use the same selection principles to build a larger memory with a predictable address map.
2.1 Trace a word through cells and a decoder
At the logic level, a binary cell stores one bit. It has select and read/write controls, a data input, and a data output. Connecting many such cells makes a word-addressed memory whose behavior can be traced with gates.
Select one row of cells
When selected for writing, a cell stores its input bit. When selected for reading, it presents its stored bit. When unselected, it keeps its state and outputs zero in this logic model. The zero output is what makes an OR-based read path work.
A RAM contains 16 cells: four words, each with four bits. Address bits feed a 2-to-4 decoder. Its outputs are word lines. A high word line selects every cell in that word, so all four bits are accessed together.
The data-input line for bit zero connects to the bit-zero cell in all four words. The other three input lines connect in the same way to their columns. On the output side, one OR gate per column combines the four cell outputs. Only the selected cell in that column contributes a stored bit; the others contribute zero.
Trace one write and read
To write 1010 to address 2, apply address 10, data 1010, and write control. Decoder output 2 becomes one. Its four selected cells store the input bits; the other twelve cells retain their values.
For a later read, keep address 10 and select reading. The bit outputs from word 2 enter the four column OR gates. Every unselected word contributes zeros, so the output word is 1010. A one in an unselected word cannot leak into this model's read result.
The memory enable drives the decoder enable. When disabled, all its outputs are zero and no cell is selected. In a packaged chip, output-enable circuitry can also release the external data bus; the internal cell model's zero is not the same as a high-impedance pin.
Connect the model to a real array
Real chips use shared bit lines along columns. Read circuits at their ends recover the selected bits instead of using enormous OR gates. The terms word line, bit line, and memory array apply to both views, but the gate model explains selection without exposing the cell circuitry.
A port is an independent address and data access path. A single-port memory selects one word through its one port. Several ports allow several addressed accesses at once. A register file is a small multiported memory: a file with two read ports and one write port can supply two source words and accept a destination word in one cycle. Each read port needs its own address selection.
See the limit of one decoder output per word
This arrangement is linear decoding. For words, a -to- decoder has selection outputs, modeled as AND gates with inputs each. Ten address wires encode 1,024 possible words; they are not 1,024 individual word wires at the interface. The decoder expands the encoded address internally, which becomes expensive as the memory grows.
Key Takeaways
- A selected cell reads or writes; an unselected cell retains its bit.
- A word line selects all bits of one word.
- Bit lines collect data along columns.
- Independent ports have independent address paths.
- Linear decoding needs one selection output per word.
2.2 Locate a word with row and column decoding
A single large decoder is an expensive way to choose among thousands of words. Coincident decoding, or two-dimensional decoding, divides the address between row and column selectors. Their active lines identify a location together.
Split the selection work
A linear decoder for 1,024 words has 1,024 outputs. In the simple gate-count model, it needs 1,024 AND gates with ten inputs each. Arrange the same words as 32 rows by 32 columns instead. Five address bits select one of 32 rows, and five select one of 32 columns.
The row and column decoders each need 32 AND gates with five inputs. Together they use only 64 such gates. This count compares the decoders, not every gate or wire in the complete memory. The array still contains 1,024 word locations and still needs ten address bits.
| Organization | Decoder output gates | Inputs per gate |
|---|---|---|
| Linear, 1,024 words | 1,024 | 10 |
| 32 rows by 32 columns | 32 + 32 = 64 | 5 |
The selected location lies where the active row and column meet. Neither selector alone identifies the full address.
Locate address 404
Let the upper five bits select the row and the lower five select the column. Address 404 has the ten-bit form 01100 10100.
- Read upper bits 01100 as row 12.
- Read lower bits 10100 as column 20.
- Rebuild the address: .
Division gives the same result: dividing 404 by 32 gives whole-number quotient 12 and remainder 20. For columns, the row is and the column is . The reconstruction is .
Use the number of columns as the divisor. That is the number of consecutive addresses in each row. Swapping the address halves would select a different location: row 20, column 12 corresponds to address 652 in this layout.
Compare a larger array
A 4,096-word linear decoder needs 4,096 output gates with 12 inputs. A square array has 64 rows and 64 columns, driven by two 6-to-64 decoders. Their total is 128 output gates with six inputs each. For a square array of words, decoder output count is about instead of .
Relate the layout to physical memory
A nearly square array also helps keep word and bit lines short. In a real chip, one activated row commonly contains many bits and several words. Column selection and multiplexers choose which part of that row reaches the data pins. The row-column view therefore describes selection without claiming that every row holds exactly one externally visible word.
DRAM reuses the same logical split when it sends the row and column addresses at different times. Coincident decoding saves internal selection logic; address multiplexing saves external pins. Neither method removes bits from the full logical address.
Key Takeaways
- Row and column selectors jointly locate a word.
- A 32-by-32 layout uses two 5-to-32 decoders.
- Divide by the column count to find the row and remainder.
- Two-dimensional decoding saves decoder logic, not storage cells or address information.
2.3 Build wider and deeper memories from chips
Chips can cooperate in two different ways. Width expansion adds bits to each word. Depth expansion adds words to the address space. A bank is one chip or a group of chips that jointly supplies one complete word.
Add data width
Four chips can form a memory. All four receive the same 16 address lines and the same bank-select signal. They operate together, each on a separate eight-bit slice: bits 7–0, 15–8, 23–16, or 31–24.
All four chips are enabled at an accessed address, but no two drive the same data bit. The word count and address width stay unchanged. Adding width does not create new addresses.
Add address depth
Four chips can instead form a memory. The low 16 address bits reach every chip. Two extra upper bits feed a 2-to-4 decoder that enables exactly one chip at a time. The full memory needs 18 address lines.
| Upper bits | Selected chip | Address range |
|---|---|---|
| 00 | 0 | 0x00000–0x0FFFF |
| 01 | 1 | 0x10000–0x1FFFF |
| 10 | 2 | 0x20000–0x2FFFF |
| 11 | 3 | 0x30000–0x3FFFF |
For address 0x2A3F1, upper bits 10 select chip 2 and low bits 0xA3F1 select the word inside it. The eight data lines are shared between chips. Unselected chips must use three-state outputs and go to high impedance. Enabling two chips onto the same bus bits causes bus contention, which can produce invalid levels and damage outputs.
Expand both dimensions
To build from chips, calculate each dimension:
The total is eight chips. Fifteen low address bits reach each chip, while two upper bits select one of four banks. The two chips inside the selected bank operate together on different byte slices. The full memory has 17 address lines.
Check for aliasing and overlaps
Leaving an address bit out of selection creates aliasing: more than one address reaches the same stored word. For two chips on an 18-bit address bus, using only bit 16 to select a chip and ignoring bit 17 makes chip 0 answer in both 0x00000–0x0FFFF and 0x20000–0x2FFFF. Toggling the ignored bit changes no physical selection.
Full decoding assigns every relevant upper bit a role in selecting or excluding a bank. A mixed 16-bit address space can put a ROM at 0x0000–0x7FFF when bit 15 is zero, and an equally deep RAM at 0x8000–0xFFFF when it is one.
Check each bank's first and last address, which chips operate together, and which data bits each chip drives. A complete contiguous memory has one selected bank for each valid address, with no gaps or overlapping bank ranges.
Key Takeaways
- Width expansion connects chips to different data-bit slices.
- Depth expansion decodes upper address bits to select a bank.
- Chip count is the product of the depth and width expansion factors.
- Only one bank may drive each shared data bit.
- Ignored address bits cause aliases.
- Address ranges include both endpoints.
3Detect errors and recover a stored word
Extra check bits make a stored word carry information about its own consistency. A parity bit can flag some errors; overlapping Hamming checks can locate one flipped bit. You will build those checks from numbered positions, decode their results, and use overall parity to distinguish a correctable single error from a detected double error. The bit order stays fixed from encoding through correction.
3.1 Generate parity and understand its limits
A bit can flip because of noise, radiation, or a failing storage cell. A soft error disappears when the word is rewritten; a hard error comes from a permanent fault. Extra check bits let a memory system notice an inconsistent word and, with a suitable code, recover the data.
Set a parity bit
Even parity makes the total number of ones in the data and parity bit even. Odd parity makes that total odd. Count the complete stored word when checking, including the parity bit itself.
The data 1011001 contains four ones. Its even-parity bit is zero, giving 10110010 when parity is appended at the right. Its odd-parity bit is one, giving 10110011. The bit is not always zero for even parity: data with an odd count needs a one to make the combined count even.
An XOR of all data bits computes the even-parity bit. XOR is one when an odd number of inputs are one. Appending that result turns an odd data count into an even total and leaves an even count even. For odd parity, invert that generated bit.
Check the whole stored word
On reading an even-parity word, XOR all its bits, including parity. A result of zero means no error was detected; one means the check failed. For odd parity, a valid word gives one instead.
A tree combining bits needs two-input XOR gates. For example, four inputs need three gates: combine the first pair, combine the second pair, then XOR the two intermediate results. The generator and checker must use the same convention.
Trace one error and two errors
Start with the even-parity stored word 10110010.
- Reading 10010010 means one bit changed. There are three ones, so the odd total fails the even-parity check.
- Reading 10000010 means two bits changed. There are two ones, so the even total passes even though the data is wrong.
Each flip toggles the parity of the word. An odd number of flips changes it; an even number changes it back. One parity bit therefore detects every odd number of flipped bits and misses every even number.
A passed check means only that the word has the expected parity. It is not a guarantee of unchanged data. This matters when interpreting a memory status flag: “no error detected” and “known to be correct” are different claims.
Why detection is not correction
A failed parity check does not identify a position. Any one of the stored bits could be the one that changed, including the parity bit. The system can report the failure, signal a processor, or stop the computation, but a single parity check cannot choose a bit to repair.
Hamming coding adds several parity relationships over different, overlapping groups. Each position belongs to a unique combination of groups. A single error then leaves a recognizable pattern of failures, turning a general alarm into a location.
Key Takeaways
- Even and odd parity count the data and parity bit together.
- XOR of the data generates the even-parity bit.
- One parity bit detects odd numbers of flips and misses even numbers.
- A parity failure gives no error location.
3.2 Place and calculate Hamming check bits
A Hamming code assigns each stored position a unique pattern of parity-group memberships. The check results must distinguish every possible single-bit error from the case where no bit changed. That requirement determines how many check bits to add.
Find the check-bit count
For data bits and check bits, choose the smallest satisfying
There are positions to identify and one additional no-error case. For eight data bits, three checks give only eight patterns for twelve cases, so they are too few. Four give sixteen patterns for thirteen cases and are enough. The stored word has twelve bits.
| Data bits | Hamming checks | Stored bits |
|---|---|---|
| 1 | 2 | 3 |
| 2–4 | 3 | 5–7 |
| 5–11 | 4 | 9–15 |
| 12–26 | 5 | 17–31 |
| 27–57 | 6 | 33–63 |
| 58–120 | 7 | 65–127 |
For common data widths, 16 bits need five checks, 32 need six, and 64 need seven. These are Hamming checks alone, before adding an overall parity bit. Check-bit overhead becomes a smaller fraction of the stored word as the data width grows.
Reserve power-of-two positions
Number positions from one, left to right. Put checks at 1, 2, 4, 8, and so on. Fill the remaining positions with data in its original order, with the leftmost data bit first. An eight-bit input occupies this layout:
Do not start numbering at zero or place the input as one uninterrupted block followed by all the checks.
Build overlapping groups
A check at position covers positions whose binary index has bit set. Position 6 is binary 0110, so it belongs to the checks at 2 and 4. For twelve stored positions:
- Check 1 covers 1, 3, 5, 7, 9, 11.
- Check 2 covers 2, 3, 6, 7, 10, 11.
- Check 4 covers 4, 5, 6, 7, 12.
- Check 8 covers 8, 9, 10, 11, 12.
Generate each check bit by XORing only the data positions in its group. This makes the complete group even. Include the check bit when later checking the group, not when calculating its initial value.
Encode 10011010
Place the data in positions 3, 5, 6, 7, 9, 10, 11, 12 as 1, 0, 0, 1, 1, 0, 1, 0.
For check 1, the data values at 3, 5, 7, 9, 11 are 1, 0, 1, 1, 1: four ones, so . Check 2 sees 1, 0, 1, 0, 1: three ones, so . Check 4 sees 0, 0, 1, 0, giving . Check 8 sees 1, 0, 1, 0, giving .
In positions 1 through 12, the result is 011100101010. Memory stores all twelve bits. XOR logic generates the checks on each write, adding storage and circuitry without requiring software to calculate them.
Key Takeaways
- Choose the smallest check count with enough syndromes for all positions plus no error.
- Check bits occupy positions 1, 2, 4, 8, and so on.
- Data fills the other positions in order.
- Binary position numbers determine group membership.
- Generate a check from data bits; verify it with the check bit included.
- Eight data bits need four Hamming checks.
3.3 Read the syndrome and decide whether to correct
Rechecking a Hamming word produces one bit per parity group. Write these bits with their position weights in descending order. The resulting syndrome identifies a single erroneous stored position, including a check-bit position.
Calculate a syndrome
For the twelve-bit layout, compute by XORing each entire group, now including its stored check bit. Write the result as . Zero means all groups passed. For one flipped bit, the syndrome's binary value is its position; invert that bit to restore the code word.
Suppose 011100101010 is read as 011101101010. Group 1 still has four ones, so . Group 2 has five, giving . Group 4 has three, giving . Group 8 has two, giving . Thus the syndrome is 0110, or 6. Flip position 6 to recover 011100101010, then extract data from positions 3, 5, 6, 7, 9, 10, 11, 12 to recover 10011010.
A syndrome of 0100 points to check bit 4. Correction can repair a check bit even when the data itself was unchanged. Reversing the result order is a real hazard: 0011 names position 3, while 1100 names position 12.
See why plain correction can fail
For two flipped positions, the syndrome is the XOR of their position numbers. Errors at 3 and 10 give
or 9. Flipping position 9 would add a third wrong bit. A nonzero syndrome alone cannot distinguish a single error from a double error. In a shortened code, a multi-error syndrome can also name a position outside the stored word.
Add overall parity for SEC-DED
SEC-DED means single-error correction and double-error detection. Add one extra bit that makes the entire Hamming word even. For the twelve-bit example, append . The word 011100101010 has six ones, so the extra bit is zero: 0111001010100.
On reading, let be the XOR of all thirteen stored bits. Use it together with the Hamming syndrome :
| Syndrome | Overall check | Decision for up to two flips |
|---|---|---|
| Zero | 0 | No error detected |
| Nonzero | 1 | Correct position named by syndrome |
| Nonzero | 0 | Report double error; do not correct |
| Zero | 1 | Correct the extra overall parity bit |
Two errors leave overall parity even but make the Hamming syndrome nonzero. The extra test therefore prevents the misleading correction in the 3-and-10 example. A fault in the overall parity bit makes overall parity odd without disturbing any Hamming group.
For 64 data bits, seven Hamming checks plus one overall parity bit give 72 stored bits, often written (72,64). SEC-DED guarantees correction of every single-bit error and detection of every double-bit error. With three or more flips, the observed checks can imitate a different case and cause a missed error or a wrong correction.
Key Takeaways
- Write syndrome bits in descending weight order.
- A single-error syndrome identifies the bit to invert.
- Two errors can imitate a different single-error position.
- Overall parity distinguishes single from double errors within SEC-DED capability.
- A 64-bit data word uses eight added bits in a (72,64) SEC-DED code.
4Use ROM as stored data and combinational logic
A ROM can be read as a table of stored words or as a circuit that maps inputs to outputs. Its decoder makes that connection explicit: an address chooses one row of the table. You will compare programming and erase methods, build a ROM from a truth table, and reduce storage when an output is already a constant or a direct input connection. Input count sets the cost of the table.
4.1 Explain ROM connections and programming methods
A read-only memory (ROM) stores information that is fixed at manufacture or entered through a programming operation. Ordinary use then reads that information. ROM is nonvolatile: its stored contents survive when power is removed.
Follow the decoder and OR connections
A ROM has address inputs and data outputs. A -to- decoder activates one line for each possible address. Each line represents one minterm of the input variables.
Each output has an OR gate with possible connections to those decoder lines. A connection from a selected line makes that output bit one; no connection makes it zero. The programming pattern therefore specifies which address rows produce a one at each output.
A ROM needs five address inputs and a 5-to-32 decoder. Eight output OR gates each have 32 possible decoder connections. There are crosspoints, matching the 256 stored bits. Adding another output would add 32 more stored bits; adding another address input would double the rows.
The ROM truth table lists every address and its output word. It completely specifies the information to program. To change one output bit at one address in this model, change the corresponding connection.
Compare nonvolatile technologies
| Type | How contents are set or erased | Main distinction |
|---|---|---|
| Mask ROM | Set during chip manufacture | Fixed contents; economical in large volumes |
| PROM | User programs once, classically by blowing fuses | No erase operation |
| EPROM | Ultraviolet light erases through a package window | Erase, then reprogram |
| EEPROM | Electrical erase and rewrite, typically byte by byte | Small updates without UV erasure |
| Flash | Electrical erase in blocks | High-density storage |
“Read-only” describes normal access, not an inability to change every device ever sold as ROM. Mask ROM and one-time PROM are fixed after programming. EPROM, EEPROM, and flash can be rewritten through their programming procedures. Their writes are much slower than reads, and cells have limited erase/write endurance, which suits read-mostly uses.
Flash stores firmware and FPGA configurations, as well as data in USB drives and solid-state drives. The block erase requirement matters when updating a small value: erasing is organized in larger units than an individual bit.
Treat an ordinary ROM read as a lookup
At the combinational level, the current address determines the output word while the chip is enabled. The selected outputs become valid after the access delay. This is useful for fixed code, character patterns, sine tables, and code converters.
A table address is not an instruction to modify the ROM. Reading simply selects the word already programmed there. The kind of ROM determines how its stored table can be changed; the decoder-and-output model determines which row is read.
Key Takeaways
- A ROM is nonvolatile.
- A decoder selects an address row; programmed OR connections form its word.
- The complete truth table specifies ROM contents.
- PROM is one-time; EPROM uses UV erase; EEPROM and flash use electrical erase.
- Flash erases blocks.
4.2 Turn a truth table into ROM contents
A ROM can implement a combinational circuit by storing its truth table. The input bits are the address; the output bits are the selected data word. A minimal Boolean expression is not required because the decoder already forms every input minterm.
Choose the dimensions
For inputs and stored outputs, use a ROM. Enumerate the input patterns in the chosen address order, calculate each output word, and program it at that address. Treat bit order as part of the design: changing which input is most significant changes the table layout.
Build a four-bit squaring table
Let inputs represent integers from zero through fifteen. The circuit outputs their square. Since , and 225 needs eight binary bits, a direct implementation is a ROM.
| Address input | Input value | Stored output | Square |
|---|---|---|---|
| 0110 | 6 | 00100100 | 36 |
| 1101 | 13 | 10101001 | 169 |
| 1111 | 15 | 11100001 | 225 |
For address 1101, write 10101001 into row 13. Applying that address then selects 169 after the ROM's access delay.
Remove outputs that need no table
The least significant square bit satisfies : odd inputs have odd squares, and even inputs have even squares. Wire that output directly. The next bit, , is always zero because every square has remainder zero or one on division by four. Tie it to zero.
Only through need storage, reducing the ROM to bits instead of 128. For input 13, the six stored high bits are 101010. Appending fixed bit zero and direct input bit one gives 10101001. Removing an output column saves bits per row; it does not remove address rows.
Define unused input codes
A BCD-to-excess-3 converter adds three to a valid decimal digit represented in four-bit BCD. A direct design uses a ROM. Input 0101 stores 1000; input 1001 stores 1100.
BCD uses only addresses zero through nine. The other six input codes never occur in the intended operation, so their output values can be chosen freely. Still enter a concrete programming word for each, such as 0000. A don't-care in the function specification is freedom to choose a value, not a physical empty word.
Judge the size cost
Each additional input doubles the number of rows. Sixteen inputs require 65,536 rows per stored output bit even when the function has a short SOP expression. ROMs therefore suit few-input, many-output functions and tables with little simple Boolean structure.
In array terms, a ROM has a fixed AND array that generates every minterm and a programmable OR array. A PLA can select just the product terms it needs, while an FPGA LUT uses the same stored-truth-table principle on a small scale.
Key Takeaways
- Connect circuit inputs to address lines and outputs to data lines.
- A direct table for k inputs and m outputs needs 2ᵏ × m bits.
- Constants and direct input outputs need no ROM column.
- Program definite values for unused input codes.
- Every additional address input doubles the table size.
5Fit logic into programmable arrays
Programmable arrays turn sum-of-products equations into connected hardware. A PLA can share product terms across outputs; a PAL assigns a fixed group to each output. You will map equations into programming tables, account for output inversion, and handle a function that exceeds one group’s capacity. Adding flip-flops introduces state, while CPLDs connect many small programmable blocks into a larger device.
5.1 Write a PLA programming table
A programmable logic array (PLA) implements sum-of-products logic with two programmable stages. Its AND array forms selected product terms from true or complemented inputs. Its OR array connects those terms to outputs, allowing several outputs to share one term.
Read the array notation
Each input supplies both its true and complemented forms. An × at a crossing marks a programmed connection; it does not mean inversion. A single drawn line into a gate represents the gate's multiple inputs. Early programmable devices used fuses at crosspoints; other technologies use antifuses or nonvolatile cells.
A PLA with inputs, product terms, and outputs is described as . There are possible AND-array connections and OR-array connections. Many PLAs also offer programmable output inversion: true polarity, T, or complemented polarity, C.
List distinct terms before assigning outputs
Consider
The first function is one at minterms 2, 4, 5, and 7; the second at 3, 5, and 7, with A the most significant input. The distinct products are , , , and . The term is formed once and connected to both outputs.
A programming table uses 1 for the true input, 0 for its complement, and – when that input is absent from the product:
| Term | A | B | C | F1 | F2 |
|---|---|---|---|---|---|
| AB' | 1 | 0 | – | 1 | 0 |
| AC | 1 | – | 1 | 1 | 1 |
| A'BC' | 0 | 1 | 0 | 1 | 0 |
| BC | – | 1 | 1 | 0 | 1 |
Both outputs use true polarity. A dash removes an input from that AND term; it does not force the input to zero. For the AC row, either value of B is allowed.
Count the physical resources
Four distinct terms require a PLA. Its AND array has crosspoints and its OR array has . Counting AC twice would describe a larger implementation than necessary. Counting literals alone would miss the actual limit on the number of available product rows.
Check whether a complement saves terms
First minimize each function, then inspect sharing between outputs. Also consider a function's complement if the device permits output inversion. Program the complement and select C polarity to recover the desired output.
For the example, also needs three terms and shares none with the displayed F2 terms. It offers no saving, so retain the true form. A shorter expression for one output is useful only if the combined set fits the device better.
A ROM generates every minterm with a fixed decoder and programs the OR connections. A PLA programs both arrays and can use only needed products. That extra flexibility costs more programmable structure and typically more delay than a comparable PAL with only one programmable array.
Key Takeaways
- Both PLA arrays are programmable.
- The same product term can feed several outputs.
- A dash means an input is absent from a product term.
- Count distinct products after considering sharing.
- Output inversion can make a complemented function useful.
5.2 Respect PAL term limits and output polarity
A programmable array logic (PAL) device has a programmable AND array and a fixed OR array. Each output receives its own assigned group of product terms. That fixed grouping makes the device simpler than a PLA but restricts how equations fit.
Count terms per output
A product needed by two PAL outputs must be formed twice, once in each output's group. The functions and need four distinct products in a PLA but five term instances in a PAL: three for F1 and two for F2.
Each function must fit the fixed product group assigned to its output pin. Check the device's term allocation and polarity before programming.
The PAL16L8 illustrates this structure. It has ten dedicated inputs and six feedback-capable I/O pins, allowing up to sixteen signals into the AND array. Eight combinational outputs each have seven logic product terms plus a separate output-enable term. The “L” identifies active-low outputs: the pin carries the complement of the internal OR sum.
Account for the inversion
If the required pin function is , the internal sum must implement on a fixed inverting output. For a pin function , the programmed internal term is , since . Loading A and B as the internal sum would instead produce the complemented pin function.
Apply the same polarity rule to feedback: write equations for actual pin signals before mapping each through the output inverter.
Split a function that needs too many terms
Four-input odd parity is
Its eight one-valued minterms are 1, 2, 4, 7, 8, 11, 13, and 14. No pair is adjacent on a Karnaugh map, so its minimal two-level SOP has eight terms. It will not fit a seven-term output group directly.
Define actual pin functions and , then feed those pins back and produce on a third output. For active-low pins, program the complements:
- Internal sum for X: .
- Internal sum for Y: .
- Internal sum for F: .
Each sum has two terms, and the output inversion makes the required XOR pin function. The result uses three outputs and six logic product terms. The output-enable terms are separate from this count.
Include the feedback cost
Feedback uses output resources for partial results and introduces another pass through the array. The path from A or B to F now goes through the first XOR output and the final XOR output. Rewriting a function to fit one group can avoid that delay; when it cannot fit, feedback provides a useful multi-level implementation.
Key Takeaways
- A PAL has a programmable AND array and fixed OR groups.
- Shared logical products must be duplicated across PAL outputs.
- Check the term limit separately for each output.
- An active-low pin requires the internal complement of its desired function.
- Feedback can overcome a term limit at the cost of outputs and delay.
- PAL16L8 logic terms and output-enable terms have separate roles.
5.3 Store state in macrocells and choose a device
Combinational arrays respond to current inputs. A sequential programmable device adds flip-flops so its outputs can also depend on stored state. A macrocell combines one output's SOP logic, a D flip-flop, and multiplexers for output mode, polarity, and feedback.
Choose registered or combinational output
A macrocell can send the direct logic result to its output or register that result on a clock edge. Feedback brings either the configured output or state signal back into the array. One configured output does not provide two independent pin signals just because both paths exist internally.
The PAL16R8 has eight registered outputs sharing one clock. Their flip-flops sample their D values on the same edge. The new state is calculated from the old state; one flip-flop does not first update and then clock the next one.
The reprogrammable GAL22V10 has ten output logic macrocells with true or inverted and registered or combinational modes. Its logic-term allocations are 8, 10, 12, 14, 16, 16, 14, 12, 10, and 8. Each also has a separate output-enable term. Pin assignment therefore affects which functions fit.
Implement an enabled two-bit counter
Let hold the state, and let enable E control whether the counter advances. The low bit toggles when E is one:
The high bit toggles only when E and the old low bit are both one:
The equations use two and three SOP terms. From state 01 with E equal to one, they give D1D0 equal to 10. Both flip-flops capture together, advancing the count. With E zero, the equations reduce to D0 equal to Q0 and D1 equal to Q1, so the state holds. At 11 with E one, the next state is 00.
Connect blocks into a CPLD
A complex programmable logic device (CPLD) joins several PAL-like blocks through programmable global interconnect. Each block holds many macrocells. Typical CPLDs keep their configuration in nonvolatile cells, so no external configuration reload is needed at power-up. Their regular array paths make timing relatively easy to predict.
Programming technology is a separate choice. Fuses and antifuses are one-time; EPROM is UV-erasable; EEPROM and flash are electrically erasable and nonvolatile. SRAM configuration is volatile and can be rewritten without an erase-cycle endurance limit. In-system programming, often through JTAG, configures a device while it is mounted on its board.
Match the device to the circuit
| Device | A useful match |
|---|---|
| ROM | A complete table with few inputs |
| PLA | Several outputs sharing SOP terms |
| PAL or GAL | Small glue logic or a simple state machine |
| CPLD | Medium logic needing nonvolatile startup and predictable timing |
| FPGA | Larger designs with substantial memory or arithmetic |
Device names identify architectures, not a universal promise of reprogrammability. Check both the available logic structure and the technology that stores its configuration.
Key Takeaways
- A macrocell adds selectable registered output and feedback to SOP logic.
- Shared-clock flip-flops capture their next states together.
- GAL22V10 output groups have different term capacities.
- A CPLD connects many PAL-like blocks.
- Programming technology determines retention and whether a device can be changed.
- Choose hardware from the function, state, capacity, and startup needs.
6Build hardware with FPGA resources
An FPGA stores a circuit configuration that selects logic functions, state elements, and connections across the chip. A lookup table implements one Boolean function as a tiny memory. You will fill its truth table, split functions that exceed one table’s input width, and connect logic blocks through routing. Dedicated memory, arithmetic, I/O, and clock resources extend the design beyond individual LUTs.
6.1 Program LUT contents and connect logic blocks
A field-programmable gate array (FPGA) contains configurable logic blocks connected by programmable routing and surrounded by I/O blocks. Configuration after manufacture chooses the circuit. The resulting blocks operate as hardware, including many activities in parallel.
Read a LUT as a tiny ROM
A lookup table (LUT) with k inputs is a memory. Its input pattern selects an address, and the stored bit is the output. Any Boolean function of those inputs fits by storing its truth table. There are possible contents and therefore that many functions.
A four-input LUT holds sixteen bits and can implement 65,536 functions. A six-input LUT holds 64 bits. A function may use fewer inputs than the LUT offers; unused input combinations simply repeat the required values.
Fill a majority-function LUT
Let M be one when at least two of A, B, and C are one, with A the most significant address bit. Addresses zero through seven store 0, 0, 0, 1, 0, 1, 1, 1. At address 101, A and C are one, so the stored output is one.
When contents are written with the highest address on the left, those bits become 11101000, or 0xE8. Address order and printed bit-string order are opposite views of the same table; state which one is being used before converting to hexadecimal.
For in a four-input LUT with A most significant, ones occur at addresses 3, 7, 11, 12, 13, 14, and 15. Highest-address-first contents are 1111100010001000, or 0xF888.
Count LUTs from inputs, not gates
Propagation through a LUT does not depend on which truth table it holds. A complicated function that fits one LUT does not need extra internal logic levels. Six-input XOR uses five two-input XOR gates in a gate implementation but fits one six-input LUT.
A function with more inputs may need decomposition. Shannon expansion separates the cases for one input x:
For a seven-input function, two six-input LUTs compute the cases with x fixed at zero and one. A 2-to-1 multiplexer selected by x chooses the result. That selector can use a third LUT or a dedicated multiplexer. The decomposition creates a path through a case LUT and a selection stage.
Add state and arithmetic nearby
Logic blocks add D flip-flops that can register LUT outputs, multiplexers that choose direct or registered results, and fast carry chains for addition and counting. Registers and their next-state logic can therefore sit close together.
For an AMD 7-series example, a slice has four six-input LUTs, eight storage elements, and a carry chain; a CLB contains two slices. Each LUT can also implement two five-input functions sharing the same five inputs. Some slices support distributed RAM or shift-register use of their LUT storage. Other FPGA families organize and name their blocks differently.
The LUT's truth-table contents reside in configuration memory. Loading a new configuration can turn the same physical LUT from one function into another.
Key Takeaways
- A k-input LUT stores 2ᵏ output bits.
- Truth-table inputs are LUT addresses.
- State the address-to-bit-string order when writing LUT contents.
- A function’s gate count does not determine its LUT count.
- Shannon expansion splits a larger function into selected cases.
- Logic blocks add flip-flops, selection, and carry resources.
6.2 Use routing, embedded blocks, and configuration
LUTs provide logic, but a complete FPGA design also needs connections, pins, memory, arithmetic, and clocks. These resources are configured together. Their placement and routing affect whether signals arrive at the times required by the design.
Connect blocks and pins
Programmable routing uses wire segments joined by controlled switches. Configuration bits choose which switches connect which segments. Routes consume area and can contribute a large share of a signal path's delay. Moving two related logic blocks closer can shorten a route even if their Boolean equations stay unchanged.
I/O blocks connect the fabric to package pins. They support input, output, or bidirectional use, three-state control, suitable electrical standards and voltages, and optional pin registers. A correct internal function still needs a compatible pin configuration.
Use dedicated resources
Block RAM is dedicated synchronous SRAM, often with two ports. In AMD 7-series, a 36 Kb block can be divided into two 18 Kb memories. Here 18 Kb means bits, including the available parity-bit capacity. A memory needs 16,384 bits and fits a organization. A small memory can fit one six-input LUT configured as distributed RAM.
DSP blocks provide multipliers and adders for multiply-accumulate operations. A 7-series DSP48E1 includes a 25-by-18-bit multiplier. Clock resources provide low-skew distribution and clock managers such as PLLs that produce required frequencies and phases. These blocks avoid implementing common large operations solely with general LUTs.
Keep or reload configuration
| Technology | After power is removed | Programming behavior |
|---|---|---|
| SRAM configuration | Lost | Load a bitstream at startup; reconfigure later |
| Flash configuration | Retained | No external configuration reload at startup |
| Antifuse configuration | Retained | Program once |
SRAM-based FPGAs load a bitstream from external flash, a processor, or a programming interface such as JTAG. Flash configuration and user block RAM are different storage roles: nonvolatile configuration does not turn every data memory into nonvolatile storage.
Follow the hardware design flow
- Describe a circuit in an HDL or schematic.
- Synthesis turns the description into logic.
- Technology mapping chooses LUTs, flip-flops, and dedicated resources.
- Placement assigns physical locations.
- Routing connects the placed resources.
- Timing analysis checks setup, hold, and I/O requirements.
- Generate and load the bitstream.
Reports show resource use and achievable clock timing. Setup checks concern signals arriving in time; hold checks also constrain signals that could arrive too soon. A low LUT count alone does not establish a fast design.
An FPGA configures circuits, not a processor's sequential instruction stream, although a processor can be built in its logic. It avoids fabricating a new chip for each design. An ASIC can offer better speed, power, and per-unit cost at very large volume, at the expense of substantial design and fabrication effort. A CPLD serves smaller designs with a simpler nonvolatile startup and timing model.
Key Takeaways
- Routing delay depends on placement and selected paths.
- Block RAM, DSP, and clock resources provide dedicated hardware.
- SRAM-based FPGA configuration must reload after power-up.
- Synthesis, mapping, placement, and routing have different jobs.
- Timing analysis checks setup, hold, and interfaces.
- FPGA configuration defines parallel hardware circuits.
Memory and Programmable Logic examples
1Read, write, and time a memory
14 steps
- 1IntroductionFollow one memory operation
A memory operation has a destination, a data word, and a time window. An address selects where the operation happens, data lines carry the bits, and controls choose read or write. Start by separating those roles; then follow the same interface over time to see why a correctly selected word can still be captured too early. That wait is set by access time and cycle time, and DRAM adds refresh to keep its stored charge.
- 2ExplanationSeparate location from contents
A RAM contains 65,536 separately addressed words, each sixteen bits wide. Address zero and address one are different locations even if they contain the same value. Sixteen address lines select among the words; sixteen data lines carry the selected word. The matching counts here are a coincidence of the chosen organization.
- 3ExampleConvert stored bits into bytes
Multiply the word count by its width: stored bits. Divide by eight to obtain 131,072 bytes, then by 1,024 to get 128 KiB.
K in the word count means 1,024. KiB makes the binary byte unit explicit; kB would mean 1,000 bytes.
- 4ChallengeChange the word width
The same 65,536 word addresses now store 32 bits each. How many address lines and data lines are required?
---reveal---
The memory still needs sixteen address lines because its word count is unchanged. It needs 32 data lines to carry the wider word. Its capacity doubles, but there are no new locations for the address to distinguish.
- 5ExplanationRead a word or replace it
Writing applies an address and incoming data, then activates write with the required timing. Reading selects an address and returns a copy of the stored word. Chip select enables the device; an active-low select is asserted at zero. When an inactive chip releases its output pins into high impedance, it lets a different chip use the shared data bus.
- 6ExplanationUse two timing limits
Access time tells you when a selected read word becomes valid. Cycle time tells you when another operation may start. A RAM with 25 ns access and 35 ns cycle time can supply data before it is ready for a second operation. Keep the data-capture event and the next-start event separate when drawing a timing sequence.
- 7ExampleSchedule a read on clock edges
A 100 MHz controller has a 10 ns clock period. A read begins at time zero. With 25 ns access time, capture at the 30 ns edge allows the data to become valid first.
A 35 ns cycle time still prevents another operation from starting at 30 ns. Its earliest permitted clock edge is 40 ns, four periods after the first start.
- 8ChallengeFind the earliest allowed edge
Using that 10 ns clock, a different RAM needs 42 ns between operation starts. At what edge can the next operation begin?
---reveal---
At 50 ns, after five periods. Four periods provide only 40 ns, which is too short. The controller must round the required interval up to a whole number of periods; it cannot use a rounded-down average.
- 9TipProtect a write window
During an asynchronous write, keep the address fixed through its specified interval. Data must be stable for setup before the write-ending event and hold afterward. Synchronous RAM instead samples inputs at clock edges and returns reads at a specified latency. A shared system clock does not remove the need to check the memory’s own timing requirements.
- 10AnalogyKeep a state or restore charge
Think of SRAM as a latch that keeps either stable state while power remains on. DRAM instead keeps a bit as capacitor charge, which slowly leaks. Refresh restores that charge before information is lost. Both need power: “static” means no refresh is needed, while “nonvolatile” means contents survive power removal.
- 11ExampleSpace DRAM refreshes
An example DRAM has 8,192 rows to refresh in 64 ms. An evenly spread one-row schedule allows between refreshes.
The controller or refresh circuitry performs this work. Refresh preserves data but occupies the affected resources. Reading a DRAM row also restores the charge disturbed by the read.
- 12ChallengeDistinguish bits from pins
A one-bit DRAM array sends its row and column addresses on shared pins. How many logical address bits and physical address pins does it use for the two parts?
---reveal---
It needs twenty logical address bits: ten for the row and ten for the column. The two parts reuse ten pins, marked by row and column strobes. Pin sharing saves connections without reducing the information needed to locate a bit.
- 13ConnectionChoose storage for a buffer
A small fast buffer can use SRAM to avoid refresh and simplify control. A large main memory commonly uses DRAM for its smaller cells and lower cost per bit. In either case, a successful read must return the selected word at the interface’s promised time. The choice of cell technology changes how the chip preserves data behind that interface.
- 14RecapCheck dimensions and deadlines
When reading a memory specification, identify its word count, word width, active control levels, access delay, and cycle interval. For DRAM, also account for refresh and the row/column address interface. These quantities answer different design questions; use the one that controls the event you are scheduling.
2Trace selection from cells to chip banks
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionFollow the selection path
- 2ExplanationMake a word from one-bit cells
- 3ExampleSee why the read OR gates work
- 4ChallengeDisable the array
- 5ConnectionGive reads independent addresses
- 6ExplanationSplit the decoder
- 7ExampleSplit address 404
- 8ChallengeMove to another row
- 9ExplanationAdd bits side by side
- 10ExampleAdd addresses with banks
- 11TipRelease shared data lines
- 12ChallengeCombine width and depth
- 13ChallengeDiagnose a repeated address range
- 14RecapTrace one address end to end
3Encode, damage, and recover a word
17 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionMake errors leave a pattern
- 2ExplanationSet the parity convention
- 3ChallengePredict a missed error
- 4ExampleChoose enough Hamming checks
- 5ExplanationPlace the input bits
- 6Key InsightUse the binary position as a group label
- 7ExampleCalculate checks 1 and 2
- 8ExampleComplete checks 4 and 8
- 9ChallengeIdentify one data bit’s checks
- 10ExplanationRecheck with the stored checks included
- 11ExampleRecover an error at position 6
- 12ChallengeCorrect a check-bit fault
- 13ExampleSee a misleading double-error syndrome
- 14ExplanationAdd the overall parity check
- 15ChallengeCombine the two check results
- 16ConnectionScale to a 64-bit data word
- 17RecapKeep the correction decision in order
4Build a ROM-based function
10 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionStore the output for every input
- 2ExplanationFollow one programmed connection
- 3ConnectionMatch the erase method
- 4ChallengeChoose between EEPROM and flash
- 5ExampleSize the squaring function
- 6Key InsightWire the two simplest outputs
- 7ExampleReassemble a reduced output
- 8ChallengeProgram an unused code
- 9ChallengePredict the cost of another input
- 10RecapCheck rows, columns, and direct wires
5Map equations into PLAs, PALs, and macrocells
15 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionTurn equations into connections
- 2ExplanationShare one product across outputs
- 3ExampleWrite the shared product’s row
- 4ChallengeCount connections in the chosen PLA
- 5ConnectionFreeze the OR groups
- 6ExplanationInclude the output inverter
- 7ExampleFind a term-limit problem
- 8ExampleMap the feedback equations to active-low pins
- 9ChallengeExplain what spare terms cannot do
- 10ExplanationAdd a flip-flop to the output
- 11ExampleCalculate the low counter bit
- 12ExampleCalculate the high counter bit
- 13ConnectionConnect many macrocells
- 14ChallengeFit the next-state logic
- 15RecapCheck the architecture before counting
6Map a truth table into FPGA hardware
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionConfigure circuits across a chip
- 2ExplanationAddress a LUT with its inputs
- 3ExampleFill a majority truth table
- 4ExampleWrite the contents as hexadecimal
- 5ChallengeLook up one input pattern
- 6Key InsightCount input dependence, not drawn gates
- 7ExplanationSplit a seven-input function
- 8ConnectionPlace logic and route the wires
- 9ExampleChoose a memory resource
- 10ExplanationUse arithmetic and clock blocks
- 11ChallengePredict a power-cycle failure
- 12ChallengeInterpret an implementation report
- 13RecapConnect function, resources, and timing
Memory and Programmable Logic practice questions
Set 1: Decode banks and protect stored words10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Size memories and trace their signals10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Implement tables and sum-of-products logic10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Map FPGA resources and diagnose faults10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Resolve timing, coding, and logic constraints10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Access time
Active-low output
Address aliasing
Address map
Address multiplexing
Antifuse
Asynchronous RAM
B
Binary cell
Bit line
Bitstream
Block RAM
Bus contention
C
Carry chain
CAS
Check bit
Chip select
Code word
Coincident decoding
Column address
CPLD
Crosspoint
Cycle time
D
Depth expansion
Distributed RAM
DRAM
DSP block
E
EEPROM
EPROM
Even parity
F
Feedback
Flash memory
FPGA
H
Hamming code
Hard error
High impedance
Hold time
I
I/O block
In-system programming
K
KiB
L
Linear decoding
LUT
M
Macrocell
Mask ROM
Memory address
Memory bank
Memory capacity
Memory port
Memory word
Miscorrection
O
Odd parity
Output polarity
Overall parity
P
PAL
Parity bit
Parity group
PLA
Placement
Product term
Product-term limit
Programmable routing
Programming table
PROM
R
RAS
Read latency
Refresh
Register file
Registered output
ROM
ROM minterm
Row address
S
SEC-DED
Setup time
Shannon expansion
Soft error
SRAM
Stored output column
Syndrome
T
Technology mapping
Timing analysis
Truth-table implementation
U
Unused input code
V
Volatile memory
W
Width expansion
Word line
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.