Changeset 295 for soft/giet_vm/giet_xml/xml_driver.c
- Timestamp:
- Mar 26, 2014, 6:44:44 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_xml/xml_driver.c
r289 r295 18 18 19 19 ////////////////////////////////////////////////////// 20 void buildXml(mapping_header_t * header, FILE * fpout) { 20 void buildXml(mapping_header_t * header, FILE * fpout) 21 { 22 // mnemonics defined in mapping_info.h 21 23 const char * vobj_type[] = 22 24 { … … 27 29 "MWMR", // MWMR channel 28 30 "LOCK", // Spin-Lock 29 "BUFFER", // Any "no intialiasation needed" object s(stacks...)31 "BUFFER", // Any "no intialiasation needed" object (stacks...) 30 32 "BARRIER", // Barrier 31 33 "CONST", // Constant … … 34 36 }; 35 37 38 // mnemonics defined in mapping_info.h 36 39 const char * pseg_type[] = 37 40 { 38 41 "RAM", 39 "ROM", 42 "ROM", // deprecated => use PERI 40 43 "PERI", 41 44 }; 42 45 46 // mnemonics defined in mapping_info.h 43 47 const char * irq_type[] = 44 48 { 45 "HARD", 46 "SOFT", 47 "TIME", 48 }; 49 49 "HWI", 50 "WTI", 51 "PTI", 52 }; 53 54 // mnemonics defined in irq_handler.h 50 55 const char * isr_type[] = 51 56 { 52 "ISR_DEFAULT", 53 "ISR_ SWITCH",54 "ISR_TTY ",55 "ISR_ DMA",56 "ISR_ IOC",57 "ISR_DEFAULT", 58 "ISR_TICK", 59 "ISR_TTY_RX", 60 "ISR_TTY_TX", 61 "ISR_BDV", 57 62 "ISR_TIMER", 58 }; 59 63 "ISR_WAKUP", 64 "ISR_NIC_RX", 65 "ISR_NIC_TX", 66 "ISR_CMA", 67 }; 68 69 // mnemonics defined in mapping_info.h 60 70 const char * periph_type[] = 61 71 { … … 74 84 "TTY", 75 85 "XCU", 76 }; 77 78 const char * periph_subtype[] = 86 "PIC", 87 }; 88 89 const char * ioc_subtype[] = 79 90 { 80 91 "BDV", … … 242 253 fprintf(fpout, " x_width = \"%d\" \n" , header->x_width); 243 254 fprintf(fpout, " y_width = \"%d\" \n" , header->y_width); 244 fprintf(fpout, " vspaces = \"%d\" \n" , header->vspaces); 245 fprintf(fpout, " increment = \"%d\" \n" , header->vspaces); 246 fprintf(fpout, " irq_per_proc = \"%d\" >\n\n", header->irq_per_proc); 255 fprintf(fpout, " irq_per_proc = \"%d\" \n" , header->irq_per_proc); 256 fprintf(fpout, " use_ramdisk = \"%d\" \n" , header->use_ramdisk); 257 fprintf(fpout, " x_io = \"%d\" \n" , header->x_io); 258 fprintf(fpout, " y_io = \"%d\" >\n\n", header->y_io); 247 259 248 260 ///////////////////// clusters /////////////////////////////////////////////// … … 271 283 for (proc_id = cluster[cluster_id].proc_offset; 272 284 proc_id < cluster[cluster_id].proc_offset + cluster[cluster_id].procs; 273 proc_id++) 274 { 275 fprintf(fpout, " <proc index = \"%d\" >\n", proc_index); 276 for (irq_id = proc[proc_id].irq_offset; 277 irq_id < proc[proc_id].irq_offset + proc[proc_id].irqs; 278 irq_id++) 279 { 280 fprintf(fpout, " <irq type = \"%s\" ", irq_type[irq[irq_id].type]); 281 fprintf(fpout, " icuid = \"0x%x\" ", irq[irq_id].icuid); 282 fprintf(fpout, " isr = \"%s\" ", isr_type[irq[irq_id].isr]); 283 fprintf(fpout, " channel = \"0x%x\" />\n", irq[irq_id].channel); 284 } 285 fprintf(fpout, " </proc>\n" ); 286 } 287 285 proc_id++, proc_index++) 286 { 287 fprintf(fpout, " <proc index = \"%d\" />\n", proc_index); 288 } 288 289 289 290 ///////////////////// coprocessors /////////////////////////////////////////// … … 316 317 317 318 if (periph[periph_id].subtype < PERIPH_SUBTYPE_MAX_VALUE) 318 fprintf(fpout, " subtype = \"%s\" ", periph_subtype[periph[periph_id].subtype]);319 fprintf(fpout, " subtype = \"%s\" ", ioc_subtype[periph[periph_id].subtype]); 319 320 320 321 fprintf(fpout, " psegname = \"%s\" ", pseg[periph[periph_id].psegid].name); 321 fprintf(fpout, " channels = \"%d\" />\n", periph[periph_id].channels); 322 fprintf(fpout, " channels = \"%d\" >\n", periph[periph_id].channels); 323 for (irq_id = periph[periph_id].irq_offset; 324 irq_id < periph[periph_id].irq_offset + periph[periph_id].irqs; 325 irq_id++) 326 { 327 fprintf(fpout, " <irq srctype = \"%s\" ", irq_type[irq[irq_id].srctype]); 328 fprintf(fpout, " srcid = \"%d\" ", irq[irq_id].srcid); 329 fprintf(fpout, " isr = \"%s\" ", isr_type[irq[irq_id].isr]); 330 fprintf(fpout, " channel = \"%d\" ", irq[irq_id].channel); 331 fprintf(fpout, " dstx = \"%d\" ", irq[irq_id].dstx); 332 fprintf(fpout, " dsty = \"%d\" ", irq[irq_id].dsty); 333 fprintf(fpout, " dstid = \"%d\" />\n", irq[irq_id].dstid); 334 } 335 fprintf(fpout, " </periph>\n"); 322 336 } 323 337 fprintf(fpout, " </cluster>\n" );
Note: See TracChangeset
for help on using the changeset viewer.