Changeset 204 for soft/giet_vm/xml/xml_driver.c
- Timestamp:
- Aug 14, 2012, 8:14:55 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/xml/xml_driver.c
r189 r204 218 218 fprintf( fpout, "<?xml version = \"1.0\"?>\n\n"); 219 219 220 fprintf( fpout, "<mapping_info signature = \"0x%x\"\n", header->signature); 221 fprintf( fpout, " name = \"%s\"\n", header->name); 222 fprintf( fpout, " clusters = \"%d\"\n", header->clusters); 223 fprintf( fpout, " vspaces = \"%d\"\n", header->vspaces); 224 fprintf( fpout, " globals = \"%d\" >\n\n", header->globals); 220 fprintf( fpout, "<mapping_info signature = \"0x%x\" ", header->signature); 221 fprintf( fpout, " name = \"%s\" ", header->name); 222 fprintf( fpout, " clusters = \"%d\" ", header->clusters); 223 fprintf( fpout, " vspaces = \"%d\" >\n\n", header->vspaces); 225 224 226 225 ///////////////////// clusters /////////////////////////////////////////////// … … 231 230 fprintf( fpout, " <cluster index = \"%d\" >\n", cluster_id); 232 231 for ( pseg_id = cluster[cluster_id].pseg_offset ; 233 234 235 { 236 fprintf( fpout, " <pseg name = \"%s\"\n",pseg[pseg_id].name);237 fprintf( fpout, " type = \"%s\"\n",pseg_type[pseg[pseg_id].type]);238 fprintf( fpout, " base = \"0x%x\"\n",pseg[pseg_id].base);239 fprintf( fpout, " 232 pseg_id < cluster[cluster_id].pseg_offset + cluster[cluster_id].psegs ; 233 pseg_id++ ) 234 { 235 fprintf( fpout, " <pseg name = \"%s\" ", pseg[pseg_id].name); 236 fprintf( fpout, " type = \"%s\" ", pseg_type[pseg[pseg_id].type]); 237 fprintf( fpout, " base = \"0x%x\" ", pseg[pseg_id].base); 238 fprintf( fpout, " length = \"0x%x\" />\n", pseg[pseg_id].length); 240 239 } 241 240 … … 243 242 244 243 for ( proc_id = cluster[cluster_id].proc_offset ; 245 proc_id < cluster[cluster_id].proc_offset + cluster[cluster_id].procs ; 246 proc_id++ ) 247 { 248 fprintf( fpout, " <proc index = \"%d\" >\n", proc_id); 249 for ( irq_id = proc[proc_id].irq_offset ; irq_id < proc[proc_id].irq_offset + proc[proc_id].irqs ; irq_id++ ) 244 proc_id < cluster[cluster_id].proc_offset + cluster[cluster_id].procs ; 245 proc_id++ ) 246 { 247 fprintf( fpout, " <proc index = \"%d\" >\n", proc_id); 248 for ( irq_id = proc[proc_id].irq_offset ; 249 irq_id < proc[proc_id].irq_offset + proc[proc_id].irqs ; 250 irq_id++ ) 250 251 { 251 fprintf( fpout, " <irq type = \"%s\"\n",irq_type[irq[irq_id].type]);252 fprintf( fpout, " icuid = \"0x%x\"\n",irq[irq_id].icuid);253 fprintf( fpout, " isr = \"%s\"\n",isr_type[irq[irq_id].isr]);254 fprintf( fpout, " channel = \"0x%x\" />\n",irq[irq_id].channel);252 fprintf( fpout, " <irq type = \"%s\" ", irq_type[irq[irq_id].type]); 253 fprintf( fpout, " icuid = \"0x%x\" ", irq[irq_id].icuid); 254 fprintf( fpout, " isr = \"%s\" ", isr_type[irq[irq_id].isr]); 255 fprintf( fpout, " channel = \"0x%x\" />\n", irq[irq_id].channel); 255 256 } 256 fprintf( fpout, " 257 fprintf( fpout, " </proc>\n" ); 257 258 } 258 259 … … 261 262 262 263 for ( coproc_id = cluster[cluster_id].coproc_offset ; 263 coproc_id < cluster[cluster_id].coproc_offset + cluster[cluster_id].coprocs ; 264 coproc_id++ ) 265 { 266 fprintf( fpout, " <coproc name = \"%s\"\n", coproc[coproc_id].name); 267 fprintf( fpout, " psegname = \"%s\" >\n", pseg[coproc[coproc_id].psegid].name); 268 for ( port_id = coproc[coproc_id].port_offset ; port_id < coproc[coproc_id].port_offset + coproc[coproc_id].ports ; port_id++ ) 264 coproc_id < cluster[cluster_id].coproc_offset + cluster[cluster_id].coprocs ; 265 coproc_id++ ) 266 { 267 fprintf( fpout, " <coproc name = \"%s\" ", coproc[coproc_id].name); 268 fprintf( fpout, " psegname = \"%s\" >\n", pseg[coproc[coproc_id].psegid].name); 269 for ( port_id = coproc[coproc_id].port_offset ; 270 port_id < coproc[coproc_id].port_offset + coproc[coproc_id].ports ; 271 port_id++ ) 269 272 { 270 273 unsigned int vobj_id = cp_port[port_id].vobjlocid + vspace[cp_port[port_id].vspaceid].vobj_offset; 271 fprintf( fpout, " <port direction = \"%s\"\n", port_direction[ cp_port[port_id].direction]);272 fprintf( fpout, " vspacename = \"%s\"\n",vspace[cp_port[port_id].vspaceid].name);273 fprintf( fpout, " vobjname= \"%s\" />\n", vobj[vobj_id].name);274 fprintf( fpout, " <port direction = \"%s\" ", port_direction[ cp_port[port_id].direction]); 275 fprintf( fpout, " vspacename = \"%s\" ", vspace[cp_port[port_id].vspaceid].name); 276 fprintf( fpout, " vobjname = \"%s\" />\n", vobj[vobj_id].name); 274 277 } 275 fprintf( fpout, " 278 fprintf( fpout, " </coproc>\n" ); 276 279 } 277 280 … … 279 282 280 283 for ( periph_id = cluster[cluster_id].periph_offset ; 281 282 283 { 284 fprintf( fpout, " <periph type = \"%s\"\n",periph_type[periph[periph_id].type]);285 fprintf( fpout, " psegname = \"%s\"\n",pseg[periph[periph_id].psegid].name);286 fprintf( fpout, " channels= \"%d\" />\n", periph[periph_id].channels);284 periph_id < cluster[cluster_id].periph_offset + cluster[cluster_id].periphs ; 285 periph_id++ ) 286 { 287 fprintf( fpout, " <periph type = \"%s\" ", periph_type[periph[periph_id].type]); 288 fprintf( fpout, " psegname = \"%s\" ", pseg[periph[periph_id].psegid].name); 289 fprintf( fpout, " channels = \"%d\" />\n", periph[periph_id].channels); 287 290 } 288 291 fprintf( fpout, " </cluster>\n" ); … … 297 300 unsigned int pseg_id = vseg[vseg_id].psegid; 298 301 299 fprintf( fpout, " <vseg name = \"%s\"\n",vseg[vseg_id].name);300 fprintf( fpout, " vbase = \"0x%x\"\n",vseg[vseg_id].vbase);301 fprintf( fpout, " mode = \"%s\"\n", mode_str[vseg[vseg_id].mode]);302 fprintf( fpout, " clusterid = \"%d\"\n",pseg[pseg_id].cluster);303 fprintf( fpout, " psegname = \"%s\"\n",pseg[pseg_id].name);304 fprintf( fpout, " ident = \"%d\" >\n",vseg[vseg_id].ident);302 fprintf( fpout, " <vseg name = \"%s\" ", vseg[vseg_id].name); 303 fprintf( fpout, "vbase = \"0x%x\" ", vseg[vseg_id].vbase); 304 fprintf( fpout, "mode = \"%s\" ", mode_str[vseg[vseg_id].mode]); 305 fprintf( fpout, "clusterid = \"%d\" ", pseg[pseg_id].cluster); 306 fprintf( fpout, "psegname = \"%s\" ", pseg[pseg_id].name); 307 fprintf( fpout, "ident = \"%d\" >\n", vseg[vseg_id].ident); 305 308 for ( vobj_id = vseg[vseg_id].vobj_offset; 306 309 vobj_id < (vseg[vseg_id].vobj_offset + vseg[vseg_id].vobjs); 307 310 vobj_id++ ) 308 311 { 309 fprintf( fpout, " <vobj name = \"%s\"\n",vobj[vobj_id].name);310 fprintf( fpout, " type = \"%s\"\n",vobj_type[vobj[vobj_id].type]);311 fprintf( fpout, " length = \"0x%x\"\n",vobj[vobj_id].length);312 fprintf( fpout, " align = \"%d\"\n",vobj[vobj_id].align);313 fprintf( fpout, " init = \"%d\" \n",vobj[vobj_id].init);314 fprintf( fpout, " binpath= \"%s\" />\n", vobj[vobj_id].binpath);312 fprintf( fpout, " <vobj name = \"%s\" ", vobj[vobj_id].name); 313 fprintf( fpout, "type = \"%s\" ", vobj_type[vobj[vobj_id].type]); 314 fprintf( fpout, "length = \"0x%x\" ", vobj[vobj_id].length); 315 fprintf( fpout, "align = \"%d\" ", vobj[vobj_id].align); 316 fprintf( fpout, "init = \"%d\" ", vobj[vobj_id].init); 317 fprintf( fpout, "binpath = \"%s\" />\n", vobj[vobj_id].binpath); 315 318 } 316 319 fprintf( fpout, " </vseg>\n"); … … 324 327 { 325 328 unsigned int func_id = vspace[vspace_id].vobj_offset + vspace[vspace_id].start_offset; 326 fprintf( fpout, " <vspace name = \"%s\"\n",vspace[vspace_id].name);327 fprintf( fpout, " startname = \"%s\" >\n\n", vobj[func_id].name);329 fprintf( fpout, " <vspace name = \"%s\" ", vspace[vspace_id].name); 330 fprintf( fpout, " startname = \"%s\" >\n", vobj[func_id].name); 328 331 329 332 for ( vseg_id = vspace[vspace_id].vseg_offset ; 330 vseg_id < (vspace[vspace_id].vseg_offset + vspace[vspace_id].vsegs) ; vseg_id++ ) 333 vseg_id < (vspace[vspace_id].vseg_offset + vspace[vspace_id].vsegs) ; 334 vseg_id++ ) 331 335 { 332 336 unsigned int pseg_id = vseg[vseg_id].psegid; 333 337 334 fprintf( fpout, " <vseg name = \"%s\"\n",vseg[vseg_id].name);335 fprintf( fpout, " vbase = \"0x%x\"\n",vseg[vseg_id].vbase);336 fprintf( fpout, " mode = \"%s\"\n", mode_str[vseg[vseg_id].mode]);337 fprintf( fpout, " clusterid = \"%d\"\n",pseg[pseg_id].cluster);338 fprintf( fpout, " psegname = \"%s\"\n",pseg[pseg_id].name);339 fprintf( fpout, " ident = \"%d\" >\n",vseg[vseg_id].ident);338 fprintf( fpout, " <vseg name = \"%s\" ", vseg[vseg_id].name); 339 fprintf( fpout, "vbase = \"0x%x\" ", vseg[vseg_id].vbase); 340 fprintf( fpout, "mode = \"%s\" ", mode_str[vseg[vseg_id].mode]); 341 fprintf( fpout, "clusterid = \"%d\" ", pseg[pseg_id].cluster); 342 fprintf( fpout, "psegname = \"%s\" ", pseg[pseg_id].name); 343 fprintf( fpout, "ident = \"%d\" >\n", vseg[vseg_id].ident); 340 344 341 345 for ( vobj_id = vseg[vseg_id].vobj_offset ; … … 343 347 vobj_id++ ) 344 348 { 345 fprintf( fpout, " <vobj name = \"%s\"\n",vobj[vobj_id].name);346 fprintf( fpout, " type = \"%s\" \n",vobj_type[vobj[vobj_id].type]);347 fprintf( fpout, " length = \"0x%x\" \n", vobj[vobj_id].length);348 fprintf( fpout, " align = \"%d\" \n",vobj[vobj_id].align);349 fprintf( fpout, " init = \"%d\" \n",vobj[vobj_id].init);350 fprintf( fpout, " binpath= \"%s\" />\n", vobj[vobj_id].binpath);349 fprintf( fpout, " <vobj name = \"%s\" ", vobj[vobj_id].name); 350 fprintf( fpout, "type = \"%s\" ", vobj_type[vobj[vobj_id].type]); 351 fprintf( fpout, "length = \"0x%x\" ", vobj[vobj_id].length); 352 fprintf( fpout, "align = \"%d\" ", vobj[vobj_id].align); 353 fprintf( fpout, "init = \"%d\" ", vobj[vobj_id].init); 354 fprintf( fpout, "binpath = \"%s\" />\n", vobj[vobj_id].binpath); 351 355 } 352 fprintf( fpout, " </vseg>\n");356 fprintf( fpout, " </vseg>\n\n"); 353 357 } 354 358 for ( task_id = vspace[vspace_id].task_offset ; … … 358 362 unsigned int vobj_id = task[task_id].vobjlocid + vspace[vspace_id].vobj_offset; 359 363 360 fprintf( fpout, " <task name = \"%s\"\n",task[task_id].name);361 fprintf( fpout, " clusterid = \"%d\"\n",task[task_id].clusterid);362 fprintf( fpout, " proclocid = \"%d\"\n",task[task_id].proclocid);363 fprintf( fpout, " stackname = \"%s\"\n",vobj[vobj_id].name);364 fprintf( fpout, " startid = \"%d\"\n",task[task_id].startid);365 fprintf( fpout, " usetty = \"%d\"\n",task[task_id].use_tty);366 fprintf( fpout, " usenic = \"%d\"\n",task[task_id].use_nic);367 fprintf( fpout, " usetimer = \"%d\"\n",task[task_id].use_timer);368 fprintf( fpout, " usefbma = \"%d\" />\n\n", task[task_id].use_fbdma);364 fprintf( fpout, " <task name = \"%s\" ", task[task_id].name); 365 fprintf( fpout, "clusterid = \"%d\" ", task[task_id].clusterid); 366 fprintf( fpout, "proclocid = \"%d\" ", task[task_id].proclocid); 367 fprintf( fpout, "stackname = \"%s\" ", vobj[vobj_id].name); 368 fprintf( fpout, "startid = \"%d\" ", task[task_id].startid); 369 fprintf( fpout, "usetty = \"%d\" ", task[task_id].use_tty); 370 fprintf( fpout, "usenic = \"%d\" ", task[task_id].use_nic); 371 fprintf( fpout, "usetimer = \"%d\" ", task[task_id].use_timer); 372 fprintf( fpout, "usefbma = \"%d\" />\n", task[task_id].use_fbdma); 369 373 } 370 374 fprintf( fpout, " </vspace>\n\n");
Note: See TracChangeset
for help on using the changeset viewer.