Problemcore
Latency-constrained scheduling
Also called time-constrained scheduling, minimum-resource latency-constrained scheduling.
Schedule the operations of a sequencing graph within a given number of control steps so that the number of functional units needed is least.
Latency-constrained scheduling is the scheduling problem of high-level synthesis in which the number of control steps is fixed and the goal is to need as few functional units as possible. The latency bound usually comes from a throughput target or from a real-time deadline. The input is a sequencing graph with a delay and a unit type for each operation, and a cost for each unit type, such as its area. A schedule must respect the data edges and end within the bound. The units of a type that it needs are the largest number of operations of that type that run in one step, and the cost is the weighted sum of these numbers. It is the partner of resource-constrained scheduling, which fixes the units and minimizes the latency, and it is NP-hard for the same reason.
In plain words
You must finish a set of dependent calculations within a fixed number of clock ticks. You do not care how fast within that limit, but every multiplier and adder that the chip needs costs area. If many multiplies fall in the same tick, you must build many multipliers. So you want to spread the operations of each kind evenly over the ticks, without breaking the order that the data needs. A tight deadline leaves little room to spread, and a loose one leaves a lot.
Definition
Input.
- A sequencing graph with no cycle.
- For each operation , an integer delay and a type .
- A latency bound , an integer.
- A cost for each type .
Feasible solutions. A schedule with for each edge and for each . Units are not pipelined and there is no chaining, as in resource-constrained scheduling.
Objective. The schedule needs
units of type . Minimize the cost .
Decision form. Given the input and a cost , is there a schedule with cost at most ?
A feasible schedule exists exactly when is at least the critical path, the largest sum of delays on a path of , since the ASAP schedule ends at the critical path.
Variants
- Registers and interconnect. Add the registers, which follow the number of values live across a step, and the multiplexers to the cost. The schedule then fixes more of the area.
- Several unit types per operation. Each operation may run on more than one type, with different delays and costs. The schedule and the module selection are then chosen together.
- Pipelined units. An operation occupies its unit only in its first step, so the count runs over starts only.
- Chaining. The clock period is given and dependent operations may share a step. See operation chaining.
- Loops with a target initiation interval. The latency bound is replaced by a bound on the distance between iterations, and the units are counted modulo .
- Power. Minimize the peak or the variance of the number of active units per step, which is the same kind of balancing.
Examples
Take the differential equation example of Paulin and Knight, with the operations and edges that the high-level synthesis page gives: six multiplies, five ALU operations, unit delays and a critical path of 4. With the cost 1 for each unit, the optimum for each latency bound is
| latency bound | multipliers | ALUs | units in total |
|---|---|---|---|
| 3 | none | none | infeasible |
| 4 | 2 | 2 | 4 |
| 5 | 2 | 1 | 3 |
| 6 | 2 | 1 | 3 |
| 7 | 1 | 1 | 2 |
At , at least 2 multipliers are needed: the paths and have 4 operations each, so the multiplies and must both run in step 0. At , one multiplier is still too few, because six multiplies in a row take steps 0 to 5 and the last one feeds an ALU operation that would end at step 7. The schedule on the force-directed scheduling page reaches the optimum at .
A second example shows why the bound matters for balance. Take four independent additions and . A schedule that puts all four in step 0 needs 4 adders. Two in each step need 2, the optimum, which meets the lower bound .
Known algorithms
- Force-directed scheduling. Paulin and Knight's heuristic balances the expected use of each type over the steps. See force-directed scheduling.
- Integer programming. The 0-1 program with one variable per operation and step, plus one integer variable per type, gives the optimum for small graphs. See the ILP formulation.
- Search over unit vectors. For each unit vector in order of cost, run a resource-constrained scheduler and stop at the first whose latency is at most . This is exact if the inner scheduler is exact. With list scheduling inside it is a heuristic.
- SDC scheduling. An LP over difference constraints can minimize a linear proxy, such as the sum of starts or a lifetime cost, under the latency bound. It does not count units exactly. See SDC scheduling.
- Branch and bound. Search over the frames of the operations, cut off by the lower bounds below.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| SDC-based scheduling | O(V (V + E) + V C) worst | O(V^2 + C) extra | deterministicnot exactofflineiterative | 1 language |
Bounds
Let and be the ASAP and ALAP starts of for the bound , from ASAP and ALAP scheduling. Every schedule has .
Window bound. For steps , let be the sum of over the operations of type with and . In every schedule these operations run entirely inside the steps to , which offer busy cycles of type . So
With and this gives . Narrow windows give better bounds: in the example at , the window from step 0 to 1 holds and , which gives 2 multipliers.
Monotone in . A schedule for is also a schedule for , so the optimum cost does not rise as grows. It reaches , one unit of each type that occurs, once is large enough for a schedule that runs one operation of each type at a time.
Trade-off curve. For one type, the optimum for is the least whose resource-constrained optimum is at most . So the two problems give the same curve of latency against units, read along different axes.
Reductions
In NP. A schedule is a certificate: its starts are below , and the edges, the bound and the cost can be checked in time polynomial in and . If exceeds , it can be replaced by without changing the answer, since every schedule can be shifted to start each operation no later than that.
NP-hard. Take one type with cost 1 and unit delays. The question "is there a schedule within that needs at most units" is the question "can unit-time tasks with precedences finish by the deadline on processors". Ullman (1975) proved this NP-complete when and are part of the input. So the decision form is NP-complete, and minimizing the units is NP-hard. The hard instances have small numbers, so the hardness holds in the strong sense.
Equivalence with resource-constrained scheduling. For one type, an algorithm for either optimization problem solves the other with a binary search over or over , and and need not exceed and . So the two problems are polynomially equivalent.
Applications
- Signal processing datapaths. A filter or a transform must take a new sample every fixed number of cycles, which fixes . The goal is the smallest datapath.
- Real-time control. A control loop has a deadline per period, and the unit count sets the cost of the chip.
- Low power. Spreading the operations evenly lowers the peak current and the number of units that must be powered.
- Design space exploration. Solving it for each gives the area side of the area and latency trade-off curve.
References
- Giovanni De Micheli, Synthesis and Optimization of Digital Circuits, McGraw-Hill, 1994, Chapter 5, Scheduling Algorithms (the sections on scheduling with resource constraints and on force-directed scheduling)
- Pierre G. Paulin and John P. Knight, Force-directed scheduling for the behavioral synthesis of ASICs, IEEE Transactions on Computer-Aided Design 8(6), 661 to 679, 1989, time-constrained scheduling, the distribution graphs and the differential equation example
- J. D. Ullman, NP-complete scheduling problems, Journal of Computer and System Sciences 10(3), 1975, the NP-completeness of scheduling unit-time tasks with precedence constraints on a given number of processors
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag D7QMPD Edit this page History Report an error Markdown