Ignore:
Timestamp:
Jun 16, 2014, 3:15:08 PM (10 years ago)
Author:
alain
Message:

Introduce genmap tool in giet_python

File:
1 moved

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_python/genmap

    r325 r328  
    22
    33#######################################################################################
    4 #   file   : tsarmap
     4#   file   : genmap
    55#   date   : april 2014
    66#   author : Alain Greiner
     
    3434# - sort (one thread per processor)
    3535# - transpose (one thread per processor)
     36# - convol (one thread per processor)
    3637#######################################################################################
    3738
     
    4243from transpose import *
    4344from sort import *
     45from convol import *
    4446
    4547import sys
     
    8688parser.add_option( '--transpose', action = 'store_true', dest = 'transpose',
    8789                   default = False,
    88                    help = 'map the "transpose" application for the GIET' )
     90                   help = 'map the "transpose" application for the GietVM' )
    8991
    9092parser.add_option( '--sort', action = 'store_true', dest = 'sort',     
    9193                   default = False,
    92                    help = 'map the "sort" application for the GIET' )
     94                   help = 'map the "sort" application for the GietVM' )
     95
     96parser.add_option( '--convol', action = 'store_true', dest = 'filt',     
     97                   default = False,
     98                   help = 'map the "convol" application for the GietVM' )
    9399
    94100######################################################################################
     
    112118xml_path      = options.xml_path    # path for map.xml file     
    113119
    114 map_transpose = options.transpose   # map "sort" application if True
    115 map_sort      = options.sort        # map "transpose" application if True
     120map_transpose = options.transpose   # map "transpose" application if True
     121map_sort      = options.sort        # map "sort" application if True
     122map_convol    = options.filt        # map "convol" application if True
    116123
    117124######################################################################################
     
    131138# build mapping calling the function (function name)
    132139mapping = select.genmap( x_size, y_size, nprocs )
    133 print '[tsarmap] platform %s build' % mapping.name
     140print '[genmap] platform %s build' % mapping.name
    134141
    135142# generate the hard_confi.h file for top.cpp compilation
     
    137144f = open ( pathname, 'w' )
    138145f.write( mapping.hard_config() )
    139 print '[tsarmap] %s generated' % pathname
     146print '[genmap] %s generated' % pathname
    140147
    141148######################################################################################
     
    145152if ( map_transpose ):
    146153    transpose( mapping )
    147     print '[tsarmap] application "transpose" loaded'
     154    print '[genmap] application "transpose" loaded'
    148155
    149156if ( map_sort ):     
    150157    sort( mapping )
    151     print '[tsarmap] application "sort" loaded'
     158    print '[genmap] application "sort" loaded'
     159
     160if ( map_convol ):     
     161    convol( mapping )
     162    print '[genmap] application "convol" loaded'
    152163
    153164######################################################################################
     
    160171    f = open ( pathname, 'w' )
    161172    f.write( mapping.xml() )
    162     print '[tsarmap] %s generated for debug' % pathname
     173    print '[genmap] %s generated for debug' % pathname
    163174
    164175######################################################################################
     
    171182    f = open ( pathname, 'w' )
    172183    f.write( mapping.netbsd_dts() )
    173     print '[tsarmap] %s generated for netbsd' % pathname
     184    print '[genmap] %s generated for netbsd' % pathname
    174185
    175186######################################################################################
     
    182193    f = open ( pathname, 'w' )
    183194    f.write( mapping.almos_arch() )
    184     print '[tsarmap] %s generated for almos' % pathname
     195    print '[genmap] %s generated for almos' % pathname
    185196
    186197######################################################################################
     
    194205    f = open ( pathname, 'w' )
    195206    f.write( str( mapping.cbin( verbose ) ) )
    196     print '[tsarmap] %s generated for giet_vm' % pathname
     207    print '[genmap] %s generated for giet_vm' % pathname
    197208
    198209    pathname = giet_path + '/hard_config.h'
    199210    f = open ( pathname, 'w' )
    200211    f.write( mapping.hard_config() )
    201     print '[tsarmap] %s generated for giet_vm' % pathname
     212    print '[genmap] %s generated for giet_vm' % pathname
    202213
    203214    pathname = giet_path + '/giet_vsegs.ld'
    204215    f = open ( pathname, 'w' )
    205216    f.write( mapping.giet_vsegs() )
    206     print '[tsarmap] %s generated for giet_vm' % pathname
    207 
     217    print '[genmap] %s generated for giet_vm' % pathname
     218
Note: See TracChangeset for help on using the changeset viewer.