Title: Minimizing Buffer Requirements of Synchronous Dataflow Graphs with Model Checking
1Minimizing Buffer Requirements of Synchronous
Dataflow Graphs with Model Checking
- Marc Geilen, Twan Basten and
- Sander Stuijk
2Introduction
- DSP software synthesis
- Single appearance schedule (SAS)
- Minimize code size
- Multi-processor systems-on-chip
- Kernels in multimedia applications
- Reduce cost and improve energy efficiency
3Synchronous Dataflow Graphs Lee87
actor
channel
rate
token
4Storage space
(a,2),(ß,0)
Tokens on channels must be stored in memory.
- Shared memory for all channels
- Separate memory for each channel
- Shared memory for sets of channels
5Problem definition
(a,2),(ß,0)
- Problem
- Smallest size storage capacity for deadlockfree
execution. - Schedule that realizes a continuing, infinite
execution within these bounds. - Problem is NP-complete Bhatt96
- Heuristics to determine small but sufficient
buffersizes exist.
6SDF state space
(a,4),(ß,0)
(a,0),(ß,0)
(a,2),(ß,0)
(a,0),(ß,0)
(a,4),(ß,0)
(a,2),(ß,0)
(a,1),(ß,1)
7Scheduling
- Schedules are (infinite) paths through theSDF
state space - Cycles are periodic schedules
- There exists a bounded schedule if and onlyif
there is a cycle
8A schedule and the storage space
- The buffer size of a schedule is the LUB of the
numbersof tokens in the buffers during the
schedule - Shared maximum of the sum of the number of
stored tokens - Separate sum of the maximum numbers of stored
tokens
9Problem definition
- Problem
- Smallest size storage capacity for deadlock free
execution. - Schedule that realizes a continuing, infinite
execution within these bounds. - In terms of the state-space
- Find a cycle in the SDF state-
- space with the smallest bound
10Model checking
- Model-checking
- Used for NP-complete scheduling problems
- Search complete state space to prove a property
- Use partial-order reduction to reduce state space
- Model-checker SPIN
- General-purpose model-checking tool
- State space defined in modeling language Promela
- State spaces of up to 108 states
- Partial search modes for larger spaces
11Model-checking state space
(0,0)
- Model-checking state (a, ß, max a, max ß)
(0,0,0,0)
(2,0,2,0)
(4,0,4,0)
(1,1,4,1)
(3,1,4,1)
(0,2,4,2)
(0,0,4,2)
A
B
C
A
A
B
A
B
(2,0,4,2)
(3,1,4,2)
A
A
B
(4,0,4,2)
(1,1,4,2)
12Computing minimum buffer size
- Verification Claim
- There exists no schedule of the graph which does
not exceed the total buffer size b - Counter example if the claim is not true(i.e.
periodic schedule) - Shared and separate memory case can be modeled
- Binary search to find the smallest b for which
the claimis false
13Problem space exploration
- Upper-bound (ub) using balance equations Lee87
- Lower-bound (lb) per channel Murthy96
- Binary search to find minimal buffer requirements
14Encoding in Promela (separate memory)
- int ch2 Channel contents (a ch0, ß
ch1) - int sz2 Channel sizes
Claim always eventually SUMgtBOUND define p
SUMgtBOUND define BOUND 6 define SUM
sz0sz1
15Encoding in Promela
define WAIT(c,n) chcgtn define CONSUME(c,n)
chc chc - n define PRODUCE(c,n) chc
chc n UPDATE(c) define UPDATE(c) if
chcgtszc -gt szc chc else fi
- proctype Actor_a()
- do
- atomic
- PRODUCE(0,2)
- od
-
- proctype Actor_b()
- do
- atomic
- WAIT(0,3) -gt
- CONSUME(0,3)
- PRODUCE(1,1)
- od
-
16Experiment sample rate converter
17Experiment modem
1
1
1
1
1
1
1
2
1
1
2
1
1
2
1
1
2
2
2
2
2
2
1
1
1
8
2
4
2
2
2
2
1
1
2
2
1
18Experiment example graph
19Experiment H.263 decoder
20Conclusions and future work
- Exact minimum memory requirements.
- Different measures of storage considered.
- Experiments show encouraging results.
- Use additional partial-order reductions to
reducemodel-checking state space. - Explore throughput vs. memory trade-off.
- Extend the approach to BDF graphs.
21Experimental results