Match a vendor's benchmark number to the setup that produced it. Then find the line of fine print where your product differs.
Hardware context: Four versions of one C loop on the five-stage ap_rv32, with wait cycles on its data and code ports. Reading vendor benchmark claims
A vendor publishes a score for the five-stage ap_rv32 on the checksum kernel of lessons S8.14 and S8.15. Below it is the long-run table of S8.15: cycles for each iteration, measured on the real core.
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
| Line of the vendor sheet | What it says |
|---|---|
| Core | ap_rv32, five-stage build |
| Score | 22,700 per MHz, cut down to hundreds |
| Compiler output | the unrolled version |
| Clock | 100 MHz |
| Run | 1,000 iterations, answer checked |
| Version | Single-cycle | Five-stage | Data waits 2 | Code waits 1 | Code waits 2 |
|---|---|---|---|---|---|
| in memory | 123 | 163 | 261 | 278 | 417 |
| plain | 60 | 84 | 100 | 152 | 228 |
| scheduled | 60 | 76 | 92 | 152 | 228 |
| unrolled | 42 | 44 | 60 | 88 | 132 |
Code waits slow every fetch; data waits slow every load and store. A score per MHz is 1,000,000 divided by the cycles for each iteration; enter it in hundreds, cut down. Enter a version as 1 for in memory, 2 plain, 3 scheduled, 4 unrolled. Enter a core or a line as the number given in the question.
| Entry | Your decision |
|---|---|
| VENDOR_ITER | Which cycles for each iteration does the vendor's score match? |
| MISSING_LINE | Which line of fine print does the sheet leave out? 1 compiler output, 2 clock, 3 the memories and their waits, 4 run length, 5 answer check. |
| YOUR_ITER | Your product runs the same unrolled code from flash with 2 code waits; data has none. Cycles for each iteration? |
| YOUR_PER_MHZ | Your score per MHz, in hundreds. |
| RATIO_TENTHS | How many times higher is the vendor's number than yours? Enter tenths: 2.5 is 25. |
| DATA_ONLY | If the code sat in fast memory and only the data had 2 waits, cycles for each iteration? |
| BEST_ON_FLASH | With 2 code waits, which version is fastest? |
| SCHED_GAIN_FLASH | With 1 code wait, how many cycles for each iteration does "scheduled" save over "plain"? |
| SCHED_GAIN | With no waits, how many cycles for each iteration does "scheduled" save over "plain"? |
| LOWER_CPI | With no waits, which has the lower CPI: 1 in memory, or 2 plain? |
| FASTER | With no waits, which of those two is faster: 1 in memory, or 2 plain? |
| GROWTH_PERCENT | By how many percent does "in memory" grow from no waits to 2 data waits? Cut down. |
| UNROLLED_AT_W | Cycles for each iteration of the unrolled version on the five-stage core. Each load and store waits W cycles; code has no waits. |
Examples
Example 1
VENDOR ITER- Input
Which cycles for each iteration does the vendor's score match?
- Output
matches = 1
1,000,000 / 44 = 22,727: the unrolled version on the five-stage core, no waits.
Example 2
MISSING LINE- Input
Which line of fine print does the sheet leave out? 1 compiler output, 2 clock, 3 the memories and their waits, 4 run length, 5 answer check.
- Output
matches = 1
The sheet never says where code and data sat, or how many waits they had.
Example 3
YOUR ITER- Input
Your product runs the same unrolled code from flash with 2 code waits; data has none. Cycles for each iteration?
- Output
matches = 1
The "Code waits 2" column of the unrolled row.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For UNROLLED_AT_W, enter a constant expression using W. Only this entry changes with the parameter. The supported integer range is 0 through 5, inclusive.
Hints
Hint 1
Turn the score back into cycles for each iteration, and find that cell.
Hint 2
Go down the fine print: compiler, memories and waits, clock, run length, answer check.
Hint 3
Read the cell that matches your product, not the vendor's.
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