Changeset 174
- Timestamp:
- May 30, 2011, 2:07:57 PM (14 years ago)
- Location:
- trunk/softs/soft_filter_giet
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/soft_filter_giet/ldscript
r162 r174 10 10 peripherals are not present in the architecture */ 11 11 12 NB_CLUSTERS = 4; /* number of clusters */12 NB_CLUSTERS = 64; /* number of clusters */ 13 13 NB_PROCS = 4; /* number of processors per cluster */ 14 14 NB_TASKS = 1; /* number of tasks per processor */ -
trunk/softs/soft_filter_giet/main.c
r170 r174 82 82 83 83 unsigned int date = 0; 84 unsigned int delta = 0;85 84 86 85 int c; // cluster index for loops … … 202 201 { 203 202 int p; 204 delta = proctime() - date; 205 date = date + delta; 206 PRINTF("\n*** Starting load at cycle %d (%d)\n", date, delta); 203 date = proctime(); 204 PRINTF("\n*** Starting load at cycle %d\n", date); 207 205 for ( p=0 ; p<nprocs ; p++ ) LOAD_START[cid][p] = date; 208 206 … … 220 218 } 221 219 222 delta = proctime() - date; 223 date = date + delta; 224 PRINTF("*** Completing load at cycle %d (%d)\n", date, delta); 220 date = proctime(); 221 PRINTF("*** Completing load at cycle %d\n", date); 225 222 for ( p=0 ; p<nprocs ; p++ ) LOAD_ENDED[cid][p] = date; 226 223 } … … 237 234 // if (z>NP-1) TA(cid,l,z) == TA(cid,l,NP-1) 238 235 239 delta = proctime() - date; 240 date = date + delta; 241 PRINTF("\n*** Starting horizontal filter at cycle %d (%d)\n", date, delta); 236 date = proctime(); 237 PRINTF("\n*** Starting horizontal filter at cycle %d\n", date); 242 238 HORI_START[cid][lid] = date; 243 239 … … 295 291 } 296 292 297 delta = proctime() - date; 298 date = date + delta; 299 PRINTF("*** Completing horizontal filter at cycle %d (%d)\n", date, delta); 293 date = proctime(); 294 PRINTF("*** Completing horizontal filter at cycle %d\n", date); 300 295 HORI_ENDED[cid][lid] = date; 301 296 … … 310 305 // if (l>NL-1) TB(cid,p,x) == TB(cid,p,NL-1) 311 306 312 delta = proctime() - date; 313 date = date + delta; 314 PRINTF("\n*** starting vertical filter at cycle %d (%d)\n", date, delta); 307 date = proctime(); 308 PRINTF("\n*** starting vertical filter at cycle %d\n", date); 315 309 VERT_START[cid][lid] = date; 316 310 … … 386 380 } 387 381 388 delta = proctime() - date; 389 date = date + delta; 390 PRINTF("*** Completing vertical filter at cycle %d (%d)\n", date, delta); 382 date = proctime(); 383 PRINTF("*** Completing vertical filter at cycle %d\n", date); 391 384 VERT_ENDED[cid][lid] = date; 392 385 … … 400 393 // Eah processor computes & displays (NL/ntasks) lines. 401 394 402 delta = proctime() - date; 403 date = date + delta; 404 PRINTF("\n*** Starting display at cycle %d (%d)\n", date, delta); 395 date = proctime(); 396 PRINTF("\n*** Starting display at cycle %d\n", date); 405 397 DISP_START[cid][lid] = date; 406 398 … … 417 409 } 418 410 419 delta = proctime() - date; 420 date = date + delta; 421 PRINTF("*** Completing display at cycle %d (%d)\n", date, delta); 411 date = proctime(); 412 PRINTF("*** Completing display at cycle %d\n", date); 422 413 DISP_ENDED[cid][lid] = date; 423 414 424 415 barrier_wait(3); 425 416 426 PRINTF("\n*** Starting Instrumentation at cycle %d (%d)\n\n", date, delta); 427 428 // Instrumentation (done by processor 0 in all clusters) 429 int cc, pp; 430 unsigned int min_load_start = 1000000000; 431 unsigned int max_load_start = 0; 432 unsigned int min_load_ended = 1000000000; 433 unsigned int max_load_ended = 0; 434 435 unsigned int min_hori_start = 1000000000; 436 unsigned int max_hori_start = 0; 437 unsigned int min_hori_ended = 1000000000; 438 unsigned int max_hori_ended = 0; 439 440 unsigned int min_vert_start = 1000000000; 441 unsigned int max_vert_start = 0; 442 unsigned int min_vert_ended = 1000000000; 443 unsigned int max_vert_ended = 0; 444 445 unsigned int min_disp_start = 1000000000; 446 unsigned int max_disp_start = 0; 447 unsigned int min_disp_ended = 1000000000; 448 unsigned int max_disp_ended = 0; 449 450 if ( lid == 0 ) 451 { 417 ///////////////////////////////////////////////////////// 418 // Instrumentation (done by processor 0 in cluster 0) 419 420 if ( pid == 0 ) 421 { 422 date = proctime(); 423 PRINTF("\n*** Starting Instrumentation at cycle %d\n\n", date); 424 425 int cc, pp; 426 unsigned int min_load_start = 1000000000; 427 unsigned int max_load_start = 0; 428 unsigned int min_load_ended = 1000000000; 429 unsigned int max_load_ended = 0; 430 431 unsigned int min_hori_start = 1000000000; 432 unsigned int max_hori_start = 0; 433 unsigned int min_hori_ended = 1000000000; 434 unsigned int max_hori_ended = 0; 435 436 unsigned int min_vert_start = 1000000000; 437 unsigned int max_vert_start = 0; 438 unsigned int min_vert_ended = 1000000000; 439 unsigned int max_vert_ended = 0; 440 441 unsigned int min_disp_start = 1000000000; 442 unsigned int max_disp_start = 0; 443 unsigned int min_disp_ended = 1000000000; 444 unsigned int max_disp_ended = 0; 445 452 446 for ( cc=0 ; cc<nclusters ; cc++ ) 453 447 { … … 475 469 } 476 470 } 477 } 478 PRINTF(" - LOAD_START : min = %d / max = %d / med = %d / delta = %d\n", 479 min_load_start, max_load_start, (min_load_start+max_load_start)/2, max_load_start-min_load_start); 480 PRINTF(" - LOAD_END : min = %d / max = %d / med = %d / delta = %d\n", 481 min_load_ended, max_load_ended, (min_load_ended+max_load_ended)/2, max_load_ended-min_load_ended); 482 483 PRINTF(" - HORI_START : min = %d / max = %d / med = %d / delta = %d\n", 484 min_hori_start, max_hori_start, (min_hori_start+max_hori_start)/2, max_hori_start-min_hori_start); 485 PRINTF(" - HORI_END : min = %d / max = %d / med = %d / delta = %d\n", 486 min_hori_ended, max_hori_ended, (min_hori_ended+max_hori_ended)/2, max_hori_ended-min_hori_ended); 487 488 PRINTF(" - VERT_START : min = %d / max = %d / med = %d / delta = %d\n", 489 min_vert_start, max_vert_start, (min_vert_start+max_vert_start)/2, max_vert_start-min_vert_start); 490 PRINTF(" - VERT_END : min = %d / max = %d / med = %d / delta = %d\n", 491 min_vert_ended, max_vert_ended, (min_vert_ended+max_vert_ended)/2, max_vert_ended-min_vert_ended); 492 493 PRINTF(" - DISP_START : min = %d / max = %d / med = %d / delta = %d\n", 494 min_disp_start, max_disp_start, (min_disp_start+max_disp_start)/2, max_disp_start-min_disp_start); 495 PRINTF(" - DISP_END : min = %d / max = %d / med = %d / delta = %d\n", 496 min_disp_ended, max_disp_ended, (min_disp_ended+max_disp_ended)/2, max_disp_ended-min_disp_ended); 497 498 PRINTF(" - BARRIER LOAD/HORI = %d\n", min_hori_start - max_load_ended); 499 PRINTF(" - BARRIER HORI/VERT = %d\n", min_vert_start - max_hori_ended); 500 PRINTF(" - BARRIER VERT/DISP = %d\n", min_disp_start - max_vert_ended); 471 PRINTF(" - LOAD_START : min = %d / max = %d / med = %d / delta = %d\n", 472 min_load_start, max_load_start, (min_load_start+max_load_start)/2, max_load_start-min_load_start); 473 PRINTF(" - LOAD_END : min = %d / max = %d / med = %d / delta = %d\n", 474 min_load_ended, max_load_ended, (min_load_ended+max_load_ended)/2, max_load_ended-min_load_ended); 475 476 PRINTF(" - HORI_START : min = %d / max = %d / med = %d / delta = %d\n", 477 min_hori_start, max_hori_start, (min_hori_start+max_hori_start)/2, max_hori_start-min_hori_start); 478 PRINTF(" - HORI_END : min = %d / max = %d / med = %d / delta = %d\n", 479 min_hori_ended, max_hori_ended, (min_hori_ended+max_hori_ended)/2, max_hori_ended-min_hori_ended); 480 481 PRINTF(" - VERT_START : min = %d / max = %d / med = %d / delta = %d\n", 482 min_vert_start, max_vert_start, (min_vert_start+max_vert_start)/2, max_vert_start-min_vert_start); 483 PRINTF(" - VERT_END : min = %d / max = %d / med = %d / delta = %d\n", 484 min_vert_ended, max_vert_ended, (min_vert_ended+max_vert_ended)/2, max_vert_ended-min_vert_ended); 485 486 PRINTF(" - DISP_START : min = %d / max = %d / med = %d / delta = %d\n", 487 min_disp_start, max_disp_start, (min_disp_start+max_disp_start)/2, max_disp_start-min_disp_start); 488 PRINTF(" - DISP_END : min = %d / max = %d / med = %d / delta = %d\n", 489 min_disp_ended, max_disp_ended, (min_disp_ended+max_disp_ended)/2, max_disp_ended-min_disp_ended); 490 491 PRINTF(" - BARRIER LOAD/HORI = %d\n", min_hori_start - max_load_ended); 492 PRINTF(" - BARRIER HORI/VERT = %d\n", min_vert_start - max_hori_ended); 493 PRINTF(" - BARRIER VERT/DISP = %d\n", min_disp_start - max_vert_ended); 494 495 PRINTF(" - LOAD = %d\n", max_load_ended); 496 PRINTF(" - FILTER = %d\n", max_vert_ended - max_load_ended); 497 PRINTF(" - DISPLAY = %d\n", max_disp_ended - max_vert_ended); 498 499 PRINTF("\nBEGIN LOAD_START\n"); 500 for ( cc=0 ; cc<nclusters ; cc++ ) 501 { 502 for ( pp=0 ; pp<nprocs ; pp++ ) 503 { 504 PRINTF("cluster= %d proc= %d date= %d\n", cc, pp, LOAD_START[cc][pp]); 505 } 506 } 507 PRINTF("END\n"); 508 PRINTF("\nBEGIN LOAD_ENDED\n"); 509 for ( cc=0 ; cc<nclusters ; cc++ ) 510 { 511 for ( pp=0 ; pp<nprocs ; pp++ ) 512 { 513 PRINTF("cluster= %d proc= %d date= %d\n", cc, pp, LOAD_ENDED[cc][pp]); 514 } 515 } 516 PRINTF("END\n"); 517 PRINTF("\nBEGIN HORI_START\n"); 518 for ( cc=0 ; cc<nclusters ; cc++ ) 519 { 520 for ( pp=0 ; pp<nprocs ; pp++ ) 521 { 522 PRINTF("cluster= %d proc= %d date= %d\n", cc, pp, HORI_START[cc][pp]); 523 } 524 } 525 PRINTF("END\n"); 526 PRINTF("\nBEGIN HORI_ENDED\n"); 527 for ( cc=0 ; cc<nclusters ; cc++ ) 528 { 529 for ( pp=0 ; pp<nprocs ; pp++ ) 530 { 531 PRINTF("cluster= %d proc= %d date= %d\n", cc, pp, HORI_ENDED[cc][pp]); 532 } 533 } 534 PRINTF("END\n"); 535 PRINTF("\nBEGIN VERT_START\n"); 536 for ( cc=0 ; cc<nclusters ; cc++ ) 537 { 538 for ( pp=0 ; pp<nprocs ; pp++ ) 539 { 540 PRINTF("cluster= %d proc= %d date= %d\n", cc, pp, VERT_START[cc][pp]); 541 } 542 } 543 PRINTF("END\n"); 544 PRINTF("\nBEGIN VERT_ENDED\n"); 545 for ( cc=0 ; cc<nclusters ; cc++ ) 546 { 547 for ( pp=0 ; pp<nprocs ; pp++ ) 548 { 549 PRINTF("cluster= %d proc= %d date= %d\n", cc, pp, VERT_ENDED[cc][pp]); 550 } 551 } 552 PRINTF("END\n"); 553 PRINTF("\nBEGIN DISP_START\n"); 554 for ( cc=0 ; cc<nclusters ; cc++ ) 555 { 556 for ( pp=0 ; pp<nprocs ; pp++ ) 557 { 558 PRINTF("cluster= %d proc= %d date= %d\n", cc, pp, DISP_START[cc][pp]); 559 } 560 } 561 PRINTF("END\n"); 562 PRINTF("\nBEGIN DISP_ENDED\n"); 563 for ( cc=0 ; cc<nclusters ; cc++ ) 564 { 565 for ( pp=0 ; pp<nprocs ; pp++ ) 566 { 567 PRINTF("cluster= %d proc= %d date= %d\n", cc, pp, DISP_ENDED[cc][pp]); 568 } 569 } 570 PRINTF("END\n"); 571 } 501 572 502 573 while(1);
Note: See TracChangeset
for help on using the changeset viewer.