Ignore:
Timestamp:
Jan 20, 2015, 4:06:49 PM (9 years ago)
Author:
cfuguet
Message:

reconf: add external ROM in platform

  • The external ROM, which can be accessed through both IO Bridges, contains the bootloader program and some other utility functions which are used once the reconfiguration is performed.
Location:
branches/reconfiguration/platforms/tsar_generic_iob/scripts
Files:
2 edited

Legend:

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

    r907 r926  
    101101    mmc_size = 0x1000                     # 4 Kbytes
    102102
    103     rom_base = 0x00BFC00000
    104     rom_size = 0x8000                     # 32 Kbytes
     103    drom_base = 0x00BFC00000
     104    drom_size = 0x8000                    # 32 Kbytes
    105105
    106106    offset_io = pmsb(X_IO, Y_IO) << (PADDR_WIDTH - X_WIDTH - Y_WIDTH)
     
    129129    iob_base = 0x00BE000000 + offset_io
    130130    iob_size = 0x1000                     # 4 kbytes
     131
     132    rom_base = 0x00BA000000
     133    rom_size = 0x8000                     # 32 Kbytes
    131134
    132135    # create mapping
     
    170173                      ptype='SIM')
    171174
     175    mapping.addPeriph('ROM', base=rom_base, size=rom_size,
     176                      ptype='ROM')
     177
    172178    pic = mapping.addPeriph('PIC', base=pic_base, size=pic_size,
    173179                            ptype='PIC', channels=32)
     
    196202                              ptype='MMC')
    197203
    198             mapping.addPeriph('ROM', base=rom_base + offset, size=rom_size,
    199                               ptype='ROM')
     204            mapping.addPeriph('DROM', base=drom_base + offset, size=drom_size,
     205                              ptype='DROM')
    200206
    201207            dma = mapping.addPeriph('DMA', base=dma_base + offset,
     
    336342
    337343    # for the Giet-VM is not necessary to map the replicated ROMs
    338     mapping.addGlobal('seg_rom', rom_base, rom_size, 'CX__', vtype='PERI',
     344    mapping.addGlobal('seg_rom', drom_base, drom_size, 'CX__', vtype='PERI',
    339345                      x=X_IO, y=Y_IO, pseg='ROM', local=False, big=True)
    340346
  • branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py

    r919 r926  
    6969        os.unlink(dst)
    7070
    71     os.symlink(os.path.join(basedir, "soft/config/boot_config.h"), dst)
    72 
    73     # stop after compiling the platform when the compile-only option is activated
    74     if args.compileonly == True:
    75         exit(0)
     71    os.symlink(os.path.join(basedir, "soft/test/config/boot_config.h"), dst)
    7672
    7773    print "[ run.py ] compiling distributed boot procedure"
     
    8278    subprocess.call(command, stdout=logfile, stderr=logfile)
    8379
     80    # stop after compiling when the compile-only option is activated
     81    if args.compileonly == True:
     82        exit(0)
     83
    8484    # 5. execute simulator
    8585    os.environ["DISTRIBUTED_BOOT"] = "1"
     
    8888        os.environ["SOCLIB_TTY"] = "FILES"
    8989
    90     ompthreads = (args.x * args.y) / 4
    91     cpucount = multiprocessing.cpu_count()
    92     if ompthreads > cpucount: ompthreads = cpucount
    93 
    9490    print "[ run.py ] starting simulation"
    9591    command = []
    9692    command.extend([os.path.join(basedir, "simul.x")])
    97     command.extend(["-SOFT", os.path.join(basedir, "soft/build/soft.elf")])
    98     command.extend(["-DISK", "/dev/null"])
    99     command.extend(["-THREADS", str(ompthreads)])
     93    command.extend(["-DSOFT", os.path.join(basedir, "soft/build/soft.elf")])
     94    command.extend(["-SOFT", os.path.join(basedir,
     95                   "soft/loader/build/loader.elf")])
     96    command.extend(["-DISK", "file.dmg"])
    10097
    10198    if args.faultyrouter != None:
     
    104101            command.extend(["-FAULTY_ROUTER", str(f[0]), str(f[1]), str(f[2])])
    105102
     103    ompthreads = 1
    106104    if args.debug != None:
    107105        command.extend(["-DEBUG", str(args.debug[0])]);
     
    109107        command.extend(["-PROCID", str(args.debug[2])]);
    110108        command.extend(["-MEMCID", str(args.debug[3])]);
     109
    111110    elif os.environ.get('SOCLIB_GDB') == None:
     111        ompthreads = (args.x * args.y) / 4
     112        cpucount = multiprocessing.cpu_count()
     113        if ompthreads > cpucount:
     114            ompthreads = cpucount
     115
    112116        # the procedure grows linearly with the diameter of the mesh.
    113         maxcycles = 400000 + (args.x + args.y) * 20000;
     117        maxcycles = 1500000 + (args.x + args.y) * 20000
    114118        command.extend(["-NCYCLES", str(maxcycles)])
     119
     120    command.extend(["-THREADS", str(ompthreads)])
    115121
    116122    logfile.write("Execute: {0}\n".format(" ".join(command)))
Note: See TracChangeset for help on using the changeset viewer.