source: soft/giet_vm/giet_python/platforms/tsar_iob_script.py @ 305

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
Line 
1#!/usr/bin/env python
2
3from tsar_generic_iob import *
4from transpose import *
5from 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
21x_size   = 2
22y_size   = 2
23nb_procs = 2
24
25# build empty mapping (no application)
26mapping = tsar_generic_iob( x_size, y_size, nb_procs )
27
28# complete mapping with application(s)
29appli = transpose( mapping )
30mapping.addVspace( appli )
31mapping.name += '_transpose'
32
33appli = sort( mapping )
34mapping.addVspace( appli )
35mapping.name += '_sort'
36
37# save xml file
38path = 'mappings/' + mapping.name + '.xml'
39f = open ( path, 'w' )
40f.write( str( mapping ) )
41
42
Note: See TracBrowser for help on using the repository browser.