Changeset 591 for soft


Ignore:
Timestamp:
Jul 8, 2015, 4:02:09 PM (9 years ago)
Author:
alain
Message:

Introduce support for new applications (11 applications supported).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_python/genmap

    r580 r591  
    3030###################################################################################
    3131# The supported applications are:
    32 # - sort
    33 # - transpose
     32# - classif
    3433# - convol
    35 # - router
    36 # - classif
     34# - coproc
     35# - dhrystone
    3736# - display
    3837# - gameoflife
    39 # - coproc
     38# - ocean
     39# - router
     40# - sort
     41# - shell
     42# - transpose
    4043###################################################################################
    4144
     
    102105############  supported applications   ############################################
    103106
     107parser.add_option( '--classif', action = 'store_true', dest = 'classif',     
     108                   default = False,
     109                   help = 'map the "classif" application for the GietVM' )
     110
     111parser.add_option( '--convol', action = 'store_true', dest = 'convol',     
     112                   default = False,
     113                   help = 'map the "convol" application for the GietVM' )
     114
     115parser.add_option( '--coproc', action = 'store_true', dest = 'coproc',     
     116                   default = False,
     117                   help = 'map the "coproc" application for the GietVM' )
     118
     119parser.add_option( '--dhrystone', action = 'store_true', dest = 'dhrystone',     
     120                   default = False,
     121                   help = 'map the "dhrystone" application for the GietVM' )
     122
     123parser.add_option( '--display', action = 'store_true', dest = 'display',     
     124                   default = False,
     125                   help = 'map the "display" application for the GietVM' )
     126
     127parser.add_option( '--gameoflife', action = 'store_true', dest = 'gameoflife',     
     128                   default = False,
     129                   help = 'map the "gameoflife" application for the GietVM' )
     130
     131parser.add_option( '--ocean', action = 'store_true', dest = 'ocean',     
     132                   default = False,
     133                   help = 'map the "ocean" application for the GietVM' )
     134
     135parser.add_option( '--router', action = 'store_true', dest = 'router',     
     136                   default = False,
     137                   help = 'map the "router" application for the GietVM' )
     138
     139parser.add_option( '--shell', action = 'store_true', dest = 'shell',     
     140                   default = False,
     141                   help = 'map the "shell" application for the GietVM' )
     142
     143parser.add_option( '--sort', action = 'store_true', dest = 'sort',     
     144                   default = False,
     145                   help = 'map the "sort" application for the GietVM' )
     146
    104147parser.add_option( '--transpose', action = 'store_true', dest = 'transpose',
    105148                   default = False,
    106149                   help = 'map the "transpose" application for the GietVM' )
    107 
    108 parser.add_option( '--sort', action = 'store_true', dest = 'sort',     
    109                    default = False,
    110                    help = 'map the "sort" application for the GietVM' )
    111 
    112 parser.add_option( '--convol', action = 'store_true', dest = 'convol',     
    113                    default = False,
    114                    help = 'map the "convol" application for the GietVM' )
    115 
    116 parser.add_option( '--router', action = 'store_true', dest = 'router',     
    117                    default = False,
    118                    help = 'map the "router" application for the GietVM' )
    119 
    120 parser.add_option( '--display', action = 'store_true', dest = 'display',     
    121                    default = False,
    122                    help = 'map the "display" application for the GietVM' )
    123 
    124 parser.add_option( '--classif', action = 'store_true', dest = 'classif',     
    125                    default = False,
    126                    help = 'map the "classif" application for the GietVM' )
    127 
    128 parser.add_option( '--gameoflife', action = 'store_true', dest = 'gameoflife',     
    129                    default = False,
    130                    help = 'map the "gameoflife" application for the GietVM' )
    131 
    132 parser.add_option( '--coproc', action = 'store_true', dest = 'coproc',     
    133                    default = False,
    134                    help = 'map the "coproc" application for the GietVM' )
    135 
    136 parser.add_option( '--ocean', action = 'store_true', dest = 'ocean',     
    137                    default = False,
    138                    help = 'map the "ocean" application for the GietVM' )
    139150
    140151###################################################################################
     
    163174xml_path       = options.xml_path    # path for map.xml file     
    164175
     176map_classif    = options.classif     # map "classif" application if True
     177map_convol     = options.convol      # map "convol" application if True
     178map_coproc     = options.coproc      # map "coproc" application if True
     179map_dhrystone  = options.dhrystone   # map "dhrystone" application if True
     180map_display    = options.display     # map "display" application if True
     181map_gameoflife = options.gameoflife  # map "gameoflife" application if True
     182map_ocean      = options.ocean       # map "ocean" application if True
     183map_router     = options.router      # map "router" application if True
     184map_shell      = options.shell       # map "shell" application if True
     185map_sort       = options.sort        # map "sort" application if True
    165186map_transpose  = options.transpose   # map "transpose" application if True
    166 map_sort       = options.sort        # map "sort" application if True
    167 map_convol     = options.convol      # map "convol" application if True
    168 map_router     = options.router      # map "router" application if True
    169 map_display    = options.display     # map "display" application if True
    170 map_classif    = options.classif     # map "classif" application if True
    171 map_gameoflife = options.gameoflife  # map "gameoflife" application if True
    172 map_coproc     = options.coproc      # map "coproc" application if True
    173 map_ocean      = options.ocean       # map "ocean" application if True
    174187
    175188###################################################################################
     
    192205
    193206###################################################################################
    194 #   complete mapping with application(s) as required
    195 ###################################################################################
     207#   extend mapping with application(s) as required
     208###################################################################################
     209
     210if ( map_classif ):     
     211    appli = __import__( 'classif' )
     212    appli.extend( mapping )
     213    print '[genmap] application "classif" will be loaded'
     214
     215if ( map_convol ):   
     216    appli = __import__( 'convol' )
     217    appli.extend( mapping )
     218    print '[genmap] application "convol" will be loaded'
     219
     220if ( map_coproc ):
     221    appli = __import__( 'coproc' )
     222    appli.extend( mapping )
     223    print '[genmap] application "coproc" will be loaded'
     224
     225if ( map_dhrystone ):     
     226    appli = __import__( 'dhrystone' )
     227    appli.extend( mapping )
     228    print '[genmap] application "dhrystone" will be loaded'
     229
     230if ( map_display ):     
     231    appli = __import__( 'display' )
     232    appli.extend( mapping )
     233    print '[genmap] application "display" will be loaded'
     234
     235if ( map_gameoflife ):
     236    appli = __import__( 'gameoflife' )
     237    appli.extend( mapping )
     238    print '[genmap] application "gameoflife" will be loaded'
     239
     240if ( map_ocean ):
     241    appli = __import__( 'ocean' )
     242    appli.extend( mapping )
     243    print '[genmap] application "ocean" will be loaded'
     244
     245if ( map_router ):     
     246    appli = __import__( 'router' )
     247    appli.extend( mapping )
     248    print '[genmap] application "router" will be loaded'
     249
     250if ( map_shell ):
     251    appli = __import__( 'shell' )
     252    appli.extend( mapping )
     253    print '[geneap] application "shell" will be loaded'
     254
     255if ( map_sort ):     
     256    appli = __import__( 'sort' )
     257    appli.extend( mapping )
     258    print '[genmap] application "sort" will be loaded'
    196259
    197260if ( map_transpose ):
    198     app = __import__( 'transpose' )
    199     app.transpose( mapping )
     261    appli = __import__( 'transpose' )
     262    appli.extend( mapping )
    200263    print '[genmap] application "transpose" will be loaded'
    201 
    202 if ( map_sort ):     
    203     app = __import__( 'sort' )
    204     app.sort( mapping )
    205     print '[genmap] application "sort" will be loaded'
    206 
    207 if ( map_convol ):     
    208     app = __import__( 'convol' )
    209     app.convol( mapping )
    210     print '[genmap] application "convol" will be loaded'
    211 
    212 if ( map_router ):     
    213     app = __import__( 'router' )
    214     app.router( mapping )
    215     print '[genmap] application "router" will be loaded'
    216 
    217 if ( map_display ):     
    218     app = __import__( 'display' )
    219     app.display( mapping )
    220     print '[genmap] application "display" will be loaded'
    221 
    222 if ( map_classif ):     
    223     app = __import__( 'classif' )
    224     app.classif( mapping )
    225     print '[genmap] application "classif" will be loaded'
    226 
    227 if ( map_gameoflife ):
    228     app = __import__( 'gameoflife' )
    229     app.gameoflife( mapping )
    230     print '[genmap] application "gameoflife" will be loaded'
    231 
    232 if ( map_coproc ):
    233     app = __import__( 'coproc' )
    234     app.coproc( mapping )
    235     print '[genmap] application "coproc" will be loaded'
    236 
    237 if ( map_ocean ):
    238     app = __import__( 'ocean' )
    239     app.ocean( mapping )
    240     print '[genmap] application "ocean" will be loaded'
    241264
    242265###################################################################################
Note: See TracChangeset for help on using the changeset viewer.