Changeset 734 for trunk/platforms


Ignore:
Timestamp:
Jul 3, 2014, 6:04:16 PM (10 years ago)
Author:
alain
Message:

The RAM size (in each cluster) is now defined as a parameter
in the arch.py file (not anymore as a define in the top.cpp).

Location:
trunk/platforms/tsar_generic_iob
Files:
2 edited

Legend:

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

    r730 r734  
    4141    ### define architecture constants
    4242
    43     nb_ttys        = 1
    44     nb_nics        = 2
    45     fbf_width      = 1024
    46     x_io           = 0
    47     y_io           = 0
    48     x_width        = 4
    49     y_width        = 4
    50     paddr_width    = 40
    51     irq_per_proc   = 4
    52     use_ramdisk    = False
    53     peri_increment = 0x10000
     43    nb_ttys           = 1
     44    nb_nics           = 2
     45    fbf_width         = 1024
     46    x_io              = 0
     47    y_io              = 0
     48    x_width           = 4
     49    y_width           = 4
     50    paddr_width       = 40
     51    irq_per_proc      = 4
     52    use_ramdisk       = False
     53    peri_increment    = 0x10000
     54    distributed_ptabs = True
    5455                 
    5556    ### parameters checking
     
    158159                       x_io           = x_io,         
    159160                       y_io           = y_io,
    160                        peri_increment = peri_increment )         
     161                       peri_increment = peri_increment,
     162                       ram_base       = ram_base,
     163                       ram_size       = ram_size )         
    161164
    162165    ###  external peripherals (accessible in cluster[0,0] only for this mapping)
     
    240243                       identity = True )
    241244
    242     ### local global vsegs for kernel / same virtual address / different physical address
    243 
    244     for x in xrange( x_size ):
    245         for y in xrange( y_size ):
    246             cluster_xy = (x << y_width) + y;
    247 
    248             mapping.addGlobal( 'seg_kernel_code', kernel_code_vbase, kernel_code_size,
    249                                'CXW_', vtype = 'ELF', x = x , y = y , pseg = 'RAM',
    250                                binpath = 'build/kernel/kernel.elf', local = True )
    251 
    252             mapping.addGlobal( 'seg_kernel_init', kernel_init_vbase, kernel_init_size,
    253                                'CXW_', vtype = 'ELF', x = x , y = y , pseg = 'RAM',
    254                                binpath = 'build/kernel/kernel.elf', local = True )
     245    ### the code global vsegs for kernel can be replicated in all clusters
     246    ### if the page tables are distributed in all clusters.
     247
     248    if distributed_ptabs:
     249        for x in xrange( x_size ):
     250            for y in xrange( y_size ):
     251                cluster_xy = (x << y_width) + y;
     252
     253                mapping.addGlobal( 'seg_kernel_code', kernel_code_vbase, kernel_code_size,
     254                                   'CXW_', vtype = 'ELF', x = x , y = y , pseg = 'RAM',
     255                                   binpath = 'build/kernel/kernel.elf', local = True )
     256
     257                mapping.addGlobal( 'seg_kernel_init', kernel_init_vbase, kernel_init_size,
     258                                   'CXW_', vtype = 'ELF', x = x , y = y , pseg = 'RAM',
     259                                   binpath = 'build/kernel/kernel.elf', local = True )
     260    else:
     261        mapping.addGlobal( 'seg_kernel_code', kernel_code_vbase, kernel_code_size,
     262                           'CXW_', vtype = 'ELF', x = 0 , y = 0 , pseg = 'RAM',
     263                            binpath = 'build/kernel/kernel.elf', local = False )
     264
     265        mapping.addGlobal( 'seg_kernel_init', kernel_init_vbase, kernel_init_size,
     266                           'CXW_', vtype = 'ELF', x = 0 , y = 0 , pseg = 'RAM',
     267                           binpath = 'build/kernel/kernel.elf', local = False )
    255268
    256269    ### shared global vsegs for kernel
  • trunk/platforms/tsar_generic_iob/top.cpp

    r730 r734  
    234234/////////////////////////////////////////////////////////
    235235
    236 // Replicated RAMs : address is incremented by a cluster offset
    237 //     offset  = cluster(x,y) << (address_width-x_width-y_width);
    238 
    239 #define SEG_RAM_BASE          0x0000000000
    240 #define SEG_RAM_SIZE          0x0004000000   // 64 Mbytes
     236// All physical segments base addresses and sizes are defined
     237// in the hard_config.h file. For replicated segments, the
     238// base address is incremented by a cluster offset:
     239// offset  = cluster(x,y) << (address_width-x_width-y_width);
    241240
    242241////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.