Changeset 1029


Ignore:
Timestamp:
Jan 7, 2016, 4:16:03 PM (8 years ago)
Author:
cfuguet
Message:
  • Support the cluster 0 to be the IO cluster.
  • Update the arch.py to allow the execution of new revisions of the Giet-VM.
Location:
trunk/platforms/tsar_generic_leti
Files:
4 edited

Legend:

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

    r975 r1029  
    6161          nb_ttys   = 1,
    6262          fbf_width = 128,
    63           ioc_type  = 'HBA' ):
     63          ioc_type  = 'HBA',
     64          mwr_type  = 'CPY'):
    6465
    6566    ### define architecture constants
     
    6768    nb_nics         = 1
    6869    nb_cmas         = 2
    69     x_io            = x_size - 1  # LETI constraint
    70     y_io            = y_size - 1  # LETI constraint
     70    x_io            = 0
     71    y_io            = 0
    7172    x_width         = 4
    7273    y_width         = 4
     
    146147
    147148    ### define ramdisk vseg / must be identity mapping in cluster[0][0]
    148     ### occupies 15 BPP after the boot 
    149     ramdisk_vbase        = 0x00200000
     149    ### occupies 16 BPP after the boot 
     150    ramdisk_vbase        = 0x02000000
    150151    ramdisk_size         = 0x02000000      # 32 Mbytes
    151152
     
    157158    kernel_code_size     = 0x00100000      # 1 Mbytes per cluster
    158159
    159     kernel_init_vbase    = 0x80100000
     160    kernel_init_vbase    = 0x88000000
    160161    kernel_init_size     = 0x00100000      # 1 Mbytes per cluster
    161162
     
    217218                                         arg0 = 16, arg1 = 16, arg2 = 16 )
    218219
    219                 mapping.addIrq( xcu, index = 8, src = mmc, isrtype = 'ISR_MMC' )
     220                mapping.addIrq( xcu, index = 8 , src = mmc, isrtype = 'ISR_MMC' )
     221
     222                if ( x==0 ) and ( y==0 ):
     223                    tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size,
     224                                             ptype = 'TTY', channels = nb_ttys )
     225
     226                    mapping.addIrq( xcu, index = 10, src = tty,
     227                                    isrtype = 'ISR_TTY_RX', channel = 0 )
    220228
    221229                for p in xrange ( nb_procs ):
    222230                    mapping.addProc( x, y, p )
    223231
    224             ###  external peripherals in cluster_io
    225             if ( (x==x_io) and (y==y_io) ):
     232            ###  peripherals in external cluster_io
     233            if ( x_io!=0 ) and ( y_io!=0 ) and ( x==( x_size-1 ) ) and ( y==( y_size-1 ) ) :
    226234
    227235                if ( ioc_type != 'RDK' ):
     
    261269                                isrtype = 'ISR_CMA', channel = 3 )
    262270
    263                 if   ( ioc_type == 'BDV' ): isr_type = 'ISR_BDV'
    264                 elif ( ioc_type == 'HBA' ): isr_type = 'ISR_HBA'
    265                 elif ( ioc_type == 'SDC' ): isr_type = 'ISR_SDC'
    266 
    267271                if ( ioc_type != 'RDK' ):
     272                    if   ( ioc_type == 'BDV' ): isr_type = 'ISR_BDV'
     273                    elif ( ioc_type == 'HBA' ): isr_type = 'ISR_HBA'
     274                    elif ( ioc_type == 'SDC' ): isr_type = 'ISR_SDC'
     275
    268276                    mapping.addIrq( pic, index = 8, src = ioc,
    269277                                    isrtype = isr_type, channel = 0 )
     
    316324    ### identity mapping / non local / big pages
    317325    if (ioc_type == 'RDK'):
    318 
    319326        mapping.addGlobal( 'seg_ramdisk', ramdisk_vbase, ramdisk_size,
    320327                           'C_W_', vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM',
    321328                           identity = True, local = True, big = True )
    322 
    323     ### global vsegs kernel_code, kernel_init : local / big page
    324     ### replicated in all clusters containing processors
    325     ### same content => same name / same vbase
    326     for x in xrange( x_size ):
    327         for y in xrange( y_size - 1 ):
    328 
    329             mapping.addGlobal( 'seg_kernel_code',
    330                                kernel_code_vbase, kernel_code_size,
    331                                'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
    332                                binpath = 'build/kernel/kernel.elf',
    333                                local = True, big = True )
    334 
    335             mapping.addGlobal( 'seg_kernel_init',
    336                                kernel_init_vbase, kernel_init_size,
    337                                'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
    338                                binpath = 'build/kernel/kernel.elf',
    339                                local = True, big = True )
    340329
    341330    ### global vseg kernel_data: non local / big page
     
    344333                       kernel_data_vbase, kernel_data_size,
    345334                       'C_W_', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM',
    346                        binpath = 'build/kernel/kernel.elf',
     335                       binpath = 'bin/kernel/kernel.elf',
    347336                       local = False, big = True )
     337
     338    ### global vsegs kernel_code, kernel_init : local / big page
     339    ### replicated in all clusters containing processors
     340    ### same content => same name / same vbase
     341    for x in xrange( x_size ):
     342        for y in xrange( y_size - 1 ):
     343            mapping.addGlobal( 'seg_kernel_code',
     344                               kernel_code_vbase, kernel_code_size,
     345                               'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
     346                               binpath = 'bin/kernel/kernel.elf',
     347                               local = True, big = True )
     348
     349            mapping.addGlobal( 'seg_kernel_init',
     350                               kernel_init_vbase, kernel_init_size,
     351                               'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
     352                               binpath = 'bin/kernel/kernel.elf',
     353                               local = True, big = True )
    348354
    349355    ### Global vsegs kernel_ptab_x_y: non local / big page
     
    353359        for y in xrange( y_size - 1 ):
    354360            offset = ((x << y_width) + y) * kernel_ptab_size
    355 
    356361            mapping.addGlobal( 'seg_kernel_ptab_%d_%d' %(x,y),
    357362                               kernel_ptab_vbase + offset, kernel_ptab_size,
     
    359364                               local = False, big = True )
    360365
     366    ### global vsegs kernel_sched : non local / small pages
     367    ### allocated in all clusters containing processors
     368    ### different content => name & vbase indexed by (x,y)
     369    for x in xrange( x_size ):
     370        for y in xrange( y_size - 1 ):
     371            offset = ((x << y_width) + y) * kernel_ptab_size
     372            mapping.addGlobal( 'seg_kernel_sched_%d_%d' %(x,y),
     373                               kernel_sched_vbase + offset , kernel_sched_size,
     374                               'C_W_', vtype = 'SCHED', x = x, y = y, pseg = 'RAM',
     375                               local = False, big = False )
     376
    361377    ### global vsegs kernel_heap_x_y : non local / big pages
    362378    ### distributed in all clusters containing processors
     
    365381        for y in xrange( y_size - 1 ):
    366382            offset = ((x << y_width) + y) * kernel_heap_size
    367 
    368383            mapping.addGlobal( 'seg_kernel_heap_%d_%d' %(x,y),
    369384                               kernel_heap_vbase + offset , kernel_heap_size,
     
    373388    ### global vsegs for external peripherals: non local / big page
    374389    ### only mapped in cluster_io
    375     mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size,
    376                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'IOC',
    377                        local = False, big = True )
     390    if ioc_type != 'RDK':
     391        mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size,
     392                           '__W_', vtype = 'PERI', x = x_io, y = y_io,
     393                           pseg = 'IOC', local = False, big = True )
    378394
    379395    mapping.addGlobal( 'seg_tty', tty_base, tty_size,
    380                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'TTY',
    381                        local = False, big = True )
    382 
    383     mapping.addGlobal( 'seg_nic', nic_base, nic_size,
    384                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'NIC',
    385                        local = False, big = True )
    386 
    387     mapping.addGlobal( 'seg_cma', cma_base, cma_size,
    388                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'CMA',
    389                        local = False, big = True )
    390 
    391     mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size,
    392                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'FBF',
    393                        local = False, big = True )
    394 
    395     mapping.addGlobal( 'seg_pic', pic_base, pic_size,
    396                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'PIC',
    397                        local = False, big = True )
     396                       '__W_', vtype = 'PERI', x = x_io, y = y_io,
     397                       pseg = 'TTY', local = False, big = True )
     398
     399    if ( x_io!=0 ) and ( y_io!=0 ) :
     400        mapping.addGlobal( 'seg_nic', nic_base, nic_size,
     401                           '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1,
     402                           pseg = 'NIC', local = False, big = True )
     403
     404        mapping.addGlobal( 'seg_cma', cma_base, cma_size,
     405                           '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1,
     406                           pseg = 'CMA', local = False, big = True )
     407
     408        mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size,
     409                           '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1,
     410                           pseg = 'FBF', local = False, big = True )
     411
     412        mapping.addGlobal( 'seg_pic', pic_base, pic_size,
     413                           '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1,
     414                           pseg = 'PIC', local = False, big = True )
    398415
    399416    ### global vsegs for internal peripherals : non local / small pages
     
    412429                               mmc_base + offset, mmc_size,
    413430                               '__W_', vtype = 'PERI' , x = x , y = y , pseg = 'MMC',
    414                                local = False, big = False )
    415 
    416     ### global vsegs kernel_sched : non local / small pages
    417     ### allocated in all clusters containing processors
    418     ### different content => name & vbase indexed by (x,y)
    419     for x in xrange( x_size ):
    420         for y in xrange( y_size - 1 ):
    421             offset = ((x << y_width) + y) * kernel_ptab_size
    422 
    423             mapping.addGlobal( 'seg_kernel_sched_%d_%d' %(x,y),
    424                                kernel_sched_vbase + offset , kernel_sched_size,
    425                                'C_W_', vtype = 'SCHED', x = x, y = y, pseg = 'RAM',
    426431                               local = False, big = False )
    427432
  • trunk/platforms/tsar_generic_leti/top.cpp

    r1004 r1029  
    159159#define L1_DSETS              64
    160160
    161 #define DISK_IMAGE_NAME       "../../../giet_vm/hdd/virt_hdd.dmg"
     161#define DISK_IMAGE_NAME       "virt_hdd.dmg"
    162162
    163163#define ROM_SOFT_NAME         "../../softs/tsar_boot/preloader.elf"
     
    690690                MTTY_TGTID,
    691691                DISK_TGTID,
     692                (USE_IOC_RDK == 1),
    692693                disk_name,
    693694                MEMC_WAYS,
     
    873874
    874875    // disk
     876#if ( USE_IOC_HBA or USE_IOC_BDV or USE_IOC_SDC )
    875877    disk->p_clk                        (signal_clk);
    876878    disk->p_resetn                     (signal_resetn);
     
    884886
    885887    std::cout << "  - DISK connected" << std::endl;
     888#endif
    886889
    887890    // frame_buffer
     
    12891292            // clusters[1][1]->router_m2p->print_trace();
    12901293
     1294#if ( USE_IOC_HBA or USE_IOC_BDV or USE_IOC_SDC )
    12911295#if USE_PIC
    12921296            // trace external ioc
     
    13061310            clusters[0][0]->signal_vci_tgt_disk.print_trace("[SIG]DISK_0_0");
    13071311            clusters[0][0]->signal_vci_ini_disk.print_trace("[SIG]DISK_0_0");
     1312#endif
    13081313#endif
    13091314
  • trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/include/tsar_leti_cluster.h

    r803 r1029  
    171171                     size_t                             tgtid_mtty,
    172172                     size_t                             tgtid_bdev,
     173                     bool                               use_ramdisk,
    173174                     const char*                        disk_pathname,
    174175                     size_t                             memc_ways,
  • trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/src/tsar_leti_cluster.cpp

    r803 r1029  
    3737         size_t                             tgtid_mtty,
    3838         size_t                             tgtid_bdev,
     39         bool                               use_ramdisk,
    3940         const char*                        disk_pathname,
    4041         size_t                             memc_ways,
     
    170171    if ((x_id == 0) and (y_id == 0))  // cluster(0,0)
    171172    {
    172         nb_initiators = nb_procs + 1;
    173         nb_targets    = 4;
     173        nb_targets++; // TTY
     174
     175        if (not use_ramdisk)
     176        {
     177            nb_initiators++;
     178            nb_targets++;
     179        }
    174180    }
    175181
     
    291297    if ((x_id == 0) and (y_id == 0))
    292298    {
    293         /////////////////////////////////////////////
    294         bdev = new VciBlockDeviceTsar<vci_param_int>(
    295                      "bdev",
    296                      mtd,
    297                      IntTab(cluster_xy, nb_procs),
    298                      IntTab(cluster_xy, tgtid_bdev),
    299                      disk_pathname,
    300                      512,
    301                      64 );            // burst size
     299        if (not use_ramdisk)
     300        {
     301            /////////////////////////////////////////////
     302            bdev = new VciBlockDeviceTsar<vci_param_int>(
     303                         "bdev",
     304                         mtd,
     305                         IntTab(cluster_xy, nb_procs),
     306                         IntTab(cluster_xy, tgtid_bdev),
     307                         disk_pathname,
     308                         512,
     309                         64 );            // burst size
     310        }
    302311
    303312        /////////////////////////////////////////////
     
    378387    {
    379388        xbar_cmd->p_to_target[tgtid_mtty]      (signal_vci_tgt_mtty);
    380         xbar_cmd->p_to_target[tgtid_bdev]      (signal_vci_tgt_bdev);
    381         xbar_cmd->p_to_initiator[nb_procs]     (signal_vci_ini_bdev);
     389
     390        if (not use_ramdisk)
     391        {
     392            xbar_cmd->p_to_target[tgtid_bdev]      (signal_vci_tgt_bdev);
     393            xbar_cmd->p_to_initiator[nb_procs]     (signal_vci_ini_bdev);
     394        }
    382395    }
    383396
     
    462475        if ((x_id == 0) and (y_id == 0)) // cluster (0,0)
    463476        {
    464             if      (i == 8)           xicu->p_hwi[i] (signal_irq_memc);
    465             else if (i == 9)          xicu->p_hwi[i] (signal_irq_bdev);
    466             else if (i == 10)          xicu->p_hwi[i] (signal_irq_mtty);
    467             else                       xicu->p_hwi[i] (signal_false);
     477            if      (i == 8)                     xicu->p_hwi[i] (signal_irq_memc);
     478            else if (i == 9 and not use_ramdisk) xicu->p_hwi[i] (signal_irq_bdev);
     479            else if (i == 10)                    xicu->p_hwi[i] (signal_irq_mtty);
     480            else                                 xicu->p_hwi[i] (signal_false);
    468481        }
    469482        else                             // other clusters
     
    499512    if ((x_id == 0) and (y_id == 0))
    500513    {
    501         // BDEV
    502         bdev->p_clk                    (this->p_clk);
    503         bdev->p_resetn                 (this->p_resetn);
    504         bdev->p_irq                    (signal_irq_bdev);
    505         bdev->p_vci_target             (signal_vci_tgt_bdev);
    506         bdev->p_vci_initiator          (signal_vci_ini_bdev);
    507 
    508         std::cout << "  - BDEV connected" << std::endl;
     514        if (not use_ramdisk)
     515        {
     516            // BDEV
     517            bdev->p_clk                    (this->p_clk);
     518            bdev->p_resetn                 (this->p_resetn);
     519            bdev->p_irq                    (signal_irq_bdev);
     520            bdev->p_vci_target             (signal_vci_tgt_bdev);
     521            bdev->p_vci_initiator          (signal_vci_ini_bdev);
     522
     523            std::cout << "  - BDEV connected" << std::endl;
     524        }
    509525
    510526        // MTTY (single channel)
Note: See TracChangeset for help on using the changeset viewer.