Recover the position of a scan after a pause, a detour or a reset.
Hardware context: Two TAPs on the ap_soc board scan chain. Identifying devices on an assembled board
Read every TMS string in time order from left to right. For a state question, report the code after the final rise. For a length question, count only shift edges.
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
| State code | Name | TMS 0 leads to | TMS 1 leads to |
|---|---|---|---|
| 0 | Reset | Idle | Reset |
| 1 | Idle | Idle | Select-DR |
| 2 | Select-DR | Capture-DR | Select-IR |
| 3 | Capture-DR | Shift-DR | Exit1-DR |
| 4 | Shift-DR | Shift-DR | Exit1-DR |
| 5 | Exit1-DR | Pause-DR | Update-DR |
| 6 | Pause-DR | Pause-DR | Exit2-DR |
| 7 | Exit2-DR | Shift-DR | Update-DR |
| 8 | Update-DR | Idle | Select-DR |
| 9 | Select-IR | Capture-IR | Reset |
| 10 | Capture-IR | Shift-IR | Exit1-IR |
| 11 | Shift-IR | Shift-IR | Exit1-IR |
| 12 | Exit1-IR | Pause-IR | Update-IR |
| 13 | Pause-IR | Pause-IR | Exit2-IR |
| 14 | Exit2-IR | Shift-IR | Update-IR |
| 15 | Update-IR | Idle | Select-DR |
| Entry | Your decision |
|---|---|
| WAKE | Start in Reset. Clock 0. |
| SELECT | Start in Idle. Clock 1. |
| LOAD | Start in Select-DR. Clock 0. |
| ENTER | Start in Capture-DR. Clock 0. |
| HOLD | Start in Shift-DR. Clock 000. |
| LEAVE | Start in Shift-DR. Clock 1. |
| PARK | Start in Exit1-DR. Clock 00. |
| REJOIN | Start in Pause-DR. Clock 10. |
| COMMIT | Start in Exit2-DR. Clock 1. |
| AGAIN | Start in Update-DR. Clock 100. |
| RECOVER | Start in Shift-IR. Clock 11111. |
| MIXED | Once in Shift-DR, how many shift edges read the entire chain of one 32-bit ID and two one-bit BYPASS stages? |
| BOTH_IDS | How many shift edges read two 32-bit IDCODE registers in one chain? |
| IR_LENGTH | The selected instruction registers have lengths 2 and 5. How many Shift-IR edges fill both? |
| ARRIVAL | Start in Idle and apply the first EDGES bits of 100. Which state have you reached? |
Examples
Example 1
WAKE- Input
Start in Reset. Clock 0.
- Output
answer = 1
The last edge lands in Idle, code 1.
Example 2
SELECT- Input
Start in Idle. Clock 1.
- Output
answer = 2
The last edge lands in Select-DR, code 2.
Example 3
LOAD- Input
Start in Select-DR. Clock 0.
- Output
answer = 3
The last edge lands in Capture-DR, code 3.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For ARRIVAL, enter a constant expression using EDGES. Only this entry changes with the parameter. The supported integer range is 0 through 3, inclusive.
Hints
Hint 1
Mark the stated initial state.
Hint 2
Choose one outgoing arc per digit.
Hint 3
Enter the state occupied after the final rise.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
21 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 3 problems on this path