Work out by hand what a self-test controller writes and reads, which read finds a stuck cell, and what the test leaves behind.
Hardware context: Self-test controller on a small memory of ap_soc, behind a port mux with a function side and a test side. Memory self-test at the factory and at power-up
This is the test controller of lesson S8.11 on a larger memory. The memory has four words of four bits, numbered 0 to 3. The controller starts on clock edge 4. From edge 5 on it handles one word on each edge, in the order 0, 1, 2, 3. Pass 1 writes all four words, then reads all four. Pass 2 does the same with the opposite pattern. Done becomes 1 on the edge of the last read.
This worksheet uses named constants. The first three entries show how to record your decisions.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Item | Value |
|---|---|
| Pattern of pass 1 | 0101 in words 0 and 2, 1010 in words 1 and 3 |
| Pattern of pass 2 | 1010 in words 0 and 2, 0101 in words 1 and 3 |
| The faulty cell | Bit 1 of word 2 reads 0, whatever is written. Bit 0 is the bit on the right. |
| Before the test | Word 0 holds 1001, written by the function side. |
Enter a word as a decimal number: 0101 is 5, and 1010 is 10. Enter an edge as its number: 5 for edge 5.
| Entry | Your decision |
|---|---|
| FIRST_WRITE | The edge of the first write of the test. |
| WRITES | How many writes does the test make in all? |
| W3_PASS1 | The word that pass 1 writes to word 3, as a decimal number. |
| FIRST_READ | The edge of the first read of pass 1. |
| W2_READ1 | What the read of word 2 returns in pass 1, as a decimal number. |
| PASS2_START | The edge of the first write of pass 2. |
| W3_PASS2 | The word that pass 2 writes to word 3, as a decimal number. |
| BAD_PASS | Which pass has the bad read: 1 or 2? |
| BAD_EDGE | The edge of the bad read. |
| BAD_VALUE | What the bad read returns, as a decimal number. |
| BAD_READS | How many of the eight reads are bad? |
| DONE_EDGE | The edge on which done becomes 1. |
| WORD0_AFTER | What word 0 holds after the test, as a decimal number. |
| DONE_EDGE_N | Suppose the memory had N words in place of 4. On which edge would done become 1? |
Examples
Example 1
FIRST WRITE- Input
The edge of the first write of the test.
- Output
matches = 1
The start is on edge 4. The controller writes word 0 on edge 5.
Example 2
WRITES- Input
How many writes does the test make in all?
- Output
matches = 1
Four in pass 1 and four in pass 2.
Example 3
W3 PASS1- Input
The word that pass 1 writes to word 3, as a decimal number.
- Output
matches = 1
Word 3 is odd, so pass 1 writes 1010.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For DONE_EDGE_N, enter a constant expression using N. Only this entry changes with the parameter. The supported integer range is 4 through 8, inclusive.
Hints
Hint 1
One word on each edge from edge 5: four writes, four reads, then the same again.
Hint 2
A stuck cell gives a bad read only when the pattern wants the other value in that bit.
Hint 3
After the test every word holds the pattern of pass 2.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
14 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 1 problem on this path