Changeset 966 for trunk/platforms


Ignore:
Timestamp:
Apr 6, 2015, 12:37:30 AM (9 years ago)
Author:
alain
Message:

Cosmetic

Location:
trunk/platforms/tsar_generic_iob
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_iob/arch.py

    r965 r966  
    1414#  (global vsegs).
    1515#
    16 #  This platform includes 6 external peripherals, accessible through an IOB
     16#  This platform includes 7 external peripherals, accessible through an IOB
    1717#  components located in cluster [0,0] or in cluster [x_size-1, y_size-1].
    18 #  Available peripherals are: TTY, HBA, FBF, ROM, NIC, CMA, PIC.
     18#  Available peripherals are: TTY, IOC, FBF, ROM, NIC, CMA, PIC.
    1919#
    2020#  All clusters contain (nb_procs) processors, one L2 cache, one XCU, and
    2121#  one DMA controller.
    2222#
    23 #  The "constructor" parameters are:
     23#  The "constructor" parameters (defined in Makefile) are:
    2424#  - x_size         : number of clusters in a row
    2525#  - y_size         : number of clusters in a column
     
    2727#  - nb_ttys        : number of TTY channels
    2828#  - fbf_width      : frame_buffer width = frame_buffer heigth
    29 #  - ioc_type       : can be 'BDV' , 'HBA' , 'SDC' , 'NONE'
    30 #
    31 #  The other hardware parameters are:
     29#  - ioc_type       : can be 'BDV','HBA','SDC', but not 'RDK'
     30#
     31#  The other hardware parameters (defined below) are:
    3232#  - nb_nics        : number of NIC channels
    3333#  - nb_cmas        : number of CMA channels
     
    3939#  - irq_per_proc   : number of input IRQs per processor
    4040#  - use_ramdisk    : use a ramdisk when True
    41 #  - vseg_increment : address increment for replicated peripherals
     41#  - vseg_increment : address increment for replicated vsegs
    4242#
    4343#  Regarding the boot and kernel vsegs mapping :
     
    7171    p_width         = 4
    7272    paddr_width     = 40
    73     irq_per_proc    = 4
    74     peri_increment  = 0x10000    # distributed peripherals vbase address increment
     73    irq_per_proc    = 4          # NetBSD constraint
     74    peri_increment  = 0x10000 
    7575
    7676    ### parameters checking
     
    8989            ((x_io == x_size-1) and (y_io == y_size-1)) )
    9090
    91     assert( ioc_type in IOCSUBTYPES )
     91    assert( ioc_type in [ 'BDV' , 'HBA' , 'SDC' ] )
    9292 
    9393    ### define platform name
  • trunk/platforms/tsar_generic_iob/top.cpp

    r965 r966  
    33// Author: Alain Greiner
    44// Copyright: UPMC/LIP6
    5 // Date : august 2013
     5// Date : august 2013 / updated march 2015
    66// This program is released under the GNU public license
    77///////////////////////////////////////////////////////////////////////////////
     
    1818//
    1919// 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].
     20// located in cluster[0][0] and cluster[X_SIZE-1][Y_SIZE-1].
    2121//
    2222// The internal physical address space is 40 bits, and the cluster index
     
    7878//
    7979// The main hardware parameters must be defined in the hard_config.h file :
     80// - X_WIDTH          : number of bits for x cluster coordinate
     81// - Y_WIDTH          : number of bits for y cluster coordinate
     82// - P_WIDTH          : number of bits for local processor coordinate
    8083// - X_SIZE           : number of clusters in a row
    8184// - Y_SIZE           : number of clusters in a column
     
    9194// - XCU_NB_WTI       : number of XCU WTIs (>= 4*NB_PROCS_MAX)
    9295// - XCU_NB_OUT       : number of XCU output IRQs (>= 4*NB_PROCS_MAX)
     96// - USE_IOC_XYZ      : IOC type (XYZ in HBA / BDV / SDC)
    9397//
    94 // Some secondary hardware parameters must be defined in this top.cpp file:
     98// Some other hardware parameters must be defined in this top.cpp file:
    9599// - XRAM_LATENCY     : external ram latency
    96100// - MEMC_WAYS        : L2 cache number of ways
     
    319323   size_t   ncycles          = 4000000000;              // simulated cycles
    320324   char     disk_name[256]   = DISK_IMAGE_NAME;         // pathname: disk image
    321    ssize_t  threads_nr       = 1;                       // simulator's threads number
     325   ssize_t  threads          = 1;                       // simulator's threads number
    322326   bool     debug_ok         = false;                   // trace activated
    323327   size_t   debug_memc_id    = 0xFFFFFFFF;              // index of traced memc
     
    353357         {
    354358            ncycles = atoi(argv[n+1]);
    355          }
    356          else if ((strcmp(argv[n],"-ROM") == 0) && (n+1<argc) )
    357          {
    358             strcpy(soft_name, argv[n+1]);
    359359         }
    360360         else if ((strcmp(argv[n],"-DEBUG") == 0) && (n+1<argc) )
     
    374374            if( (x>=XMAX) || (y>=YMAX) )
    375375            {
    376                 std::cout << "MEMCID parameter does'nt fit XMAX/YMAX" << std::endl;
     376                std::cout << "MEMCID parameter doesn't fit XMAX/YMAX" << std::endl;
    377377                std::cout << " - MEMCID = " << std::hex << debug_memc_id << std::endl;
    378378                std::cout << " - XMAX   = " << std::hex << XMAX          << std::endl;
     
    413413         else if ((strcmp(argv[n], "-THREADS") == 0) && ((n+1) < argc))
    414414         {
    415             threads_nr = atoi(argv[n+1]);
    416             threads_nr = (threads_nr < 1) ? 1 : threads_nr;
     415            threads = atoi(argv[n+1]);
     416            threads = (threads < 1) ? 1 : threads;
    417417         }
    418418         else if ((strcmp(argv[n], "-FROZEN") == 0) && (n+1 < argc))
     
    425425            std::cout << "   The order is not important." << std::endl;
    426426            std::cout << "   Accepted arguments are :" << std::endl << std::endl;
    427             std::cout << "     - ROM  pathname_for_embedded_soft" << std::endl;
    428             std::cout << "     - DISK pathname_for_disk_image" << std::endl;
    429427            std::cout << "     - NCYCLES number_of_simulated_cycles" << std::endl;
    430428            std::cout << "     - DEBUG debug_start_cycle" << std::endl;
     
    432430            std::cout << "     - FROZEN max_number_of_lines" << std::endl;
    433431            std::cout << "     - MEMCID index_memc_to_be_traced" << std::endl;
    434             std::cout << "     - XRAMID index_xram_to_be_traced" << std::endl;
    435432            std::cout << "     - PROCID index_proc_to_be_traced" << std::endl;
    436433            std::cout << "     - IOB    non_zero_value" << std::endl;
     
    473470   assert( (NB_CMA_CHANNELS <= 4) and
    474471           "The NB_CMA_CHANNELS parameter cannot be larger than 4" );
     472
     473   assert( (X_WIDTH == 4) and (Y_WIDTH == 4) and
     474           "You must have X_WIDTH == Y_WIDTH == 4");
    475475
    476476   std::cout << std::endl << std::dec
     
    487487             << " - MAX_FROZEN      = " << frozen_cycles << std::endl
    488488             << " - NCYCLES         = " << ncycles << std::endl
     489             << " - SOFT_FILENAME   = " << soft_name << std::endl
     490             << " - DISK_IMAGENAME  = " << disk_name << std::endl
     491             << " - OPENMP THREADS  = " << threads << std::endl
    489492             << " - DEBUG_PROCID    = " << debug_proc_id << std::endl
    490493             << " - DEBUG_MEMCID    = " << debug_memc_id << std::endl
     
    495498#if USING_OPENMP
    496499   omp_set_dynamic(false);
    497    omp_set_num_threads(threads_nr);
     500   omp_set_num_threads(threads);
    498501   std::cerr << "Built with openmp version " << _OPENMP << std::endl;
    499502#endif
     
    958961
    959962#if ( USE_IOC_HBA )
     963
    960964    VciMultiAhci<vci_param_ext>*  disk;
    961965    disk = new VciMultiAhci<vci_param_ext>( "disk",
     
    967971                                            64,         // burst size (bytes)
    968972                                            0 );        // disk latency
    969 #elif ( USE_IOC_BDV )
     973#elif ( USE_IOC_BDV or USE_IOC_SDC )
     974
    970975    VciBlockDeviceTsar<vci_param_ext>*  disk;
    971976    disk = new VciBlockDeviceTsar<vci_param_ext>( "disk",
     
    977982                                                  64,         // burst size (bytes)
    978983                                                  0 );        // disk latency
    979 #else
    980     std::cout << "Error in tsar_generic_iob : only HBA & BDV are supported" << std::endl;
    981     exit(0);
    982984#endif
    983985
Note: See TracChangeset for help on using the changeset viewer.