Ignore:
Timestamp:
Feb 8, 2015, 9:38:31 PM (9 years ago)
Author:
alain
Message:

Introduce distributed kernel heap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_iob/top.cpp

    r914 r938  
    66// This program is released under the GNU public license
    77///////////////////////////////////////////////////////////////////////////////
    8 // This file define a generic TSAR architecture with an IO network emulating
    9 // an external bus (i.e. Hypertransport) to access 7 external peripherals:
     8// This file define a generic TSAR architecture with an external IO network
     9// emulating a PCI or Hypertransport I/O bus to access 7 external peripherals:
    1010//
    1111// - BROM : boot ROM
     
    1717// - IOPI : HWI to SWI translator.
    1818//
     19// This I/0 bus is connected to internal address space through two IOB bridges
     20// located in cluster[0][0] and cluster[X_SIZE-1][Åž_SIZE-1].
     21//
    1922// The internal physical address space is 40 bits, and the cluster index
    2023// is defined by the 8 MSB bits, using a fixed format: X is encoded on 4 bits,
    21 // Y is encodes on 4 bits, whatever the actual mesh size.
     24// Y is encoded on 4 bits, whatever the actual mesh size.
    2225// => at most 16 * 16 clusters. Each cluster contains up to 4 processors.
    2326//
     
    9598// - L1_DSETS
    9699// - BDEV_IMAGE_NAME  : file pathname for block device
    97 // - NIC_TIMEOUT      : max number of cycles before closing a container
    98100//
    99101// General policy for 40 bits physical address decoding:
     
    207209#define BDEV_IMAGE_NAME       "../../../giet_vm/hdd/virt_hdd.dmg"
    208210
    209 #define NIC_TIMEOUT           10000
     211#define ROM_SOFT_NAME         "../../softs/tsar_boot/preloader.elf"
    210212
    211213#define NORTH                 0
     
    215217
    216218#define cluster(x,y)   ((y) + ((x) << 4))
    217 
    218 ////////////////////////////////////////////////////////////
    219 //    Software to be loaded in ROM & RAM
    220 //////////////////////i/////////////////////////////////////
    221 
    222 #define BOOT_SOFT_NAME        "../../softs/tsar_boot/preloader.elf"
    223219
    224220////////////////////////////////////////////////////////////
     
    318314
    319315
    320    char     soft_name[256]   = BOOT_SOFT_NAME;             // pathname: binary code
    321    size_t   ncycles          = 4000000000;                 // simulated cycles
    322    char     disk_name[256]   = BDEV_IMAGE_NAME;            // pathname: disk image
    323    ssize_t  threads_nr       = 1;                          // simulator's threads number
    324    bool     debug_ok         = false;                      // trace activated
    325    size_t   debug_memc_id    = 0xFFFFFFFF;                 // index of traced memc
    326    size_t   debug_proc_id    = 0xFFFFFFFF;                 // index of traced proc
    327    size_t   debug_xram_id    = 0xFFFFFFFF;                 // index of traced xram
    328    bool     debug_iob        = false;                      // trace iob0 & iob1 when true
    329    uint32_t debug_from       = 0;                          // trace start cycle
    330    uint32_t frozen_cycles    = MAX_FROZEN_CYCLES;          // monitoring frozen processor
    331    size_t   cluster_iob0     = cluster(0,0);               // cluster containing IOB0
    332    size_t   cluster_iob1     = cluster(XMAX-1,YMAX-1);     // cluster containing IOB1
    333    size_t   x_width          = X_WIDTH;                    // # of bits for x
    334    size_t   y_width          = Y_WIDTH;                    // # of bits for y
    335    size_t   p_width          = P_WIDTH;                    // # of bits for lpid
     316   char     soft_name[256]   = ROM_SOFT_NAME;           // pathname: binary code
     317   size_t   ncycles          = 4000000000;              // simulated cycles
     318   char     disk_name[256]   = BDEV_IMAGE_NAME;         // pathname: disk image
     319   ssize_t  threads_nr       = 1;                       // simulator's threads number
     320   bool     debug_ok         = false;                   // trace activated
     321   size_t   debug_memc_id    = 0xFFFFFFFF;              // index of traced memc
     322   size_t   debug_proc_id    = 0xFFFFFFFF;              // index of traced proc
     323   size_t   debug_xram_id    = 0xFFFFFFFF;              // index of traced xram
     324   bool     debug_iob        = false;                   // trace iob0 & iob1 when true
     325   uint32_t debug_from       = 0;                       // trace start cycle
     326   uint32_t frozen_cycles    = MAX_FROZEN_CYCLES;       // monitoring frozen processor
     327   size_t   cluster_iob0     = cluster(0,0);            // cluster containing IOB0
     328   size_t   cluster_iob1     = cluster(XMAX-1,YMAX-1);  // cluster containing IOB1
     329   size_t   x_width          = X_WIDTH;                 // # of bits for x
     330   size_t   y_width          = Y_WIDTH;                 // # of bits for y
     331   size_t   p_width          = P_WIDTH;                 // # of bits for lpid
    336332
    337333#if USING_OPENMP
     
    356352            ncycles = atoi(argv[n+1]);
    357353         }
    358          else if ((strcmp(argv[n],"-SOFT") == 0) && (n+1<argc) )
     354         else if ((strcmp(argv[n],"-ROM") == 0) && (n+1<argc) )
    359355         {
    360356            strcpy(soft_name, argv[n+1]);
     
    427423            std::cout << "   The order is not important." << std::endl;
    428424            std::cout << "   Accepted arguments are :" << std::endl << std::endl;
    429             std::cout << "     -SOFT pathname_for_embedded_soft" << std::endl;
    430             std::cout << "     -DISK pathname_for_disk_image" << std::endl;
    431             std::cout << "     -NCYCLES number_of_simulated_cycles" << std::endl;
    432             std::cout << "     -DEBUG debug_start_cycle" << std::endl;
    433             std::cout << "     -THREADS simulator's threads number" << std::endl;
    434             std::cout << "     -FROZEN max_number_of_lines" << std::endl;
    435             std::cout << "     -MEMCID index_memc_to_be_traced" << std::endl;
    436             std::cout << "     -XRAMID index_xram_to_be_traced" << std::endl;
    437             std::cout << "     -PROCID index_proc_to_be_traced" << std::endl;
    438             std::cout << "     -IOB    non_zero_value" << std::endl;
     425            std::cout << "     - ROM pathname_for_embedded_soft" << std::endl;
     426            std::cout << "     - DISK pathname_for_disk_image" << std::endl;
     427            std::cout << "     - NCYCLES number_of_simulated_cycles" << std::endl;
     428            std::cout << "     - DEBUG debug_start_cycle" << std::endl;
     429            std::cout << "     - THREADS simulator's threads number" << std::endl;
     430            std::cout << "     - FROZEN max_number_of_lines" << std::endl;
     431            std::cout << "     - MEMCID index_memc_to_be_traced" << std::endl;
     432            std::cout << "     - XRAMID index_xram_to_be_traced" << std::endl;
     433            std::cout << "     - PROCID index_proc_to_be_traced" << std::endl;
     434            std::cout << "     - IOB    non_zero_value" << std::endl;
    439435            exit(0);
    440436         }
Note: See TracChangeset for help on using the changeset viewer.