Changeset 802 for trunk/platforms/tsar_generic_iob/top.cpp
- Timestamp:
- Sep 12, 2014, 3:10:04 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_iob/top.cpp
r765 r802 186 186 //////////////////////i///////////////////////////////////// 187 187 188 #include " ../../../giet_vm/hard_config.h"188 #include "hard_config.h" 189 189 190 190 //////////////////////////////////////////////////////////// … … 336 336 size_t cluster_iob0 = cluster(0,0); // cluster containing IOB0 337 337 size_t cluster_iob1 = cluster(XMAX-1,YMAX-1); // cluster containing IOB1 338 size_t x_width = 4; // at most 256 clusters 339 size_t y_width = 4; // at most 256 clusters 338 size_t x_width = X_WIDTH; // # of bits for x 339 size_t y_width = Y_WIDTH; // # of bits for y 340 size_t p_width = P_WIDTH; // # of bits for lpid 340 341 341 342 #if USING_OPENMP … … 347 348 assert( (X_WIDTH == 4) and (Y_WIDTH == 4) and 348 349 "ERROR: we must have X_WIDTH == Y_WIDTH == 4"); 350 351 assert( P_WIDTH <= 3 and 352 "ERROR: we must have P_WIDTH <= 3"); 349 353 350 354 ////////////// command line arguments ////////////////////// … … 399 403 { 400 404 debug_proc_id = atoi(argv[n+1]); 401 size_t cluster_xy = debug_proc_id / NB_PROCS_MAX;405 size_t cluster_xy = debug_proc_id >> P_WIDTH ; 402 406 size_t x = cluster_xy >> 4; 403 407 size_t y = cluster_xy & 0xF; … … 444 448 "The YMAX parameter cannot be larger than 16" ); 445 449 446 assert( (NB_PROCS_MAX <= 8) and447 " The NB_PROCS_MAX parameter cannot be larger than 8" );450 assert( (NB_PROCS_MAX <= (1 << P_WIDTH)) and 451 "NB_PROCS_MAX parameter cannot be larger than 2^P_WIDTH" ); 448 452 449 453 assert( (NB_DMA_CHANNELS <= 4) and … … 459 463 << " - XMAX = " << XMAX << std::endl 460 464 << " - YMAX = " << YMAX << std::endl 461 << " - NB_PROCS_MAX = " << NB_PROCS_MAX << 465 << " - NB_PROCS_MAX = " << NB_PROCS_MAX << std::endl 462 466 << " - NB_TTY_CHANNELS = " << NB_TTY_CHANNELS << std::endl 463 467 << " - NB_DMA_CHANNELS = " << NB_DMA_CHANNELS << std::endl … … 602 606 IntTab( cluster(x,y), INT_IOBX_INI_ID ) ); 603 607 604 for ( size_t p = 0 ; p < NB_PROCS_MAX 608 for ( size_t p = 0 ; p < NB_PROCS_MAX; p++ ) 605 609 maptab_int.srcid_map( IntTab( cluster(x,y), PROC_LOCAL_SRCID+p ), 606 610 IntTab( cluster(x,y), INT_PROC_INI_ID+p ) ); … … 1038 1042 y_width, 1039 1043 vci_srcid_width - x_width - y_width, // l_id width, 1044 p_width, 1040 1045 1041 1046 INT_MEMC_TGT_ID, … … 1438 1443 if ( debug_proc_id != 0xFFFFFFFF ) 1439 1444 { 1440 size_t l = debug_proc_id % NB_PROCS_MAX;1441 size_t cluster_xy = debug_proc_id / NB_PROCS_MAX;1445 size_t l = debug_proc_id & ((1<<P_WIDTH)-1) ; 1446 size_t cluster_xy = debug_proc_id >> P_WIDTH ; 1442 1447 size_t x = cluster_xy >> 4; 1443 1448 size_t y = cluster_xy & 0xF; … … 1460 1465 // local interrupts in cluster(x,y) 1461 1466 if( clusters[x][y]->signal_irq_memc.read() ) 1462 std::cout << "### IRQ_MMC_" << std::dec << x << "_" << y 1467 std::cout << "### IRQ_MMC_" << std::dec << x << "_" << y 1463 1468 << " ACTIVE" << std::endl; 1464 1469 … … 1466 1471 { 1467 1472 if( clusters[x][y]->signal_irq_mdma[c].read() ) 1468 std::cout << "### IRQ_DMA_" << std::dec << x << "_" << y << "_" << c 1473 std::cout << "### IRQ_DMA_" << std::dec << x << "_" << y << "_" << c 1469 1474 << " ACTIVE" << std::endl; 1470 1475 } 1471 1476 1472 1477 for ( size_t c = 0 ; c < NB_PROCS_MAX ; c++ ) 1473 1478 { 1474 1479 if( clusters[x][y]->signal_proc_it[c].read() ) 1475 std::cout << "### IRQ_PROC_" << std::dec << x << "_" << y << "_" << c 1480 std::cout << "### IRQ_PROC_" << std::dec << x << "_" << y << "_" << c 1476 1481 << " ACTIVE" << std::endl; 1477 1482 }
Note: See TracChangeset
for help on using the changeset viewer.