Ignore:
Timestamp:
Aug 27, 2014, 10:50:02 AM (8 years ago)
Author:
cfuguet
Message:

reconfiguration/tsar_generic_iob: moving all python scripts in subdirectory

  • The run.py don't use anymore the genmap tool. It uses directly the a new main function in the arch.py module to generate the hard_config.h
Location:
branches/reconfiguration/platforms/tsar_generic_iob/scripts
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/platforms/tsar_generic_iob/scripts/run.py

    r770 r774  
    33# @author cfuguet <cesar.fuguet-tortolero@lip6.fr>
    44
     5import sys
    56import os
    6 import sys
    77import subprocess
     8import arch
    89
    9 nprocs = 4
    10 
     10# define constants
    1111configs = []
    1212configs.append([2 ,2 ])
     
    1515configs.append([16,16])
    1616
     17nprocs = 4
     18
     19assert len(sys.argv) > 1, "Introduce platform base directory path"
     20
     21# goto platform base directory
     22os.chdir(sys.argv[1])
     23
    1724# repeat while configurations is not empty
    1825for x,y in configs:
    19     confdir = os.getcwd() + "/conf/config_{}c/".format(x*y)
     26    confdir = os.getcwd() + "conf/config_{}c/".format(x*y)
    2027
    2128    # 1. generate configuration and ouput directories
     
    2330        os.makedirs(confdir + "config", 0755)
    2431    except OSError:
    25         # directory already exists => do nothing
    26         pass
     32        pass # directory already exists => do nothing
    2733
    2834    # 2. generate hard_config.h and fault_config.h files
    29     returncode = subprocess.call(["scripts/genmap",
    30         "--x=" + str(x),
    31         "--y=" + str(y),
    32         "--p=" + str(nprocs),
    33         "--arch=" + os.getcwd(),
    34         "--path=" + confdir + "config"
    35         ])
    36     if returncode != 0:
    37         print "Error during genmap execution"
    38         sys.exit(1)
     35    arch.main( x = x, y = y, p = nprocs,
     36               hard_path = confdir + "config/hard_config.h",
     37               xml_path = confdir + "config/map.xml" )
    3938
    4039    # 3. compile simulator executable
Note: See TracChangeset for help on using the changeset viewer.