Last change
on this file since 305 was
305,
checked in by alain, 10 years ago
|
Introducing python interface to generate the map.xml files.
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[305] | 1 | #!/usr/bin/env python |
---|
| 2 | |
---|
| 3 | from tsar_generic_iob import * |
---|
| 4 | from transpose import * |
---|
| 5 | from sort import * |
---|
| 6 | |
---|
| 7 | ####################################################################################### |
---|
| 8 | # file : tsar_generic_iob_transpose.py |
---|
| 9 | # date : april 2014 |
---|
| 10 | # author : Alain Greiner |
---|
| 11 | ####################################################################################### |
---|
| 12 | # This generic script maps one or several applications on a specific instance |
---|
| 13 | # of the tsar_generic_iob platform. |
---|
| 14 | # The platform mandatory parameters to be defined are: |
---|
| 15 | # - x_size : number of clusters in a row |
---|
| 16 | # - y_size : number of clusters in a column |
---|
| 17 | # - nb_procs : number of processors per cluster |
---|
| 18 | ####################################################################################### |
---|
| 19 | |
---|
| 20 | # define target platform parameters |
---|
| 21 | x_size = 2 |
---|
| 22 | y_size = 2 |
---|
| 23 | nb_procs = 2 |
---|
| 24 | |
---|
| 25 | # build empty mapping (no application) |
---|
| 26 | mapping = tsar_generic_iob( x_size, y_size, nb_procs ) |
---|
| 27 | |
---|
| 28 | # complete mapping with application(s) |
---|
| 29 | appli = transpose( mapping ) |
---|
| 30 | mapping.addVspace( appli ) |
---|
| 31 | mapping.name += '_transpose' |
---|
| 32 | |
---|
| 33 | appli = sort( mapping ) |
---|
| 34 | mapping.addVspace( appli ) |
---|
| 35 | mapping.name += '_sort' |
---|
| 36 | |
---|
| 37 | # save xml file |
---|
| 38 | path = 'mappings/' + mapping.name + '.xml' |
---|
| 39 | f = open ( path, 'w' ) |
---|
| 40 | f.write( str( mapping ) ) |
---|
| 41 | |
---|
| 42 | |
---|
Note: See
TracBrowser
for help on using the repository browser.