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
| Signal | Width | Role |
|---|---|---|
assigned_value | 8 | stimulus, 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.
| Entry | Your decision |
|---|---|
| P_TIME | Finish time on P in µs. |
| E_ACTIVE | Execution energy on E in nJ. |
| MOVE | Extra energy before E starts in nJ. |
| E_TIME | Finish time after moving in µs. |
| E_TOTAL | Total energy for moving and finishing in nJ. |
| P_TOTAL | Total energy for staying in nJ. |
| SAVING | Energy saved in nJ when both choices meet the deadline. |
| IN_ORDER | How many operations issue if P must stop at the first waiting instruction? |
| OUT_OF_ORDER | How many issue when P can bypass the waiting instruction? |
| LATEST | Latest time E may begin its execution for a 10 µs deadline, in µs after job arrival. |
| PLACEMENT | Choose 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