Follow five trace bytes from two sources through one link, find the stalls and the flush acknowledge, and work out what the buffer still holds.
Hardware context: Trace link of ap_soc: a core source and a timer source, a funnel and a circular buffer of four places. Reading a trace capture from an on-chip buffer during bring-up
This is the trace link of lesson S8.10 with other bytes. Two trace sources share one link through a funnel. A byte moves on a clock edge where valid and ready are both 1. The funnel serves source 1 until it has no byte left, then source 2. The bytes end in a circular buffer of four places, where the newest byte replaces the oldest.
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 |
|---|---|
| Source 1 (the core source, ID 1) | Three bytes wait: a start packet, then two more packets. |
| Source 2 (the timer source, ID 2) | Two bytes wait. |
| Ready, at edges 0 to 8 | 1, 1, 0, 0, 1, 1, 1, 1, 1 |
| Flush request | 1 from edge 3 on. It goes back to 0 one edge after the acknowledge is seen at 1. |
| Flush acknowledge | 1 on the edge after the last waiting byte has moved. |
Valid is 1 as long as either source has a byte left. Edges are counted from 0. Enter an edge as its number: 4 for edge 4.
| Entry | Your decision |
|---|---|
| FIRST_MOVE | The edge on which the first byte moves. |
| SECOND_MOVE | The edge on which the second byte moves. |
| FIRST_STALL | The first edge on which a byte waits. |
| THIRD_MOVE | The edge on which the third byte moves. |
| STALLS | On how many edges did a byte wait? |
| ID_AT_5 | The ID of the source whose byte moves at edge 5. |
| LAST_MOVE | The edge on which the last byte moves. |
| MOVES | How many bytes moved in all? |
| ACK_EDGE | The edge on which the flush acknowledge is seen at 1. |
| OLDEST_EDGE | The edge on which the oldest byte still in the buffer moved. |
| START_KEPT | Is the start packet of source 1 still in the buffer? 1 for yes, 2 for no. |
| FROM_SOURCE_1 | How many of the four bytes in the buffer came from source 1? |
| LOST_N | Suppose the buffer had N places in place of 4. How many of the five bytes would be lost? |
Examples
Example 1
FIRST MOVE- Input
The edge on which the first byte moves.
- Output
matches = 1
Valid and ready are both 1 at edge 0.
Example 2
SECOND MOVE- Input
The edge on which the second byte moves.
- Output
matches = 1
Ready is still 1 at edge 1.
Example 3
FIRST STALL- Input
The first edge on which a byte waits.
- Output
matches = 1
Ready is 0 at edge 2. The third byte of source 1 stays on the link.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For LOST_N, enter a constant expression using N. Only this entry changes with the parameter. The supported integer range is 1 through 5, inclusive.
Hints
Hint 1
Go through the edges. A byte moves where valid and ready are both 1. During a stall the same byte stays.
Hint 2
Source 1 is served until it is empty. The ID on the link then changes to 2.
Hint 3
The buffer keeps the newest four bytes. The acknowledge comes one edge after the last move.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
13 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