Changeset 232 for soft/giet_vm/xml
- Timestamp:
- Mar 5, 2013, 4:00:09 PM (12 years ago)
- Location:
- soft/giet_vm/xml
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/xml/mapping_info.h
r228 r232 178 178 unsigned int clusterid; // physical cluster index 179 179 unsigned int proclocid; // processor local index (inside cluster) 180 unsigned int vobjlocid; // stack vobj index in vspace 180 unsigned int stack_vobjid; // stack vobj index in vspace 181 unsigned int heap_vobjid; // heap vobj index in vspace 181 182 unsigned int startid; // index in start_vector 182 183 unsigned int use_tty; // TTY terminal required (global) … … 229 230 unsigned int direction; // TO_COPROC == 0 / FROM_COPROC == 1 230 231 unsigned int vspaceid; // index of the vspace containing the MWMR channel 231 unsigned int vobjlocid; // local index of the vobj containing the MWMR channel232 unsigned int mwmr_vobjid; // local index of the vobj containing the MWMR channel 232 233 } mapping_cp_port_t; 233 234 -
soft/giet_vm/xml/xml_driver.c
r228 r232 271 271 port_id < coproc[coproc_id].port_offset + coproc[coproc_id].ports; 272 272 port_id++) { 273 unsigned int vobj_id = cp_port[port_id]. vobjlocid + vspace[cp_port[port_id].vspaceid].vobj_offset;273 unsigned int vobj_id = cp_port[port_id].mwmr_vobjid + vspace[cp_port[port_id].vspaceid].vobj_offset; 274 274 fprintf(fpout, " <port direction = \"%s\" ", port_direction[cp_port[port_id].direction]); 275 275 fprintf(fpout, " vspacename = \"%s\" ", vspace[cp_port[port_id].vspaceid].name); … … 353 353 task_id < (vspace[vspace_id].task_offset + vspace[vspace_id].tasks); 354 354 task_id++) { 355 unsigned int vobj_id = task[task_id].vobjlocid + vspace[vspace_id].vobj_offset; 355 unsigned int stack_vobj_id = task[task_id].stack_vobjid + vspace[vspace_id].vobj_offset; 356 unsigned int heap_vobj_id = task[task_id].heap_vobjid + vspace[vspace_id].vobj_offset; 356 357 357 358 fprintf(fpout, " <task name = \"%s\" ", task[task_id].name); 358 359 fprintf(fpout, "clusterid = \"%d\" ", task[task_id].clusterid); 359 360 fprintf(fpout, "proclocid = \"%d\" ", task[task_id].proclocid); 360 fprintf(fpout, "stackname = \"%s\" ", vobj[vobj_id].name); 361 fprintf(fpout, "stackname = \"%s\" ", vobj[stack_vobj_id].name); 362 if (heap_vobj_id != -1) { 363 fprintf(fpout, "heapname = \"%s\" ", vobj[heap_vobj_id].name); 364 } 361 365 fprintf(fpout, "startid = \"%d\" ", task[task_id].startid); 362 366 fprintf(fpout, "usetty = \"%d\" ", task[task_id].use_tty); -
soft/giet_vm/xml/xml_parser.c
r231 r232 109 109 unsigned int cluster_y = 0; 110 110 unsigned int cluster_x = 0; 111 unsigned int nb_proc_max = 0; // max number of processors per cluster 111 unsigned int nb_proc_max = 0; // max number of processors per cluste 112 113 unsigned int nb_tasks_max = 0; // max number of tasks (for all vspaces) 112 114 unsigned int nb_timer_channel_max = 0; // max number of user timer 113 115 unsigned int nb_dma_channel_max = 0; … … 350 352 printf(" stackid = %d\n", index); 351 353 #endif 352 task[task_index]-> vobjlocid = index;354 task[task_index]->stack_vobjid = index; 353 355 } 354 356 else { … … 363 365 exit(1); 364 366 } 367 368 ////////// get heap attribute 369 str = getStringValue(reader, "heapname", &ok); 370 if (ok) { 371 int index = getVobjLocId(vspace_index, str, vobj_loc_index); 372 if (index >= 0) { 373 #if XML_PARSER_DEBUG 374 printf(" heapname = %s\n", str); 375 printf(" heapid = %d\n", index); 376 #endif 377 task[task_index]->heap_vobjid = index; 378 } 379 else { 380 printf("[XML ERROR] illegal or missing <heapname> for task (%d,%d)\n", vspace_index, task_loc_index); 381 exit(1); 382 } 383 } 384 else { 385 task[task_index]->heap_vobjid = -1; 386 } 387 365 388 366 389 ////////// get startid attribute … … 715 738 char * str; 716 739 unsigned int ok; 740 unsigned int nb_task_vspace = 0; 717 741 718 742 vobj_loc_index = 0; … … 782 806 else if (strcmp(tag, "task") == 0) { 783 807 taskNode(reader); 808 nb_task_vspace++; 784 809 } 785 810 else if (strcmp(tag, "#text") == 0) { } … … 818 843 } 819 844 845 nb_tasks_max += nb_task_vspace; 820 846 vspace_index++; 821 847 return; … … 1934 1960 printf(" vobj_index = %d\n", vobj_id); 1935 1961 #endif 1936 cp_port[i]-> vobjlocid = vobj_id;1962 cp_port[i]->mwmr_vobjid = vobj_id; 1937 1963 1938 1964 assert((vobj[ vspace[vspace_id]->vobj_offset + vobj_id]->type == VOBJ_TYPE_MWMR) … … 1990 2016 def_int_write(fdout, "NB_IOCS" , nb_ioc_channel); 1991 2017 def_int_write(fdout, "NB_NICS" , nb_nic_channel); 2018 def_int_write(fdout, "NB_TASKS" , nb_tasks_max); 1992 2019 1993 2020 file_write(fdout, "\n");
Note: See TracChangeset
for help on using the changeset viewer.