S1.5.2 Spend the Speed-Up Wisely

MediumOptimize22 minIcarus Verilog · serverReview the topic

A job has a part that can be made faster and a part that cannot. Find what each improvement is really worth.

Hardware context: A job in two parts, one of them a slow unit that can be made faster. Architecture trade-off studies

A job takes 100 s. A filter takes 80 s of it. Everything else takes 20 s. The team can pay for one improvement.

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

Speed-up of the whole job is the old total time divided by the new total time.

EntryYour decision
RESTHow many seconds does a faster filter leave untouched?
NEW_FILTERThe filter is made 4 times faster. How many seconds does it now take?
NEW_TOTALWhat is the total time with that filter, in seconds?
SPEEDUP_TIMES_10What is the speed-up of the whole job, times 10?
LIMITThe filter becomes endlessly fast. What is the largest speed-up of the whole job?
TOTAL_AOption A makes the filter 2 times faster. Total time in seconds?
TOTAL_BOption B makes everything else 10 times faster. Total time in seconds?
BESTWhich option gives the shorter job? Enter 1 for A or 2 for B.
FILTER_BUDGETThe whole job must take 30 s. Only the filter may change. How many seconds may the filter take?
FACTOR_NEEDEDHow many times faster must the filter become for that?
REACHABLECan a faster filter alone bring the job to 15 s? Enter 1 for yes or 0 for no.
TOTAL_AT_FACTORThe part of 80 s is made FACTOR times faster. What is the total time in seconds?

Examples

Example 1

REST
Input
How many seconds does a faster filter leave untouched?
Output
matches = 1

Only the filter changes. The other 20 s stay.

Example 2

NEW FILTER
Input
The filter is made 4 times faster. How many seconds does it now take?
Output
matches = 1

Eighty divided by four.

Example 3

NEW TOTAL
Input
What is the total time with that filter, in seconds?
Output
matches = 1

Twenty for the filter and twenty for the rest.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For TOTAL_AT_FACTOR, enter a constant expression using FACTOR. Only this entry changes with the parameter. The supported integer range is 1 through 80, inclusive.

Hints

Hint 1

Write the time of the part that changes and of the part that does not.

Hint 2

Divide only the changed part by its factor.

Hint 3

The speed-up is the old total over the new total.

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 3 problems 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

REST

Input
How many seconds does a faster filter leave untouched?
Expected output
matches = 1

Only the filter changes. The other 20 s stay.

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

Icarus Verilog · server