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