Route six accesses of ap_fpga by hand, and price each trip across the seam on a faster fabric clock.
Hardware context: ap_fpga: the hard half of ap_soc beside a fabric, joined by a window, a fabric port and one interrupt line. FPGA SoC integration: ports, clocks and the memory map between the processor system and the fabric
This is the seam of lesson S10.14 with a faster fabric clock. The hard clock has rising edges at 5, 15, 25 ns and so on. The fabric clock has rising edges at 7, 27, 47 ns and so on, every 20 ns. The two halves share the decoder and the crossings of the lesson.
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
| Address | Where the hard half sends it |
|---|---|
| 8000_0000 to 8000_FFFF | SRAM, one cycle |
| 4000_0000 to 4000_0FFF | The fabric window: an error in one cycle while the fabric holds no design, else a crossing |
| Anything else | Nothing is decoded in this lab |
| Route | Code |
|---|---|
| SRAM | 1 |
| Fabric, through the crossing | 2 |
| Error at once | 3 |
| Nothing decoded | 4 |
A crossing: the asking side flips a toggle on its edge. The answering side notices on its second edge after that, acts on the next edge, and flips a toggle back. The asking side notices on its second edge after that. Count rising edges of the asking clock from the one that sends to the one that notices, both counted.
Enter a code, a time in ns, or a count. Every time and count here fits in 0 to 255.
| Entry | Your decision |
|---|---|
| ROUTE_SRAM | The route of a read of 8000_0010. |
| ROUTE_EARLY | The route of a read of 4000_0004 before the fabric holds a design. |
| ROUTE_LATE | The route of the same read after the fabric holds its design. |
| ROUTE_OTHER | The route of a read of 2000_0000. |
| FIRST_EDGE | A write into the fabric is sent at 55 ns. At what time is the first fabric edge after that? |
| ACT_EDGE | At what time does the fabric write its register? |
| WRITE_CYCLES | How many hard rising edges does that write cost? |
| READ_CYCLES | A read of the fabric is sent at 145 ns. How many hard rising edges does it cost? |
| PORT_CYCLES | A manager in the fabric sends a write into SRAM on the fabric edge at 227 ns. How many fabric rising edges does it cost? |
| IRQ_CYCLES | The fabric raises its interrupt line on its edge at 327 ns. After how many hard rising edges has the line passed both flip-flops? |
| POLL_SAVED | Six polls of a fabric register cost 43 hard cycles. How many cycles would the same six polls of SRAM save? |
| WRITE_AT_P | The fabric clock has a period of P ns, with its first rising edge at 13 ns. The hard clock is as in the tables. A write into the fabric is sent at 55 ns. How many hard rising edges does it cost, both ends counted? |
Examples
Example 1
ROUTE SRAM- Input
The route of a read of 8000_0010.
- Output
matches = 1
SRAM answers in one cycle.
Example 2
ROUTE EARLY- Input
The route of a read of 4000_0004 before the fabric holds a design.
- Output
matches = 1
Nobody can answer, so the window answers an error at once.
Example 3
ROUTE LATE- Input
The route of the same read after the fabric holds its design.
- Output
matches = 1
The request crosses into the fabric and back.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For WRITE_AT_P, enter a constant expression using P. Only this entry changes with the parameter. The supported integer range is 20 through 120, inclusive.
- Replace each unfinished 255 with your decision.
Hints
Hint 1
Find the route before you count anything. Only the fabric route crosses.
Hint 2
Write the edges of both clocks near the request. Mark the edge that sends.
Hint 3
Two edges to notice, one to act, two back; count from the sending edge to the noticing edge.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
12 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