Ignore:
Timestamp:
Feb 14, 2015, 5:08:13 PM (10 years ago)
Author:
alain
Message:

Removing the vobj objects fro the mapping_info structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_xml/mapping_info.h

    r491 r511  
    1717// variable (can be one). Multi-Writer/Multi-Reader communication channels
    1818// betwwen tasks are supported. Each vspace contains a variable number
    19 // of virtual segments (called vsegs).
     19// of virtual segments (called vsegs). The number of virtual space can be one.
    2020//
    2121// 3/ the mapping directives: both tasks on processors, and software objects
    22 // (vobjs and vsegs) on the physical memory banks (called psegs).
    23 // and a variable number of tasks. The number of virtual space can be one.
     22// (called vsegs) on the physical memory banks (called psegs).
    2423//
    2524// The mapping_info data structure is organised as the concatenation of
     
    3029// - mapping_vspace_t   vspace[] 
    3130// - mapping_vseg_t     vseg[]     
    32 // - mapping_vobj_t     vobj[]   
    3331// - mapping_task_t     task[] 
    3432// - mapping_proc_t     proc[] 
     
    4846#define MAPPING_VSPACE_SIZE   sizeof(mapping_vspace_t)
    4947#define MAPPING_VSEG_SIZE     sizeof(mapping_vseg_t)
    50 #define MAPPING_VOBJ_SIZE     sizeof(mapping_vobj_t)
    5148#define MAPPING_PSEG_SIZE     sizeof(mapping_pseg_t)
    5249#define MAPPING_TASK_SIZE     sizeof(mapping_task_t)
     
    6663typedef unsigned long long  paddr_t;
    6764
    68 enum vobjType
    69 {
    70     VOBJ_TYPE_ELF      = 0,  // loadable code/data object of elf files
    71     VOBJ_TYPE_BLOB     = 1,  // loadable blob object
    72     VOBJ_TYPE_PTAB     = 2,  // page table
    73     VOBJ_TYPE_PERI     = 3,  // hardware component
    74     VOBJ_TYPE_MWMR     = 4,  // MWMR channel
    75     VOBJ_TYPE_LOCK     = 5,  // Lock
    76     VOBJ_TYPE_BUFFER   = 6,  // Any "no initialization" objects (stacks...)
    77     VOBJ_TYPE_BARRIER  = 7,  // Barrier
    78     VOBJ_TYPE_CONST    = 8,  // Constant
    79     VOBJ_TYPE_MEMSPACE = 9,  // Memspace (descriptor must be initialised)
    80     VOBJ_TYPE_SCHED    = 10, // Array of schedulers (one per cluster)
    81     VOBJ_TYPE_HEAP     = 11, // Heap   f schedulers (one per cluster)
     65enum vsegType
     66{
     67    VSEG_TYPE_ELF      = 0,  // loadable code/data object of elf files
     68    VSEG_TYPE_BLOB     = 1,  // loadable blob object
     69    VSEG_TYPE_PTAB     = 2,  // page table
     70    VSEG_TYPE_PERI     = 3,  // hardware component
     71    VSEG_TYPE_MWMR     = 4,  // MWMR channel
     72    VSEG_TYPE_LOCK     = 5,  // Lock
     73    VSEG_TYPE_BUFFER   = 6,  // Any "no initialization" objects (stacks...)
     74    VSEG_TYPE_BARRIER  = 7,  // Barrier
     75    VSEG_TYPE_CONST    = 8,  // Constant
     76    VSEG_TYPE_MEMSPACE = 9,  // Memspace (descriptor must be initialised)
     77    VSEG_TYPE_SCHED    = 10, // Array of schedulers (one per cluster)
     78    VSEG_TYPE_HEAP     = 11, // Heap   f schedulers (one per cluster)
    8279};
    8380
     
    149146    unsigned int globals;            // total number of global vsegs
    150147    unsigned int vspaces;            // total number of virtual spaces
    151     unsigned int psegs;              // total number of physical segments (all clusters)
    152     unsigned int vsegs;              // total number of virtual segments (all vspaces)
    153     unsigned int vobjs;              // total number of virtual objects (all vspaces)
    154     unsigned int tasks;              // total number of tasks (all vspaces)
    155     unsigned int procs;              // total number of procs (all clusters)
    156     unsigned int irqs;               // total number of irqs (all clusters)
    157     unsigned int coprocs;            // total number of coprocs (all clusters)
    158     unsigned int cp_ports;           // total number of cp_ports (all coprocs)
    159     unsigned int periphs;            // total number of peripherals (all clusters)
    160 
     148    unsigned int psegs;              // total number of physical segments
     149    unsigned int vsegs;              // total number of virtual segments
     150    unsigned int tasks;              // total number of tasks
     151    unsigned int procs;              // total number of procs
     152    unsigned int irqs;               // total number of irqs
     153    unsigned int coprocs;            // total number of coprocs
     154    unsigned int cp_ports;           // total number of cp_ports
     155    unsigned int periphs;            // total number of peripherals
    161156    char name[32];                   // mapping name
    162157} mapping_header_t;
     
    170165
    171166    unsigned int    psegs;           // number of psegs in cluster
    172     unsigned int    pseg_offset;     // global index of first pseg in psegs set
     167    unsigned int    pseg_offset;     // global index of first pseg in psegs
    173168
    174169    unsigned int    procs;           // number of processors in cluster
    175     unsigned int    proc_offset;     // global index of first proc in procs set
     170    unsigned int    proc_offset;     // global index of first proc in procs
    176171 
    177172    unsigned int    coprocs;         // number of coprocessors in cluster
    178     unsigned int    coproc_offset;   // global index of first coproc in coprocs set
     173    unsigned int    coproc_offset;   // global index of first coproc in coprocs
    179174
    180175    unsigned int    periphs;         // number of peripherals in cluster
    181     unsigned int    periph_offset;   // global index of first coproc in periphs set
     176    unsigned int    periph_offset;   // global index of first coproc in periphs
    182177} mapping_cluster_t;
    183178
     
    187182{
    188183    char            name[32];        // virtual space name
    189     unsigned int    start_vobj_id;   // vobj containing start vector index
     184    unsigned int    start_vseg_id;   // vseg containing start vector index
    190185    unsigned int    vsegs;           // number of vsegs in vspace
    191     unsigned int    vobjs;           // number of vobjs in vspace
    192186    unsigned int    tasks;           // number of tasks in vspace
    193187    unsigned int    vseg_offset;     // global index of first vseg in vspace
    194     unsigned int    vobj_offset;     // global index of first vobj in vspace
    195188    unsigned int    task_offset;     // global index of first task in vspace
    196189} mapping_vspace_t;
     
    201194{
    202195    char            name[32];        // vseg name (unique in vspace)
     196    char            binpath[64];     // path for the binary code (if required)
    203197    unsigned int    vbase;           // base address in virtual space
    204198    paddr_t         pbase;           // base address in physical space
     
    206200    unsigned int    psegid;          // physical segment global index
    207201    unsigned int    mode;            // C-X-W-U flags
    208     unsigned int    vobjs;           // number of vobjs in vseg
    209     unsigned int    vobj_offset;     // global index of first vobj in vseg
    210     unsigned int    next_vseg;       // linked list of vsegs mapped on pseg
     202    unsigned int    type;            // vseg type
    211203    char            mapped;          // mapped if non zero
    212204    char            ident;           // identity mapping if non zero
     
    235227    unsigned int    proclocid;       // processor local index (inside cluster)
    236228    unsigned int    trdid;           // thread index in vspace
    237     unsigned int    stack_vobj_id;   // global index for vobj containing stack
    238     unsigned int    heap_vobj_id;    // global index for vobj containing heap
     229    unsigned int    stack_vseg_id;   // global index for vseg containing stack
     230    unsigned int    heap_vseg_id;    // global index for vseg containing heap
    239231    unsigned int    startid;         // index in start_vector
    240232} mapping_task_t;
    241 
    242 
    243 //////////////////////////////////////////////////////
    244 typedef struct __attribute__((packed))  mapping_vobj_s
    245 {
    246     char            name[32];        // vobj name (unique in a vspace)
    247     char            binpath[64];     // path for the binary code ("*.elf")
    248     unsigned int    type;            // type of vobj
    249     unsigned int    length;          // size (bytes)
    250     unsigned int    align;           // required alignement (logarithm of 2)
    251     unsigned int    vbase;           // virtual base addresse of the vobj
    252     unsigned int    init;            // init value (used by barrier or mwmr channel)
    253 } mapping_vobj_t;
    254233
    255234
     
    276255    unsigned int    direction;       // TO_COPROC == 0 / FROM_COPROC == 1
    277256    unsigned int    vspaceid;        // index of the vspace containing MWMR channel
    278     unsigned int    mwmr_vobj_id;    // global index of vobj containing MWMR channel
     257    unsigned int    mwmr_vseg_id;    // global index of vseg containing MWMR channel
    279258} mapping_cp_port_t;
    280259
Note: See TracChangeset for help on using the changeset viewer.