S10.2.1 Which Core for This Task

MediumImplement22 minIcarus Verilog · serverReview the topic

Place a frame job under a deadline and charge for moving its working set.

Hardware context: Two-core read-only cache model. Frame deadlines and placement

A frame job starts on P. Staying takes 5 µs at 12 mW. Moving to E takes 2 µs and 8 nJ before execution. Execution there takes 7 µs at 5 mW. These invented exercise values describe one job.

This worksheet uses named constants. The first three entries show how to record your decisions.

Signals in the Timeline

SignalWidthRole
assigned_value8stimulus, the same for every design
Full specification

Count active energy and the stated move cost only. Choose the least-energy option meeting the inclusive deadline. Return 0 if neither meets it, 1 for P and 2 for E. One mW times one µs is one nJ.

Separately inspect one issue cycle on P. Its oldest three operations are ready, waiting for a header, and ready, in that order. Both ready operations have free execution units. P can issue two operations. These snapshots do not change the quoted job times.

EntryYour decision
P_TIMEFinish time on P in µs.
E_ACTIVEExecution energy on E in nJ.
MOVEExtra energy before E starts in nJ.
E_TIMEFinish time after moving in µs.
E_TOTALTotal energy for moving and finishing in nJ.
P_TOTALTotal energy for staying in nJ.
SAVINGEnergy saved in nJ when both choices meet the deadline.
IN_ORDERHow many operations issue if P must stop at the first waiting instruction?
OUT_OF_ORDERHow many issue when P can bypass the waiting instruction?
LATESTLatest time E may begin its execution for a 10 µs deadline, in µs after job arrival.
PLACEMENTChoose a core under DEADLINE µs, including migration.

Examples

Example 1

P TIME
Input
Finish time on P in µs.
Output
matches = 1

Staying incurs no move.

Example 2

E ACTIVE
Input
Execution energy on E in nJ.
Output
matches = 1

Seven microseconds times five milliwatts gives 35 nJ.

Example 3

MOVE
Input
Extra energy before E starts in nJ.
Output
matches = 1

The handoff costs eight nJ.

Constraints and Contract

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

Hints

Hint 1

Draw the handoff before execution.

Hint 2

Keep time and energy in separate columns.

Hint 3

A cheaper choice still has to finish in time.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed. The waveform shows the assigned DEADLINE on its own row.

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 2 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

P TIME

Input
Finish time on P in µs.
Expected output
matches = 1

Staying incurs no move.

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

Icarus Verilog · server