Changeset 967 for trunk/platforms


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

Introduce the new parametre ioc_type in the tsar_generic_leti platform.

Location:
trunk/platforms/tsar_generic_leti
Files:
3 edited

Legend:

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

    r960 r967  
    1414#  and kernel objects (global vsegs).
    1515#
    16 #  The x_size & y_size parameters define the total number of clusters.
     16#  This platform includes 6 external peripherals controllers located
     17#  in cluster[x_size-1][y_size-1]: TTY, IOC, FBF, NIC, CMA, PIC.
     18#  It does not use the IOB component.
     19#  It does not use an external ROM, as the preloader code is (pre)loaded
     20#  at address 0x0, in the physical memory of cluster[0][0].
     21#  It can use an - optional - RAMDISK located in cluster[0][0].
    1722#  The upper row (y = y_size-1) does not contain processors or memory.
    1823#
    19 #  It does not use the IOB component:
    20 #  The external peripherals are located in cluster[x_size-1][y_size-1].
     24#  The "constructor" parameters (defined in Makefile) are:
     25#  - x_size         : number of clusters in a row
     26#  - y_size         : number of clusters in a column
     27#  - nb_procs       : number of processors per cluster
     28#  - nb_ttys        : number of TTY channels
     29#  - fbf_width      : frame_buffer width = frame_buffer heigth
     30#  - ioc_type       : can be 'BDV','HBA','SDC','RDK'
    2131#
    22 #  It does not use an external ROM, as the preloader code is (pre)loaded
    23 #  at address 0x0, in the physical memory of cluster[0][0].
    24 #
    25 #  It can use an - optional - RAMDISK located in cluster[0][0].
    26 #
    27 #  The others hardware parameters are:
    28 #  - fbf_width      : frame_buffer width = frame_buffer heigth
    29 #  - nb_ttys        : number of TTY channels
     32#  The others hardware parameters (defined below) are:
    3033#  - nb_nics        : number of NIC channels
    3134#  - nb_cmas        : number of CMA channels
     35#  - x_io           : cluster_io x coordinate
     36#  - y_io           : cluster_io y coordinate
     37#  - x_width        : number of bits for x coordinate
     38#  - y_width        : number of bits for y coordinate
     39#  - paddr_width    : number of bits for physical address
    3240#  - irq_per_proc   : number of input IRQs per processor
    3341#  - use_ramdisk    : use a RAMDISK when True
    34 #  - peri_increment : address increment for replicated peripherals
     42#  - peri_increment : address increment for replicated vsegs
    3543#
    3644#  Regarding the boot and kernel vsegs mapping :
     
    5260          nb_procs  = 4,
    5361          nb_ttys   = 1,
    54           fbf_width = 128 ):
     62          fbf_width = 128,
     63          ioc_type  = 'HBA' ):
    5564
    5665    ### define architecture constants
     
    5867    nb_nics         = 1
    5968    nb_cmas         = 2
    60     x_io            = x_size - 1
    61     y_io            = y_size - 1
     69    x_io            = x_size - 1  # LETI constraint
     70    y_io            = y_size - 1  # LETI constraint
    6271    x_width         = 4
    6372    y_width         = 4
    64     p_width         = 2
     73    p_width         = 2           # LETI constraint
    6574    paddr_width     = 40
    66     irq_per_proc    = 4
    67     use_ramdisk     = False
    68     peri_increment  = 0x10000     # distributed peripherals vbase increment
    69     reset_address   = 0x00000000  # wired preloader pbase address
     75    irq_per_proc    = 4           # NetBSD constraint
     76    peri_increment  = 0x10000
     77    reset_address   = 0x00000000  # LETI constraint
    7078
    7179    ### parameters checking
     
    7583    assert( x_size <= (1 << x_width) )
    7684
    77     assert( y_size <= (1 << y_width) )
    78 
     85    assert( (y_size > 1) and (y_size <= (1 << y_width)) )
     86
     87    assert( ioc_type in [ 'BDV' , 'HBA' , 'SDC' , 'RDK' ] )
     88 
    7989    ### define type and name
    8090
    81     platform_type  = 'tsar_leti'
    82     platform_name  = '%s_%d_%d_%d' % (platform_type, x_size, y_size, nb_procs )
     91    platform_name  = 'tsar_leti_%d_%d_%d' % ( x_size, y_size, nb_procs )
     92    platform_name  += '_%d_%d_%s' % ( fbf_width , nb_ttys , ioc_type )
    8393
    8494    ### define physical segments replicated in all clusters
     
    97107    ## These segments are only defined in cluster_io
    98108
    99     bdv_base  = 0xF2000000
    100     bdv_size  = 0x1000                     # 4kbytes
     109    ioc_base  = 0xF2000000
     110    ioc_size  = 0x1000                     # 4kbytes
    101111
    102112    tty_base  = 0xF4000000
     
    120130    ### => boot cost is one BPP in cluster[0][0]
    121131
    122     preloader_vbase      = 0x00000000      # ident
     132    preloader_vbase      = reset_address   # ident
    123133    preloader_size       = 0x00010000      # 64 Kbytes
    124134
     
    176186                       coherence      = True,
    177187                       irq_per_proc   = irq_per_proc,
    178                        use_ramdisk    = use_ramdisk,
     188                       use_ramdisk    = (ioc_type == 'RDK'),
    179189                       x_io           = x_io,
    180190                       y_io           = y_io,
     
    215225            if ( (x==x_io) and (y==y_io) ):
    216226
    217                 bdv = mapping.addPeriph( 'BDV', base = bdv_base + offset, size = bdv_size,
    218                                          ptype = 'IOC', subtype = 'BDV' )
     227                if ( ioc_type != 'RDK' ):
     228                    ioc = mapping.addPeriph( 'IOC', base = ioc_base + offset, size = ioc_size,
     229                                             ptype = 'IOC', subtype = ioc_type )
    219230
    220231                tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size,
     
    244255                mapping.addIrq( pic, index = 7 , isrtype = 'ISR_CMA'   , channel = 3 )
    245256
    246                 mapping.addIrq( pic, index = 8 , isrtype = 'ISR_BDV'   , channel = 0 )
     257                if ( ioc_type == 'BDV' ):
     258                    mapping.addIrq( pic, index = 8 , isrtype = 'ISR_BDV'   , channel = 0 )
     259                if ( ioc_type == 'HBA' ):
     260                    mapping.addIrq( pic, index = 8 , isrtype = 'ISR_HBA'   , channel = 0 )
     261                if ( ioc_type == 'SDC' ):
     262                    mapping.addIrq( pic, index = 8 , isrtype = 'ISR_SDC'   , channel = 0 )
    247263
    248264                mapping.addIrq( pic, index = 16, isrtype = 'ISR_TTY_RX', channel = 0 )
     
    284300    ### global vseg for RAM-DISK in cluster[0][0]
    285301    ### identity mapping / non local / big pages
    286     if use_ramdisk:
     302    if (ioc_type == 'RDK'):
    287303
    288304        mapping.addGlobal( 'seg_ramdisk', ramdisk_vbase, ramdisk_size,
     
    342358    ### global vsegs for external peripherals: non local / big page
    343359    ### only mapped in cluster_io
    344     mapping.addGlobal( 'seg_bdv', bdv_base, bdv_size,
    345                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'BDV',
     360    mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size,
     361                       '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'IOC',
    346362                       local = False, big = True )
    347363
  • trunk/platforms/tsar_generic_leti/top.cpp

    r951 r967  
    11/////////////////////////////////////////////////////////////////////////
    2 // File: top.cpp (for tsar_generic_leti)
     2// File: top.cpp (for tsar_generic_leti platform)
    33// Author: Alain Greiner
    44// Copyright: UPMC/LIP6
     
    1111//
    1212// The processor is a MIPS32 processor wrapped in a GDB server
    13 // (this is defined in the tsar_xbar_cluster).
     13// (this is defined in the tsar_leti_cluster).
    1414//
    1515// The main hardware parameters are the mesh size (X_SIZE & Y_SIZE),
    1616// and the number of processors per cluster (NB_PROCS_MAX).
    1717// The NB_PROCS_MAX parameter cannot be larger than 4.
     18// Others parameters are the frame buffer size, the disk controller type
     19// (BDV or HBA), the number of TTY channels, the number of NIC channels,
     20// and the number of CMA channels.
    1821//
    1922// All external peripherals are located in cluster[X_SIZE-1][Y_SIZE-1],
    2023// and are connected to an IO bus (implemented as a vci_local_crossbar):
    21 // - one disk controller
    22 // - one multi-channel ethernet controller
    23 // - one multi-channel chained buffer dma controller
    24 // - one multi-channel tty controller
    25 // - one frame buffer controller
    26 // - one iopic controller
     24// - DISK : block device controller (BDV / HBA)
     25// - MNIC : multi-channel ethernet controller
     26// - CDMA : multi-channel chained buffer dma controller
     27// - MTTY : multi-channel tty controller
     28// - FBUF : frame buffer controller
     29// - IOPI : HWI to SWI translator
     30//
    2731// This IO bus is directly connected to the north ports of the CMD/RSP
    2832// routers in cluster[X_SIZE-1][y_SIZE-2] through VCI/DSPIN wrappers.
     
    4751//
    4852// Each processor receives 4 consecutive IRQ lines from the local XICU.
     53// The number of PTI and WTI IRQs is bounded to 16.
    4954//
    5055// In all clusters, the MEMC IRQ line (signaling a late write error)
    5156// is connected to XICU HWI[8]
    5257//
    53 // This IOBUS is connected to the north  port of the DIR_CMD
    54 // and DIR_RSP routers, in cluster(X_SIZE-1, Y_SIZE-1).
    5558// For all external peripherals, the hardware interrupts (HWI) are
    5659// translated to write interrupts (WTI) by the iopic component:
     
    5861// - IOPIC HWI[3:2]     connected to IRQ_NIC_TX[1:0]
    5962// - IOPIC HWI[7:4]     connected to IRQ_CMA_TX[3:0]]
    60 // - IOPIC HWI[8]       connected to IRQ_BDEV
     63// - IOPIC HWI[8]       connected to IRQ_DISK
    6164// - IOPIC HWI[15:9]    unused       (grounded)
    6265// - IOPIC HWI[23:16]   connected to IRQ_TTY_RX[7:0]]
     
    6972// - X_WIDTH          : number of bits for x coordinate (must be 4)
    7073// - Y_WIDTH          : number of bits for y coordinate (must be 4)
     74// - P_WIDTH          : number of bits for local processor coordinate
    7175// - X_SIZE           : number of clusters in a row (1,2,4,8,16)
    7276// - Y_SIZE           : number of clusters in a column (1,2,4,8)
     
    7781// - FBUF_X_SIZE      : number of pixels per line for frame buffer
    7882// - FBUF_Y_SIZE      : number of lines for frame buffer
     83// - XCU_NB_HWI       : number of XCU HWIs (must be 16)
     84// - XCU_NB_PTI       : number of XCU PTIs (must be 16)
     85// - XCU_NB_WTI       : number of XCU WTIs (must be 16)
     86// - XCU_NB_OUT       : number of XCU output (must be 16)
     87// - USE_IOC_XYZ      : IOC type (XYZ in HBA / BDV / SDC / RDK)
    7988//
    8089// Some other hardware parameters are not used when compiling the OS,
     
    8594// - L1_DWAYS         : L1 cache data number of ways
    8695// - L1_DSETS         : L1 cache data number of sets
    87 // - BDEV_IMAGE_NAME  : pathname for block device disk image
     96// - DISK_IMAGE_NAME  : pathname for block device disk image
    8897/////////////////////////////////////////////////////////////////////////
    8998// General policy for 40 bits physical address decoding:
     
    111120#include "gdbserver.h"
    112121#include "mapping_table.h"
     122
    113123#include "tsar_leti_cluster.h"
    114124#include "vci_local_crossbar.h"
     
    119129#include "vci_chbuf_dma.h"
    120130#include "vci_block_device_tsar.h"
     131#include "vci_multi_ahci.h"
    121132#include "vci_framebuffer.h"
    122133#include "vci_iopic.h"
     134
    123135#include "alloc_elems.h"
    124136
     137///////////////////////////////////////////////////
     138// Main hardware parameters values
     139///////////////////////////////////////////////////
     140
    125141#include "hard_config.h"
     142
     143///////////////////////////////////////////////////////////////////////////////////////
     144//    Secondary Hardware Parameters
     145///////////////////////////////////////////////////////////////////////////////////////
     146
     147#define XMAX                  X_SIZE         // actual number of columns in 2D mesh
     148#define YMAX                  (Y_SIZE - 1)   // actual number of rows in 2D mesh
     149
     150#define XRAM_LATENCY          0
     151
     152#define MEMC_WAYS             16
     153#define MEMC_SETS             256
     154
     155#define L1_IWAYS              4
     156#define L1_ISETS              64
     157
     158#define L1_DWAYS              4
     159#define L1_DSETS              64
     160
     161#define DISK_IMAGE_NAME       "../../../giet_vm/hdd/virt_hdd.dmg"
     162
     163#define ROM_SOFT_NAME         "../../softs/tsar_boot/preloader.elf"
     164
     165#define NORTH                 0
     166#define SOUTH                 1
     167#define EAST                  2
     168#define WEST                  3
    126169
    127170///////////////////////////////////////////////////
    128171//               Parallelisation
    129172///////////////////////////////////////////////////
     173
    130174#define USE_OPENMP _OPENMP
    131175
     
    164208
    165209
    166 ///////////////////////////////////////////////////////////////////////////////////////
    167 //    Secondary Hardware Parameters
    168 ///////////////////////////////////////////////////////////////////////////////////////
    169 
    170 #define XMAX                  X_SIZE         // actual number of columns in 2D mesh
    171 #define YMAX                  (Y_SIZE - 1)   // actual number of rows in 2D mesh
    172 
    173 #define XRAM_LATENCY          0
    174 
    175 #define MEMC_WAYS             16
    176 #define MEMC_SETS             256
    177 
    178 #define L1_IWAYS              4
    179 #define L1_ISETS              64
    180 
    181 #define L1_DWAYS              4
    182 #define L1_DSETS              64
    183 
    184 #define BDEV_IMAGE_NAME       "../../../giet_vm/hdd/virt_hdd.dmg"
    185 
    186 #define ROM_SOFT_NAME         "../../softs/tsar_boot/preloader.elf"
    187 
    188 #define NORTH                 0
    189 #define SOUTH                 1
    190 #define EAST                  2
    191 #define WEST                  3
    192210
    193211///////////////////////////////////////////////////////////////////////////////////////
     
    205223#define XICU_TGTID            1
    206224#define MTTY_TGTID            2
    207 #define BDEV_TGTID            3
     225#define DISK_TGTID            3
    208226#define FBUF_TGTID            4
    209227#define MNIC_TGTID            5
     
    211229#define IOPI_TGTID            7
    212230
    213 #define BDEV_SRCID            NB_PROCS_MAX
     231#define DISK_SRCID            NB_PROCS_MAX
    214232#define CDMA_SRCID            NB_PROCS_MAX + 1
    215233#define IOPI_SRCID            NB_PROCS_MAX + 2
     
    233251   size_t   trace_proc_id     = 0;                  // index of proc to be traced
    234252   char     soft_name[256]    = ROM_SOFT_NAME;      // pathname for ROM binary code
    235    char     disk_name[256]    = BDEV_IMAGE_NAME;    // pathname for DISK image
     253   char     disk_name[256]    = DISK_IMAGE_NAME;    // pathname for DISK image
    236254   uint32_t frozen_cycles     = MAX_FROZEN_CYCLES;  // for debug
    237255   struct   timeval t1,t2;
     
    260278
    261279            assert( (x < XMAX) and (y < (YMAX)) and
    262                   "MEMCID parameter refers a not valid memory cache");
     280                  "MEMCID parameter doesxn't fit valid XMAX/YMAX");
    263281         }
    264282         else if ((strcmp(argv[n], "-PROCID") == 0) && (n + 1 < argc))
     
    273291            assert( (x < XMAX) and (y < YMAX) and (l < NB_PROCS_MAX) and
    274292                  "PROCID parameter refers a not valid processor");
    275          }
    276          else if ((strcmp(argv[n], "-ROM") == 0) && ((n + 1) < argc))
    277          {
    278             strcpy(soft_name, argv[n + 1]);
    279          }
    280          else if ((strcmp(argv[n], "-DISK") == 0) && ((n + 1) < argc))
    281          {
    282             strcpy(disk_name, argv[n + 1]);
    283293         }
    284294         else if ((strcmp(argv[n], "-THREADS") == 0) && ((n + 1) < argc))
     
    298308            std::cout << "     - NCYCLES number_of_simulated_cycles" << std::endl;
    299309            std::cout << "     - DEBUG debug_start_cycle" << std::endl;
    300             std::cout << "     - ROM path to ROM image" << std::endl;
    301             std::cout << "     - DISK path to disk image" << std::endl;
    302310            std::cout << "     - THREADS simulator's threads number" << std::endl;
    303311            std::cout << "     - FROZEN max_number_of_lines" << std::endl;
    304             std::cout << "     - PERIOD number_of_cycles between trace" << std::endl;
    305312            std::cout << "     - MEMCID index_memc_to_be_traced" << std::endl;
    306313            std::cout << "     - PROCID index_proc_to_be_traced" << std::endl;
     
    323330            "Illegal NB_PROCS_MAX parameter" );
    324331
     332    assert( (XCU_NB_HWI == 16) and
     333            "XCU_NB_HWI must be 16" );
     334
     335    assert( (XCU_NB_PTI == 16) and
     336            "XCU_NB_PTI must be 16" );
     337
     338    assert( (XCU_NB_WTI == 16) and
     339            "XCU_NB_WTI must be 16" );
     340
     341    assert( (XCU_NB_OUT == 16) and
     342            "XCU_NB_OUT must be 16" );
     343   
    325344    assert( (NB_CMA_CHANNELS <= 4) and
    326345            "The NB_CMA_CHANNELS parameter cannot be larger than 4" );
    327346
    328347    assert( (NB_TTY_CHANNELS <= 8) and
    329             "The NB_TTY_CHANNELS parameter cannot be larger than 16" );
     348            "The NB_TTY_CHANNELS parameter cannot be larger than 8" );
    330349
    331350    assert( (NB_NIC_CHANNELS <= 2) and
     
    340359    std::cout << std::endl;
    341360
    342     std::cout << " - XMAX           = " << XMAX << std::endl;
    343     std::cout << " - YMAX           = " << YMAX << std::endl;
    344     std::cout << " - NB_PROCS_MAX     = " << NB_PROCS_MAX <<  std::endl;
    345     std::cout << " - NB_TTY_CHANNELS  = " << NB_TTY_CHANNELS <<  std::endl;
    346     std::cout << " - NB_NIC_CHANNELS  = " << NB_NIC_CHANNELS <<  std::endl;
    347     std::cout << " - NB_CMA_CHANNELS  = " << NB_CMA_CHANNELS <<  std::endl;
    348     std::cout << " - MEMC_WAYS        = " << MEMC_WAYS << std::endl;
    349     std::cout << " - MEMC_SETS        = " << MEMC_SETS << std::endl;
    350     std::cout << " - RAM_LATENCY      = " << XRAM_LATENCY << std::endl;
    351     std::cout << " - MAX_FROZEN       = " << frozen_cycles << std::endl;
    352     std::cout << " - MAX_CYCLES       = " << ncycles << std::endl;
    353     std::cout << " - RESET_ADDRESS    = " << RESET_ADDRESS << std::endl;
    354     std::cout << " - SOFT_FILENAME    = " << soft_name << std::endl;
    355     std::cout << " - DISK_IMAGENAME   = " << disk_name << std::endl;
    356     std::cout << " - OPENMP THREADS   = " << threads << std::endl;
     361    std::cout << " - XMAX             = " << XMAX << std::endl
     362              << " - YMAX             = " << YMAX << std::endl
     363              << " - NB_PROCS_MAX     = " << NB_PROCS_MAX <<  std::endl
     364              << " - NB_TTY_CHANNELS  = " << NB_TTY_CHANNELS <<  std::endl
     365              << " - NB_NIC_CHANNELS  = " << NB_NIC_CHANNELS <<  std::endl
     366              << " - NB_CMA_CHANNELS  = " << NB_CMA_CHANNELS <<  std::endl
     367              << " - MEMC_WAYS        = " << MEMC_WAYS << std::endl
     368              << " - MEMC_SETS        = " << MEMC_SETS << std::endl
     369              << " - RAM_LATENCY      = " << XRAM_LATENCY << std::endl
     370              << " - MAX_FROZEN       = " << frozen_cycles << std::endl
     371              << " - MAX_CYCLES       = " << ncycles << std::endl
     372              << " - RESET_ADDRESS    = " << RESET_ADDRESS << std::endl
     373              << " - SOFT_FILENAME    = " << soft_name << std::endl
     374              << " - DISK_IMAGENAME   = " << disk_name << std::endl
     375              << " - OPENMP THREADS   = " << threads << std::endl
     376              << " - DEBUG_PROCID     = " << trace_proc_id << std::endl
     377              << " - DEBUG_MEMCID     = " << trace_memc_id << std::endl;
    357378
    358379    std::cout << std::endl;
     
    427448
    428449   maptabd.add(Segment("seg_ioc0", SEG_IOC_BASE, SEG_IOC_SIZE,
    429                IntTab(cluster(0,0),BDEV_TGTID), false));
     450               IntTab(cluster(0,0),DISK_TGTID), false));
    430451
    431452   // segments for peripherals in cluster_io (XMAX-1,YMAX)
     
    439460               IntTab(cluster(XMAX-1, YMAX),FBUF_TGTID), false));
    440461
    441    maptabd.add(Segment("seg_bdev", SEG_IOC_BASE + offset, SEG_IOC_SIZE,
    442                IntTab(cluster(XMAX-1, YMAX),BDEV_TGTID), false));
     462   maptabd.add(Segment("seg_disk", SEG_IOC_BASE + offset, SEG_IOC_SIZE,
     463               IntTab(cluster(XMAX-1, YMAX),DISK_TGTID), false));
    443464
    444465   maptabd.add(Segment("seg_mnic", SEG_NIC_BASE + offset, SEG_NIC_SIZE,
     
    487508
    488509    // IRQs from external peripherals
    489     sc_signal<bool>                   signal_irq_bdev;
     510    sc_signal<bool>                   signal_irq_disk;
    490511    sc_signal<bool>                   signal_irq_mnic_rx[NB_NIC_CHANNELS];
    491512    sc_signal<bool>                   signal_irq_mnic_tx[NB_NIC_CHANNELS];
     
    573594
    574595   // VCI signals for iobus and peripherals
    575    VciSignals<vci_param_int>    signal_vci_ini_bdev("signal_vci_ini_bdev");
     596   VciSignals<vci_param_int>    signal_vci_ini_disk("signal_vci_ini_disk");
    576597   VciSignals<vci_param_int>    signal_vci_ini_cdma("signal_vci_ini_cdma");
    577598   VciSignals<vci_param_int>    signal_vci_ini_iopi("signal_vci_ini_iopi");
     
    582603   VciSignals<vci_param_int>    signal_vci_tgt_memc("signal_vci_tgt_memc");
    583604   VciSignals<vci_param_int>    signal_vci_tgt_xicu("signal_vci_tgt_xicu");
    584    VciSignals<vci_param_int>    signal_vci_tgt_bdev("signal_vci_tgt_bdev");
     605   VciSignals<vci_param_int>    signal_vci_tgt_disk("signal_vci_tgt_disk");
    585606   VciSignals<vci_param_int>    signal_vci_tgt_mtty("signal_vci_tgt_mtty");
    586607   VciSignals<vci_param_int>    signal_vci_tgt_fbuf("signal_vci_tgt_fbuf");
     
    660681                XICU_TGTID,
    661682                MTTY_TGTID,
    662                 BDEV_TGTID,
     683                DISK_TGTID,
    663684                disk_name,
    664685                MEMC_WAYS,
     
    713734                NB_PROCS_MAX + 3,             // number of local initiators
    714735                8,                            // number of local targets
    715                 BDEV_TGTID );                 // default target index
     736                DISK_TGTID );                 // default target index
    716737
    717738    //////////// vci_framebuffer
     
    723744                FBUF_X_SIZE, FBUF_Y_SIZE );
    724745
     746#if ( USE_IOC_HBA )
     747
     748    ////////////  vci_multi_ahci
     749    std::vector<std::string> filenames;
     750    filenames.push_back(disk_name);           // one single disk
     751    VciMultiAhci<vci_param_int>* 
     752    disk = new VciMultiAhci<vci_param_int>(
     753                "disk",
     754                maptabd,
     755                IntTab(cluster_io, DISK_SRCID),
     756                IntTab(cluster_io, DISK_TGTID),
     757                filenames,
     758                512,                          // block size
     759                64,                           // burst size (bytes)
     760                0 );                          // disk latency
     761
     762#elif ( USE_IOC_BDV or USE_IOC_SDC )
     763
    725764    ////////////  vci_block_device
    726765    VciBlockDeviceTsar<vci_param_int>*
    727     bdev = new VciBlockDeviceTsar<vci_param_int>(
    728                 "bdev",
     766    disk = new VciBlockDeviceTsar<vci_param_int>(
     767                "disk",
    729768                maptabd,
    730                 IntTab(cluster_io, BDEV_SRCID),
    731                 IntTab(cluster_io, BDEV_TGTID),
     769                IntTab(cluster_io, DISK_SRCID),
     770                IntTab(cluster_io, DISK_TGTID),
    732771                disk_name,
    733772                512,                          // block size
    734                 64 );                         // burst size
     773                64,                           // burst size (bytes)
     774                0 );                          // disk latency
     775#endif
    735776
    736777    //////////// vci_multi_nic
     
    807848    iobus->p_to_target[FBUF_TGTID]     (signal_vci_tgt_fbuf);
    808849    iobus->p_to_target[MNIC_TGTID]     (signal_vci_tgt_mnic);
    809     iobus->p_to_target[BDEV_TGTID]     (signal_vci_tgt_bdev);
     850    iobus->p_to_target[DISK_TGTID]     (signal_vci_tgt_disk);
    810851    iobus->p_to_target[CDMA_TGTID]     (signal_vci_tgt_cdma);
    811852    iobus->p_to_target[IOPI_TGTID]     (signal_vci_tgt_iopi);
     
    815856        iobus->p_to_initiator[p]       (signal_vci_ini_proc[p]);
    816857    }
    817     iobus->p_to_initiator[BDEV_SRCID]  (signal_vci_ini_bdev);
     858    iobus->p_to_initiator[DISK_SRCID]  (signal_vci_ini_disk);
    818859    iobus->p_to_initiator[CDMA_SRCID]  (signal_vci_ini_cdma);
    819860    iobus->p_to_initiator[IOPI_SRCID]  (signal_vci_ini_iopi);
     
    821862    std::cout << "  - IOBUS connected" << std::endl;
    822863
    823     // block_device
    824     bdev->p_clk                        (signal_clk);
    825     bdev->p_resetn                     (signal_resetn);
    826     bdev->p_vci_target                 (signal_vci_tgt_bdev);
    827     bdev->p_vci_initiator              (signal_vci_ini_bdev);
    828     bdev->p_irq                        (signal_irq_bdev);
    829 
    830     std::cout << "  - BDEV connected" << std::endl;
     864    // disk
     865    disk->p_clk                        (signal_clk);
     866    disk->p_resetn                     (signal_resetn);
     867    disk->p_vci_target                 (signal_vci_tgt_disk);
     868    disk->p_vci_initiator              (signal_vci_ini_disk);
     869#if USE_IOC_HBA
     870    disk->p_channel_irq[0]             (signal_irq_disk);
     871#else
     872    disk->p_irq                        (signal_irq_disk);
     873#endif
     874
     875    std::cout << "  - DISK connected" << std::endl;
    831876
    832877    // frame_buffer
     
    888933       else if(i < 4+NB_CMA_CHANNELS)  iopic->p_hwi[i] (signal_irq_cdma[i-4]);
    889934       else if(i < 8)                  iopic->p_hwi[i] (signal_irq_false);
    890        else if(i == 8)                 iopic->p_hwi[i] (signal_irq_bdev);
     935       else if(i == 8)                 iopic->p_hwi[i] (signal_irq_disk);
    891936       else if(i < 16)                 iopic->p_hwi[i] (signal_irq_false);
    892937       else if(i < 16+NB_TTY_CHANNELS) iopic->p_hwi[i] (signal_irq_mtty_rx[i-16]);
     
    12361281#if USE_PIC
    12371282            // trace external ioc
    1238             bdev->print_trace();
    1239             signal_vci_tgt_bdev.print_trace("[SIG]BDEV_TGT");
    1240             signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI");
     1283            disk->print_trace();
     1284            signal_vci_tgt_disk.print_trace("[SIG]DISK_TGT");
     1285            signal_vci_ini_disk.print_trace("[SIG]DISK_INI");
    12411286
    12421287            // trace external iopic
     
    12461291
    12471292            // trace external interrupts
    1248             if (signal_irq_bdev)   std::cout << "### IRQ_BDEV" << std::endl;
     1293            if (signal_irq_disk)   std::cout << "### IRQ_DISK" << std::endl;
    12491294#else
    1250             clusters[0][0]->bdev->print_trace();
    1251             clusters[0][0]->signal_vci_tgt_bdev.print_trace("[SIG]BDEV_0_0");
    1252             clusters[0][0]->signal_vci_ini_bdev.print_trace("[SIG]BDEV_0_0");
     1295            clusters[0][0]->disk->print_trace();
     1296            clusters[0][0]->signal_vci_tgt_disk.print_trace("[SIG]DISK_0_0");
     1297            clusters[0][0]->signal_vci_ini_disk.print_trace("[SIG]DISK_0_0");
    12531298#endif
    12541299
  • trunk/platforms/tsar_generic_leti/top.desc

    r628 r967  
    5454                  cell_size = vci_cell_size_int),
    5555
     56            Uses('caba:vci_multi_ahci',
     57                  cell_size = vci_cell_size_int),
     58
    5659            Uses('caba:vci_multi_tty',
    5760                  cell_size = vci_cell_size_int),
Note: See TracChangeset for help on using the changeset viewer.