diff options
Diffstat (limited to 'gen')
-rw-r--r-- | gen/edf_generators.py | 11 | ||||
-rw-r--r-- | gen/generator.py | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gen/edf_generators.py b/gen/edf_generators.py index eda23e4..cca4d44 100644 --- a/gen/edf_generators.py +++ b/gen/edf_generators.py | |||
@@ -269,4 +269,15 @@ class CflSplitPgmGenerator(EdfPgmGenerator): | |||
269 | if exp_params['level'] == 'ALL': | 269 | if exp_params['level'] == 'ALL': |
270 | # kludge: assume global task sets are always schedulable | 270 | # kludge: assume global task sets are always schedulable |
271 | is_sched = True | 271 | is_sched = True |
272 | |||
273 | if is_sched: | ||
274 | # compute the minimum time to produce/consume, so this can be discounted | ||
275 | # from the execution time during runtime | ||
276 | for ti in ts: | ||
277 | consume_amount = ti.wss | ||
278 | produce_amount = sum([e.wss for e in ti.node.outEdges]) | ||
279 | consume_time = overheads.read(consume_amount) | ||
280 | produce_time = overheads.write(produce_amount) | ||
281 | ti.cost_discount = consume_time + produce_time | ||
282 | |||
272 | return is_sched, ts | 283 | return is_sched, ts |
diff --git a/gen/generator.py b/gen/generator.py index 8b3a189..e49606d 100644 --- a/gen/generator.py +++ b/gen/generator.py | |||
@@ -152,6 +152,7 @@ class Generator(object): | |||
152 | rates_arg = [] | 152 | rates_arg = [] |
153 | etoe_arg = [] | 153 | etoe_arg = [] |
154 | exec_arg = [] | 154 | exec_arg = [] |
155 | discount_arg = [] | ||
155 | cluster_arg = [] | 156 | cluster_arg = [] |
156 | clustersz_arg = [] | 157 | clustersz_arg = [] |
157 | wss_arg = [] | 158 | wss_arg = [] |
@@ -164,6 +165,7 @@ class Generator(object): | |||
164 | cluster_arg_t = [] | 165 | cluster_arg_t = [] |
165 | graph_desc_arg_t = [] | 166 | graph_desc_arg_t = [] |
166 | exec_arg_t = [] | 167 | exec_arg_t = [] |
168 | discount_arg_t = [] | ||
167 | rates_arg_t = [] | 169 | rates_arg_t = [] |
168 | wss_arg_t = [] | 170 | wss_arg_t = [] |
169 | split_arg_t = [] | 171 | split_arg_t = [] |
@@ -174,6 +176,9 @@ class Generator(object): | |||
174 | cluster_arg_t.append('node_' + str(n.id) + ':' + str(n.task.partition)) | 176 | cluster_arg_t.append('node_' + str(n.id) + ':' + str(n.task.partition)) |
175 | cost_str = format(n.task.cost/1000.0, '.4f').rstrip('0').rstrip('.') | 177 | cost_str = format(n.task.cost/1000.0, '.4f').rstrip('0').rstrip('.') |
176 | exec_arg_t.append('node_' + str(n.id) + ':' + cost_str) | 178 | exec_arg_t.append('node_' + str(n.id) + ':' + cost_str) |
179 | if n.task.cost_discount > 10: | ||
180 | discount_str = format(n.task.cost_discount/1000.0, '.4f').rstrip('0').rstrip('.') | ||
181 | discount_arg_t.append('node_' + str(n.id) + ':' + discount_str) | ||
177 | if n.task.split != 1: | 182 | if n.task.split != 1: |
178 | split_arg_t.append('node_' + str(n.id) + ':' + str(n.task.split)) | 183 | split_arg_t.append('node_' + str(n.id) + ':' + str(n.task.split)) |
179 | if n.isSrc == True: | 184 | if n.isSrc == True: |
@@ -193,12 +198,14 @@ class Generator(object): | |||
193 | cluster_arg_t = ','.join(cluster_arg_t) | 198 | cluster_arg_t = ','.join(cluster_arg_t) |
194 | graph_desc_arg_t = ','.join(graph_desc_arg_t) | 199 | graph_desc_arg_t = ','.join(graph_desc_arg_t) |
195 | exec_arg_t = ','.join(exec_arg_t) | 200 | exec_arg_t = ','.join(exec_arg_t) |
201 | discount_arg_t = ','.join(discount_arg_t) | ||
196 | wss_arg_t = ','.join(wss_arg_t) | 202 | wss_arg_t = ','.join(wss_arg_t) |
197 | split_arg_t = ','.join(split_arg_t) | 203 | split_arg_t = ','.join(split_arg_t) |
198 | rates_arg_t = ','.join(rates_arg_t) | 204 | rates_arg_t = ','.join(rates_arg_t) |
199 | 205 | ||
200 | cluster_arg.append(cluster_arg_t) | 206 | cluster_arg.append(cluster_arg_t) |
201 | exec_arg.append(exec_arg_t) | 207 | exec_arg.append(exec_arg_t) |
208 | discount_arg.append(discount_arg_t) | ||
202 | graph_desc_arg.append(graph_desc_arg_t) | 209 | graph_desc_arg.append(graph_desc_arg_t) |
203 | wss_arg.append(wss_arg_t) | 210 | wss_arg.append(wss_arg_t) |
204 | split_arg.append(split_arg_t) | 211 | split_arg.append(split_arg_t) |
@@ -223,6 +230,8 @@ class Generator(object): | |||
223 | pgm_args_t = ''; | 230 | pgm_args_t = ''; |
224 | pgm_args_t += '--wait --cluster ' + cluster_arg[i] + ' --clusterSize ' + clustersz_arg[i] | 231 | pgm_args_t += '--wait --cluster ' + cluster_arg[i] + ' --clusterSize ' + clustersz_arg[i] |
225 | pgm_args_t += ' --graph ' + graph_desc_arg[i] + ' --rates ' + rates_arg[i] + ' --execution ' + exec_arg[i] | 232 | pgm_args_t += ' --graph ' + graph_desc_arg[i] + ' --rates ' + rates_arg[i] + ' --execution ' + exec_arg[i] |
233 | if len(discount_arg[i]) != 0: | ||
234 | pgm_args_t += ' --discount ' + discount_arg[i] | ||
226 | if len(split_arg[i]) != 0: | 235 | if len(split_arg[i]) != 0: |
227 | pgm_args_t += ' --split ' + split_arg[i] | 236 | pgm_args_t += ' --split ' + split_arg[i] |
228 | if len(wss_arg[i]) != 0: | 237 | if len(wss_arg[i]) != 0: |