S8.15.1 Read the Vendor Number

MediumImplement22 minIcarus Verilog · serverReview the topic

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

SignalWidthRole
question8input of each check
Full specification
Line of the vendor sheetWhat it says
Coreap_rv32, five-stage build
Score22,700 per MHz, cut down to hundreds
Compiler outputthe unrolled version
Clock100 MHz
Run1,000 iterations, answer checked
VersionSingle-cycleFive-stageData waits 2Code waits 1Code waits 2
in memory123163261278417
plain6084100152228
scheduled607692152228
unrolled42446088132

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.

EntryYour decision
VENDOR_ITERWhich cycles for each iteration does the vendor's score match?
MISSING_LINEWhich 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_ITERYour product runs the same unrolled code from flash with 2 code waits; data has none. Cycles for each iteration?
YOUR_PER_MHZYour score per MHz, in hundreds.
RATIO_TENTHSHow many times higher is the vendor's number than yours? Enter tenths: 2.5 is 25.
DATA_ONLYIf the code sat in fast memory and only the data had 2 waits, cycles for each iteration?
BEST_ON_FLASHWith 2 code waits, which version is fastest?
SCHED_GAIN_FLASHWith 1 code wait, how many cycles for each iteration does "scheduled" save over "plain"?
SCHED_GAINWith no waits, how many cycles for each iteration does "scheduled" save over "plain"?
LOWER_CPIWith no waits, which has the lower CPI: 1 in memory, or 2 plain?
FASTERWith no waits, which of those two is faster: 1 in memory, or 2 plain?
GROWTH_PERCENTBy how many percent does "in memory" grow from no waits to 2 data waits? Cut down.
UNROLLED_AT_WCycles 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

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

VENDOR ITER

Input
Which cycles for each iteration does the vendor's score match?
Expected output
matches = 1

1,000,000 / 44 = 22,727: the unrolled version on the five-stage core, no waits.

Run samples executes all 3 public checks. Check all tests runs 13 checks on the server.

Icarus Verilog · server