Changeset 511 for soft/giet_vm/giet_xml/mapping_info.h
- Timestamp:
- Feb 14, 2015, 5:08:13 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_xml/mapping_info.h
r491 r511 17 17 // variable (can be one). Multi-Writer/Multi-Reader communication channels 18 18 // 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. 20 20 // 21 21 // 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). 24 23 // 25 24 // The mapping_info data structure is organised as the concatenation of … … 30 29 // - mapping_vspace_t vspace[] 31 30 // - mapping_vseg_t vseg[] 32 // - mapping_vobj_t vobj[]33 31 // - mapping_task_t task[] 34 32 // - mapping_proc_t proc[] … … 48 46 #define MAPPING_VSPACE_SIZE sizeof(mapping_vspace_t) 49 47 #define MAPPING_VSEG_SIZE sizeof(mapping_vseg_t) 50 #define MAPPING_VOBJ_SIZE sizeof(mapping_vobj_t)51 48 #define MAPPING_PSEG_SIZE sizeof(mapping_pseg_t) 52 49 #define MAPPING_TASK_SIZE sizeof(mapping_task_t) … … 66 63 typedef unsigned long long paddr_t; 67 64 68 enum v objType69 { 70 V OBJ_TYPE_ELF = 0, // loadable code/data object of elf files71 V OBJ_TYPE_BLOB = 1, // loadable blob object72 V OBJ_TYPE_PTAB = 2, // page table73 V OBJ_TYPE_PERI = 3, // hardware component74 V OBJ_TYPE_MWMR = 4, // MWMR channel75 V OBJ_TYPE_LOCK = 5, // Lock76 V OBJ_TYPE_BUFFER = 6, // Any "no initialization" objects (stacks...)77 V OBJ_TYPE_BARRIER = 7, // Barrier78 V OBJ_TYPE_CONST = 8, // Constant79 V OBJ_TYPE_MEMSPACE = 9, // Memspace (descriptor must be initialised)80 V OBJ_TYPE_SCHED = 10, // Array of schedulers (one per cluster)81 V OBJ_TYPE_HEAP = 11, // Heap f schedulers (one per cluster)65 enum 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) 82 79 }; 83 80 … … 149 146 unsigned int globals; // total number of global vsegs 150 147 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 161 156 char name[32]; // mapping name 162 157 } mapping_header_t; … … 170 165 171 166 unsigned int psegs; // number of psegs in cluster 172 unsigned int pseg_offset; // global index of first pseg in psegs set167 unsigned int pseg_offset; // global index of first pseg in psegs 173 168 174 169 unsigned int procs; // number of processors in cluster 175 unsigned int proc_offset; // global index of first proc in procs set170 unsigned int proc_offset; // global index of first proc in procs 176 171 177 172 unsigned int coprocs; // number of coprocessors in cluster 178 unsigned int coproc_offset; // global index of first coproc in coprocs set173 unsigned int coproc_offset; // global index of first coproc in coprocs 179 174 180 175 unsigned int periphs; // number of peripherals in cluster 181 unsigned int periph_offset; // global index of first coproc in periphs set176 unsigned int periph_offset; // global index of first coproc in periphs 182 177 } mapping_cluster_t; 183 178 … … 187 182 { 188 183 char name[32]; // virtual space name 189 unsigned int start_v obj_id; // vobjcontaining start vector index184 unsigned int start_vseg_id; // vseg containing start vector index 190 185 unsigned int vsegs; // number of vsegs in vspace 191 unsigned int vobjs; // number of vobjs in vspace192 186 unsigned int tasks; // number of tasks in vspace 193 187 unsigned int vseg_offset; // global index of first vseg in vspace 194 unsigned int vobj_offset; // global index of first vobj in vspace195 188 unsigned int task_offset; // global index of first task in vspace 196 189 } mapping_vspace_t; … … 201 194 { 202 195 char name[32]; // vseg name (unique in vspace) 196 char binpath[64]; // path for the binary code (if required) 203 197 unsigned int vbase; // base address in virtual space 204 198 paddr_t pbase; // base address in physical space … … 206 200 unsigned int psegid; // physical segment global index 207 201 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 211 203 char mapped; // mapped if non zero 212 204 char ident; // identity mapping if non zero … … 235 227 unsigned int proclocid; // processor local index (inside cluster) 236 228 unsigned int trdid; // thread index in vspace 237 unsigned int stack_v obj_id; // global index for vobjcontaining stack238 unsigned int heap_v obj_id; // global index for vobjcontaining heap229 unsigned int stack_vseg_id; // global index for vseg containing stack 230 unsigned int heap_vseg_id; // global index for vseg containing heap 239 231 unsigned int startid; // index in start_vector 240 232 } mapping_task_t; 241 242 243 //////////////////////////////////////////////////////244 typedef struct __attribute__((packed)) mapping_vobj_s245 {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 vobj249 unsigned int length; // size (bytes)250 unsigned int align; // required alignement (logarithm of 2)251 unsigned int vbase; // virtual base addresse of the vobj252 unsigned int init; // init value (used by barrier or mwmr channel)253 } mapping_vobj_t;254 233 255 234 … … 276 255 unsigned int direction; // TO_COPROC == 0 / FROM_COPROC == 1 277 256 unsigned int vspaceid; // index of the vspace containing MWMR channel 278 unsigned int mwmr_v obj_id; // global index of vobjcontaining MWMR channel257 unsigned int mwmr_vseg_id; // global index of vseg containing MWMR channel 279 258 } mapping_cp_port_t; 280 259
Note: See TracChangeset
for help on using the changeset viewer.