Ignore:
Timestamp:
Sep 12, 2014, 3:10:04 PM (10 years ago)
Author:
cfuguet
Message:

tsar_generic_leti: Using the new P_WIDTH constant from hard_config.h

  • This constant is used in the clusters to compute the procesor id which now is: (((x << Y_WIDTH) + y) << P_WIDTH) + lpid
  • Introducing the p_width constant in the arch.py files
File:
1 edited

Legend:

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

    r797 r803  
    11#!/usr/bin/env python
    22
     3from math import log, ceil
    34from mapping import *
    45
    56###############################################################################
    6 #   file   : arch.py  (for the tsar_generic_iob architecture)
     7#   file   : arch.py  (for the tsar_generic_leti architecture)
    78#   date   : may 2014
    89#   author : Alain Greiner
    910###############################################################################
    10 #  This file contains a mapping generator for the "tsar_generic_iob" platform.
     11#  This file contains a mapping generator for the "tsar_generic_leti" platform.
    1112#  This includes both the hardware architecture (clusters, processors,
    1213#  peripherals, physical space segmentation) and the mapping of all kernel
    13 #  objects (global vsegs).  This platform includes 6 external peripherals,
    14 #  accessible through two IO_Bridge components located in cluster [0,0] and
    15 #  cluster [x_size-1, y_size-1].  Available peripherals are: TTY, BDV, FBF,
    16 #  ROM, NIC, CMA.
     14#  objects (global vsegs).
    1715#
    1816#  The "constructor" parameters are:
     
    4947    x_width           = 4
    5048    y_width           = 4
     49    p_width           = int(ceil(log(nb_procs, 2)))
    5150    paddr_width       = 40
    5251    irq_per_proc      = 4
     
    5453    peri_increment    = 0x10000
    5554    reset_address     = 0x00000000
    56     distributed_ptabs = True
     55    distributed_ptabs = False
    5756
    5857    ### parameters checking
    5958
    60     assert( nb_procs <= 4 )
     59    assert( nb_procs <= (1 << p_width) )
    6160
    6261    assert( (x_size == 1) or (x_size == 2) or (x_size == 4)
     
    7170            ((x_io == x_size-1) and (y_io == y_size-1)) )
    7271
    73     platform_name  = 'tsar_iob_%d_%d_%d' % ( x_size, y_size, nb_procs )
     72    platform_name  = 'tsar_leti_%d_%d_%d' % ( x_size, y_size, nb_procs )
    7473
    7574    ### define physical segments
     
    107106    rdk_size  = 0x02000000                 # 32 Mbytes
    108107
     108    ### define  preloader vseg base address and size
     109
     110    preloader_vbase      = 0x00000000      # ident
     111    preloader_size       = 0x00010000      # 64 Kbytes
     112
    109113    ### define  bootloader vsegs base addresses and sizes
    110114
    111     boot_mapping_vbase   = 0x00000000      # ident
     115    boot_mapping_vbase   = 0x00010000      # ident
    112116    boot_mapping_size    = 0x00080000      # 512 Kbytes
    113117
    114     boot_code_vbase      = 0x00080000      # ident
     118    boot_code_vbase      = 0x00090000      # ident
    115119    boot_code_size       = 0x00040000      # 256 Kbytes
    116120
    117     boot_data_vbase      = 0x000C0000      # ident
     121    boot_data_vbase      = 0x000D0000      # ident
    118122    boot_data_size       = 0x00080000      # 512 Kbytes
    119123
    120     boot_stack_vbase     = 0x00140000      # ident
     124    boot_stack_vbase     = 0x00150000      # ident
    121125    boot_stack_size      = 0x00050000      # 320 Kbytes
    122126
     
    135139    kernel_init_size     = 0x00010000      # 64 Kbytes
    136140
    137     kernel_sched_vbase   = 0xF0000000            # distributed in all clusters
     141    kernel_sched_vbase   = 0x80060000            # distributed in all clusters
    138142    kernel_sched_size    = 0x2000 * nb_procs     # 8 kbytes per processor
    139143
     
    146150                       x_width        = x_width,
    147151                       y_width        = y_width,
     152                       p_width        = p_width,
    148153                       paddr_width    = paddr_width,
    149154                       coherence      = True,
     
    218223                mapping.addProc( x, y, p )
    219224
     225    ### global vseg for preloader
     226
     227    mapping.addGlobal( 'seg_preloader', preloader_vbase, preloader_size, '__W_',
     228                       vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM',
     229                       identity = True )
     230
    220231    ### global vseg for ram disk
    221232
    222     mapping.addGlobal( 'seg_rdk', rdk_base, rdk_size, '__W_',
    223                        vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM',
    224                        identity = True )
     233    if use_ramdisk:
     234        mapping.addGlobal( 'seg_rdk', rdk_base, rdk_size, '__W_',
     235                           vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM',
     236                           identity = True )
    225237
    226238    ### global vsegs for external peripherals / identity mapping
Note: See TracChangeset for help on using the changeset viewer.