Skip to content

Commit 6ec5940

Browse files
mwaskolgirdwood
authored andcommitted
arch: fw: mpp scheduling using zephyr
SOF MPP scheduling description and flows using zephyr rtos infrastructure Signed-off-by: Michal Wasko <[email protected]>
1 parent 2371a1d commit 6ec5940

10 files changed

+917
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
blockdiag edf_scheduling {
2+
3+
node_width = 250;
4+
node_height = 120;
5+
default_fontsize = 16;
6+
7+
Comp_1 -> Comp_2
8+
comment_1 -> Comp_2 [style=dashed]
9+
Comp_2 -> Comp_3
10+
comment_2 -> Comp_3 [style=dashed]
11+
Comp_3 -> Comp_4
12+
comment_3 -> Comp_4 [style=dashed]
13+
Comp_4 -> sink
14+
comment_4 -> sink [style=dashed]
15+
16+
Comp_1 [label="DP component 1\n
17+
*processing period\n
18+
*compute requirement"]
19+
Comp_2 [label="DP component 2\n
20+
*processing period\n
21+
*compute requirement"]
22+
Comp_3 [label="DP component 3\n
23+
*processing period\n
24+
*compute requirement"]
25+
Comp_4 [label="DP component 4\n
26+
*processing period\n
27+
*compute requirement"]
28+
29+
sink [label="real time sink", shape=endpoint, fontsize = 16]
30+
31+
comment_1 [label="DP1 to deliver data let\n
32+
DP2 meet its objective"]
33+
comment_2 [label="DP2 to deliver data let\n
34+
DP3 meet its objective"]
35+
comment_3 [label="DP3 to deliver data let\n
36+
DP4 meet its objective"]
37+
comment_4 [label="DP4 to deliver data\n
38+
to real time-sink"]
39+
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
@startuml
2+
3+
Title DP tasks scheduling on secondary DSP core
4+
5+
legend
6+
Assumptions:
7+
1) 1ms scheduling
8+
2) No LL tasks assigned to example secondary DSP core
9+
3) DP Task B do not depend on Task A completion
10+
(otherwise, Task B would start on next timer interrupt after A
11+
completion)
12+
end legend
13+
14+
scale 1 as 150 pixels
15+
16+
concise "Task B" as Task_B
17+
concise "Task A" as Task_A
18+
19+
concise "DP task processing" as DP_Processing
20+
robust "DSP" as DSP
21+
concise "Timer interrupt" as Interrupt
22+
23+
24+
@Task_A
25+
0 is Busy
26+
1.5 is {-}
27+
28+
4 is Busy
29+
5.5 is {-}
30+
31+
8 is Busy
32+
9.5 is {-}
33+
34+
@0 <-> @4: Task A schedule period (4ms)
35+
@4 <-> @5.5: Task A execution time (1.5ms)
36+
37+
DP_Processing@0 -[#Orange]> Task_A@0
38+
DP_Processing@1 -[#Orange]> Task_A@1
39+
40+
41+
42+
@Task_B
43+
0 is Busy
44+
2 is {-}
45+
46+
6 is Busy
47+
8 is {-}
48+
49+
@0 <-> @6: Task B schedule period (6ms)
50+
@6 <-> @8: Task B execution time (2ms)
51+
52+
[email protected] -[#Brown]> Task_B@0
53+
DP_Processing@2 -[#Brown]> [email protected]
54+
DP_Processing@3 -[#Brown]> [email protected]
55+
[email protected] -[#Brown]> Task_B@2
56+
57+
DSP is Idle
58+
DP_Processing is {-}
59+
60+
@0
61+
DP_Processing is "A"
62+
63+
@0
64+
Interrupt -[#DarkViolet]> DSP
65+
DSP -> DP_Processing
66+
DSP is "Scheduling"
67+
DP_Processing is "A"
68+
69+
@1
70+
Interrupt -[#DarkViolet]> DSP
71+
DSP -> DP_Processing
72+
DP_Processing is "A"
73+
74+
@1.5
75+
DP_Processing -> DSP
76+
DSP -> DP_Processing
77+
DP_Processing is "B"
78+
79+
@2
80+
Interrupt -[#DarkViolet]> DSP
81+
DSP -> DP_Processing
82+
DP_Processing is "B"
83+
84+
@3
85+
Interrupt -[#DarkViolet]> DSP
86+
DSP -> DP_Processing
87+
DP_Processing is "B"
88+
89+
@3.5
90+
DP_Processing -> DSP
91+
DSP is Idle
92+
DP_Processing is {-}
93+
94+
@4
95+
Interrupt -[#DarkViolet]> DSP
96+
DSP is "Scheduling"
97+
DSP -> DP_Processing
98+
DP_Processing is "A"
99+
100+
@5
101+
Interrupt -[#DarkViolet]> DSP
102+
DSP -> DP_Processing
103+
DP_Processing is "A"
104+
105+
@5.5
106+
DP_Processing -> DSP
107+
DSP is Idle
108+
DP_Processing is {-}
109+
110+
@6.001
111+
Interrupt -[#DarkViolet]> DSP
112+
DSP -> DP_Processing
113+
DSP is "Scheduling"
114+
DP_Processing is "B"
115+
116+
@7.001
117+
Interrupt -[#DarkViolet]> DSP
118+
DSP -> DP_Processing
119+
DP_Processing is "B"
120+
121+
@8.001
122+
Interrupt -[#DarkViolet]> DSP
123+
DSP -> DP_Processing
124+
DP_Processing is "A"
125+
126+
@9.001
127+
Interrupt -[#DarkViolet]> DSP
128+
DSP -> DP_Processing
129+
DP_Processing is "A"
130+
131+
@9.5
132+
DP_Processing -> DSP
133+
DSP is Idle
134+
DP_Processing is {-}
135+
136+
@enduml
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
@startuml
2+
3+
Title Task scheduling on DSP core
4+
5+
legend
6+
Assumptions:
7+
1) 1ms scheduling
8+
2) 0.1ms takes LL task execution
9+
3) 0.5ms takes execution of all DP tasks
10+
end legend
11+
12+
scale 1 as 200 pixels
13+
14+
concise "DP Tasks Processing" as DP_Processing
15+
concise "LL Tasks Processing" as LL_Processing
16+
robust "DSP" as DSP
17+
concise "Timer Interrupt" as Interrupt
18+
19+
DSP is Idle
20+
21+
@DSP
22+
@1.2 <-> @2: Time available for\nDP tasks execution
23+
@2.2 <-> @2.7: Actual execution time\nof DP tasks
24+
@3 <-> @3.2: Actual execution time\nof LL tasks
25+
26+
@Interrupt
27+
@0 <-> @1 : Schedule period
28+
29+
@0
30+
Interrupt -> DSP
31+
DSP -> LL_Processing
32+
DSP is "Scheduling tasks"
33+
LL_Processing is Busy
34+
DP_Processing is {-}
35+
36+
@+0.2
37+
DSP -> DP_Processing
38+
LL_Processing is {-}
39+
DP_Processing is Busy
40+
41+
@+0.5
42+
DP_Processing -> DSP
43+
DP_Processing is {-}
44+
DSP is Idle
45+
46+
@1
47+
Interrupt -> DSP
48+
DSP -> LL_Processing
49+
DSP is "Scheduling tasks"
50+
LL_Processing is Busy
51+
52+
@+0.2
53+
DSP -> DP_Processing
54+
LL_Processing is {-}
55+
DP_Processing is Busy
56+
57+
@+0.5
58+
DP_Processing -> DSP
59+
DP_Processing is {-}
60+
DSP is Idle
61+
62+
@2
63+
Interrupt -> DSP
64+
DSP -> LL_Processing
65+
DSP is "Scheduling tasks"
66+
LL_Processing is Busy
67+
68+
@+0.2
69+
DSP -> DP_Processing
70+
LL_Processing is {-}
71+
DP_Processing is Busy
72+
73+
@+0.5
74+
DP_Processing -> DSP
75+
DP_Processing is {-}
76+
DSP is Idle
77+
78+
@3
79+
Interrupt -> DSP
80+
DSP -> LL_Processing
81+
DSP is "Scheduling tasks"
82+
LL_Processing is Busy
83+
84+
@+0.2
85+
DSP -> DP_Processing
86+
87+
LL_Processing is {-}
88+
DP_Processing is Busy
89+
90+
@+0.5
91+
DP_Processing -> DSP
92+
DP_Processing is {-}
93+
DSP is Idle
94+
95+
@enduml
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
@startuml
2+
3+
Title Tasks scheduling on multiple DSP cores
4+
5+
legend
6+
Assumptions:
7+
1) 1ms system tick
8+
9+
Notes:
10+
2) Core #0 has only LL tasks assigned schedule in 1ms period
11+
3) Core #1 has one DP task assigned that is dependent on Core #0 LL tasks data, scheduled in 1ms period
12+
(e.g. multicore pipeline with DP module scheduled on separate core)
13+
4) Core #2 has LL tasks scheduled in 1ms period and DP task scheduled in 2ms period
14+
(e.g. pipeline processing with LL and DP components components where DP component has 2ms scheduling period)
15+
end legend
16+
17+
scale 1 as 300 pixels
18+
19+
concise "DSP #2" as DSP_2
20+
concise "DSP #1" as DSP_1
21+
concise "DSP #0" as DSP_0
22+
23+
concise "Timer interrupt" as Interrupt
24+
25+
@DSP_0
26+
0 is "LL proc."
27+
0.5 is {-}
28+
29+
1 is "LL proc."
30+
1.5 is {-}
31+
32+
2 is "LL proc."
33+
2.5 is {-}
34+
35+
3 is "LL proc."
36+
3.5 is {-}
37+
38+
4 is "LL proc."
39+
4.5 is {-}
40+
41+
@0 <-> @1: DSP#0 LL schedule period (1ms)
42+
43+
@DSP_1
44+
0 is {-}
45+
46+
1 is "DP proc."
47+
1.6 is {-}
48+
49+
2 is "DP proc."
50+
2.6 is {-}
51+
52+
3 is "DP proc."
53+
3.6 is {-}
54+
55+
4 is "DP proc."
56+
4.6 is {-}
57+
5 is {-}
58+
59+
@0 <-> @1: delay one period (waiting for first DSP#0 LL data)
60+
@1 <-> @2: DSP#1 DP schedule period (1ms)
61+
62+
@DSP_2
63+
64+
0 is "LL proc."
65+
0.3 is {-}
66+
67+
1 is "LL proc."
68+
1.3 is {-}
69+
70+
2 is "LL proc."
71+
2.3 is "DP proc."
72+
73+
3 is "LL proc."
74+
3.3 is "DP proc."
75+
3.7 is {-}
76+
77+
4 is "LL proc."
78+
4.3 is "DP proc."
79+
80+
@0 <-> @1: DSP#2 LL schedule period (1ms)
81+
@2.3 <-> @4.3: DSP#2 DP schedule period (2ms)
82+
83+
@0
84+
Interrupt -[#DarkViolet]> DSP_0
85+
Interrupt -[#DarkViolet]> DSP_1
86+
Interrupt -[#DarkViolet]> DSP_2
87+
88+
@1
89+
Interrupt -[#DarkViolet]> DSP_0
90+
Interrupt -[#DarkViolet]> DSP_1
91+
Interrupt -[#DarkViolet]> DSP_2
92+
93+
@2
94+
Interrupt -[#DarkViolet]> DSP_0
95+
Interrupt -[#DarkViolet]> DSP_1
96+
Interrupt -[#DarkViolet]> DSP_2
97+
98+
@3
99+
Interrupt -[#DarkViolet]> DSP_0
100+
Interrupt -[#DarkViolet]> DSP_1
101+
Interrupt -[#DarkViolet]> DSP_2
102+
103+
@4
104+
Interrupt -[#DarkViolet]> DSP_0
105+
Interrupt -[#DarkViolet]> DSP_1
106+
Interrupt -[#DarkViolet]> DSP_2
107+
108+
@enduml

0 commit comments

Comments
 (0)