Changes between Version 11 and Version 12 of mapping_info


Ignore:
Timestamp:
Oct 27, 2014, 5:41:10 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mapping_info

    v11 v12  
    88All software objects (user applications code and data, but also kernel code and critical kernel structures such as the page tables or the processors schedulers) are statically build and loaded from disk into physical memory by the GIET_VM bootloader in the boot phase.
    99
    10 The main advantage of this static approach is to provide the system designed a full control on the placement of tasks on processors but also of the data (software objects) on the distributed physical memory banks. It supports replication of critical objects such as kernel code, or page tables.
    11 
    12 To control the mapping, the system designer must provide a '''map.bin''' file containing a dedicated C binary data structure, that is loaded in memory by the bootloader.
     10The main advantage of this static approach is to provide the system designed a full control on the placement of tasks on processors but also of the data (software objects) on the distributed physical memory banks. It supports replication of (read-only) critical objects such as kernel code, user code, or page tables (the page tables are statically initialised in the boot phase, and are not modified anymore in the execution phase).
     11
     12To define the mapping, the system designer must provide a '''map.bin''' file containing a dedicated C binary data structure, that is loaded in memory by the bootloader.
    1313
    1414The next section describes this C binary structure. The following sections describe how  this binary file can be generated by the '''genmap''' tool from a python language description. Finally the genmap tool can generate a readable '''map.xml''' representation of the '''map.bin''' file.
     
    115115The supported ISR types are defined in the [source:soft/giet_vm/giet_python/mapping.py mapping.py] file.
    116116
    117 == __Python global vsegs description__ ==
     117== __Python kernel mapping__ ==
    118118
    119119The mapping of the GIET_VM vsegs must be defined in the ''arch.py'' file.
     
    126126|| size          || segment size (bytes ||
    127127|| mode        || access rights (CXWU) ||
    128 || vtype        || software object type  ||
     128|| vtype        || vseg type  ||
    129129|| x              || destination cluster X coordinate ||
    130130|| y              || destination cluster Y coordinate ||
     
    134134|| align        || alignment constraint if required (default = 0) ||
    135135|| local        || only mapped in local page table if true (default = False) ||
    136 || big          || to be mapped in one or several big pages (2 Mbytes) ||
     136|| big          || to be mapped in big pages (default = False) ||
    137137
    138138The supported values for the ''mode'' argument, and for the ''vtype'' arguments are defined in the [source:soft/giet_vm/giet_python/mapping.py mapping.py] file.
     
    151151
    152152There is six types of vsegs for the GIET_VM kernel, but some vsegs are replicated in all clusters, to improve locality and minimize contention, as explained below:
    153  * The '''seg_kernel_ptab_x_y''' vseg has type PTAB. It contains the page tables for all vspaces (one page table per vspace). There is one such vseg in each cluster
    154 (one set of page tables per cluster). Each vseg is mapped in one big physical page.
    155  * The '''seg_kernel_code''' & '''seg_kernel_init''' have type ELF. They contain the kernel code. These two vsegs must be mapped in one big physical page. They are  replicated in each cluster, to improve locality and minimize contention. The ''local'' attribute must be set, because the same virtual address will be mapped on different physical address depending on the cluster.   
     153 * The '''seg_kernel_ptab_x_y''' vseg has type PTAB. It contains the page tables for all vspaces (one page table per vspace). There is one such vseg in each cluster (one set of page tables per cluster). Each PTAB vseg is mapped in one big physical page.
     154 * The '''seg_kernel_code''' & '''seg_kernel_init''' have type ELF. They contain the kernel code. These two vsegs must be mapped in one big physical page. They are  replicated in each cluster. The ''local'' attribute must be set, because the same virtual address will be mapped on different physical address depending on the cluster.   
    156155 * The  '''seg_kernel_data''' & '''seg_kernel_uncdata''' have type ELF. They contain the kernel global data (cacheable, or non cacheable). They are not replicated, and must be mapped in cluster[0][0].
    157156 * The '''seg_kernel_sched_x_y''' vseg has type SCHED. It contains the processor schedulers (one scheduler per processor). There is one such vseg in each cluster, and it must be mapped on small pages (two small pages per scheduler).
     
    159158=== Peripheral vsegs ===
    160159
    161 As a global vseg can be mapped (replicated) in more than one cluster, the local argumentpage tables can be r, the ''local'' argument
    162 
    163 
    164 == __Python application description__ ==
     160A global vseg must be defined for each addressable peripheral.
     161As a general rule, we use big physical page(s) for each external peripheral, and one small physical page for each replicated peripheral.
     162
     163== __Python user application mapping__ ==
     164
     165The mapping of a given application  must be defined in the ''application.py'' file.
     166
     167A vspace, containing a variable number of tasks, and a variable number of vsegs, must be defined for each application.
     168
     169There is several types of user vseg 
     170 * The '''code''' vseg can be optionally replicated in all clusters.
     171 * The '''data''' vseg is not replicated. It must contain the ''start_vector'' defining the entry points of the application tasks.
     172 * It must exist as many '''stack'''' vseg as the number of tasks.
     173 * One or several '''heap''' vseg(s), can be used by the malloc user library.
     174 * One or several '''mwmr''' vseg(s)
     175 
     176=== create the vspace ===
     177
     178The '''mapping.addvspace( )''' construct define a vspace. It has the following arguments:
     179|| name        || vspace name == application name  ||
     180|| startname || name of              ||
     181
     182===  vseg mapping ===
     183
     184The '''mapping.addVseg( )''' construct define the mapping of a vseg in the vspace. It has the following arguments:
     185|| vspace     || vspace containing the vseg ||
     186|| name       || vseg name ||
     187|| vbase       || virtual base address ||
     188|| size         || vseg size (bytes) ||
     189|| mode      || access rights (CXWU) ||
     190|| vtype       || vseg type ||
     191|| x              || destination cluster X coordinate ||
     192|| y              || destination cluster Y coordinate ||
     193|| pseg        || destination pseg name ||
     194|| binpath    || pathname for binary file if required (default = ' ') ||
     195|| align        || alignment constraint if required (default = 0) ||
     196|| local        || only mapped in local page table if true (default = False) ||
     197|| big          || to be mapped in big pages (default = False) ||
     198
     199The supported values for the ''mode'' argument, and for the ''vtype'' arguments are defined in the [source:soft/giet_vm/giet_python/mapping.py mapping.py] file.
     200The ''x'', ''y'', and ''pseg'' arguments define actually the mapping.
     201
     202=== task mapping ===
     203
     204The '''mapping.addVseg( )''' construct  define the mapping of  a task in the vspace. It has the following arguments:
     205|| vspace       || vspace containing the task ||
     206|| name         || task name (unique in vspace) ||
     207|| trdid          || thread index (unique in vspace] ||
     208|| x                || destination cluster X coordinate ||
     209|| y                || destination cluster Y coordinate ||
     210|| lpid            || destination processor local index ||
     211|| stackname || name of vseg containing stack ||
     212|| heapname  || name of vseg containing heap ||
     213|| startid        || index in start vector (defining the task entry point virtual address) ||
     214
     215The ''x'', ''y'', ''lpid'' arguments define actually the task placement.
     216
     217
     218
     219