Changes between Version 22 and Version 23 of mapping_info


Ignore:
Timestamp:
Feb 14, 2015, 11:06:36 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mapping_info

    v22 v23  
    4343The C binary mapping data structure is defined in the [source:soft/giet_vm/giet_xml/mapping_info.h mapping_info.h] file, and is organised as the concatenation of a fixed size header, and 10 variable size arrays:
    4444
    45 ||  mapping_cluster_t    || a cluster                 || contains psegs, processors, peripherals and coprocessors ||
    46 ||  mapping_pseg_t      || a physical segment || defined by a name, a base address ans a size (bytes)         || 
    47 ||  mapping_vspace_t   || a virtual space        || contains several vsegs and several parallel tasks                ||
    48 ||  mapping_vseg_t      || a virtual segment    || contains one software object                                             ||     
    49 ||  mapping_task_t       || a task                      || must be statically associated to a processor                    || 
    50 ||  mapping_proc_t       || a processor            || can contain IRQ inputs (for XCU or PIC peripherals)           ||
    51 ||  mapping_irq_t         || a source interrupt   ||                                                                                         ||
    52 ||  mapping_coproc_t   || a coprocessor          || contains several cp_ports                                                 ||
    53 ||  mapping_cp_port_t  || a coprocessor port  ||                                                                                         ||
     45|| mapping_cluster_t    || a cluster                 || contains psegs, processors, peripherals and coprocessors ||
     46|| mapping_pseg_t      || a physical segment || defined by a name, a base address ans a size (bytes)         || 
     47|| mapping_vspace_t   || a virtual space        || contains several vsegs and several parallel tasks                ||
     48|| mapping_vseg_t      || a virtual segment    || contains one software object                                             ||     
     49|| mapping_task_t       || a task                      || must be statically associated to a processor                    || 
     50|| mapping_proc_t       || a processor            || can contain IRQ inputs (for XCU or PIC peripherals)           ||
     51|| mapping_irq_t         || a source interrupt   ||                                                                                         ||
     52|| mapping_coproc_t   || a coprocessor          || contains several cp_ports                                                 ||
     53|| mapping_cp_port_t  || a coprocessor port  ||                                                                                         ||
    5454
    5555The ''map.bin'' file must be stored on disk and will be loaded  in memory by the GIET_VM bootloader in the ''seg_boot_mapping'' segment.
     
    5858
    5959A specific mapping requires at least two python files:
    60  * The '''arch.py''' file is attached to a given hardware architecture. It describes both the (possibly generic) hardware architectures, and the mapping of the kernel software objects on this hardware architecture.
    61  * The '''appli.py''' file is attached to a given user application. It describes both the application structure (tasks and communication channels), and the mapping of the application tasks and software objects on the architecture.
     60 * The '''arch.py''' file is attached to a given hardware architecture. It describes both the (possibly generic) hardware architecture, and the mapping of the kernel software objects on this hardware architecture.
     61 * The '''appli.py''' file is attached to a given user application. It describes the application structure (tasks and communication channels), and the mapping of the application tasks and software objects on the architecture.
    6262
    6363The various Python Classes used by these these files are defined in the [source:soft/giet_vm/giet_python/mapping.py mapping.py] file.
     
    9191=== 2. Processor core ===
    9292
    93 The '''mapping.addProc( )''' construct define one MIPS32 processor core in a cluster (number of processor cores can different in different clusters). It has the following arguments:
     93The '''mapping.addProc( )''' construct adds one MIPS32 processor core in a cluster (number of processor cores can different in different clusters). It has the following arguments:
    9494|| x      || cluster x coordinate ||
    9595|| y      || physical ||
     
    100100=== 3. Physical memory bank ===
    101101
    102 The '''mapping.addRam( )''' construct define one physical memory bank, and the associated physical segment in a cluster. It has the following arguments:
     102The '''mapping.addRam( )''' construct adds one physical memory bank, and the associated physical segment in a cluster. It has the following arguments:
    103103|| name      || segment name ||
    104104|| base       || physical memory bank base address ||
    105105|| size        || physical memory bank size (bytes) ||
    106106
    107 The target cluster coordinates (x,y) are defined by the base address MSB bits.
     107The target cluster coordinates (x,y) are implicitely defined by the base address MSB bits.
    108108
    109109=== 4. Physical peripheral ===
     
    157157The 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.
    158158
    159 The (''x'', ''y'', ''pseg')' arguments define actually the vseg placement.
     159The (''x'', ''y'', ''pseg'') arguments define actually the vseg placement.
    160160
    161161=== 1. Boot vsegs ===
     
    170170=== 2. Kernel vsegs ===
    171171
    172 There is six types of global vsegs for the GIET_VM kernel, but some vsegs are replicated in all clusters, to improve locality and minimize contention, as explained below:
    173  * 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.
    174  * 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.   
    175  * 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].
    176  * 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).
     172Most kernel vsegs are replicated or distributed in all clusters, to improve locality and minimize contention, as explained below:
     173 * The '''seg_kernel_ptab_x_y''' vsegs have type PTAB. They 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.
     174 * The '''seg_kernel_code''' & '''seg_kernel_init''' have type ELF. They contain the kernel code. These two vsegs are 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.   
     175 * The  '''seg_kernel_data''' has type ELF, and contains the kernel global data. They are not replicated, and is mapped in cluster[0][0].
     176 * The '''seg_kernel_sched_x_y''' vseg have 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).
     177 * The '''seg_kernel_heap_x_y''' vseg have type HEAP, and contain the distributed kernel heap. There is one HEAP vseg per cluster, and is mapped in at least one big page.
    177178
    178179=== 3. Peripheral vsegs ===
     
    188189
    189190There is several types of user vseg 
    190  * The '''code''' vseg can be (optionally) replicated in all clusters.
    191  * The '''data''' vseg is not replicated. It must contain the ''start_vector'' defining the entry points of the application tasks.
    192  * It must exist as many '''stack'''' vseg as the number of tasks.
    193  * One or several '''heap''' vseg(s), can be used by the ''malloc'' user library.
    194  * One or several '''mwmr''' vseg(s) can be used by the ''mwmr'' user library.
     191 * The '''code''' vsegs must have type ELF. They can be (optionally) replicated in all clusters.
     192 * The '''data''' vseg must have type ELF. It is not replicated. It must contain the ''start_vector'' defining the entry points of the application tasks.
     193 * It must exist as many '''stack'''' vseg as the number of tasks. They have type BUFFER, and should be placed in the cluster containing the processor running the task.
     194 * Zero, one or several '''heap''' vseg(s), can be used by the ''malloc'' user library. They must have type HEAP.
     195 * One or several '''mwmr''' vseg(s) can be used by the ''mwmr'' user library. They must have the BUFFER type.
    195196 
    196197=== 1. create the vspace ===