Changeset 607
- Timestamp:
- Dec 19, 2013, 9:39:53 AM (11 years ago)
- Location:
- trunk/platforms/tsar_generic_iob
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_iob/Makefile
r450 r607 4 4 clean: 5 5 soclib-cc -x -p top.desc -I. 6 rm -rf *.o *.x tty* 6 rm -rf *.o *.x tty* term* 7 -
trunk/platforms/tsar_generic_iob/top.cpp
r584 r607 18 18 // The internal physical address space is 40 bits. 19 19 // 20 // It contains a 2D mesh of XMAX*YMAX clusters, and 3 networks: 20 // It contains a 2D mesh of XMAX*YMAX clusters, and the cluster index 21 // is encoded on 8 bits (X_WIDTH = 4 / Y_WIDTH = 4) whatever the mesh size. 22 // 23 // It contains 3 networks: 21 24 // 22 25 // 1) the INT network supports Read/Write transactions … … 182 185 //////////////////////i///////////////////////////////////// 183 186 184 #define XMAX CLUSTER_X185 #define YMAX CLUSTER_Y187 #define XMAX X_SIZE 188 #define YMAX Y_SIZE 186 189 187 190 #define XRAM_LATENCY 0 … … 200 203 201 204 #define BDEV_SECTOR_SIZE 512 202 #define BDEV_IMAGE_NAME " giet_vm/display/images.raw"205 #define BDEV_IMAGE_NAME "../../../giet_vm/hdd/virt_hdd.dmg" 203 206 204 207 #define NIC_RX_NAME "giet_vm/nic/rx_packets.txt" … … 211 214 #define WEST 3 212 215 213 #define cluster(x,y) ((y) + YMAX*(x))216 #define cluster(x,y) ((y) + (x<<4)) 214 217 215 218 //////////////////////////////////////////////////////////// … … 217 220 //////////////////////i///////////////////////////////////// 218 221 219 #define BOOT_SOFT_NAME " giet_vm/soft.elf"222 #define BOOT_SOFT_NAME "../../softs/tsar_boot/preloader.elf" 220 223 221 224 //////////////////////////////////////////////////////////// … … 363 366 size_t cluster_iob1 = cluster(XMAX-1,YMAX-1); // cluster containing IOB1 364 367 size_t block_size = BDEV_SECTOR_SIZE; // disk block size 365 368 size_t x_width = 4; // at most 256 clusters 369 size_t y_width = 4; // at most 256 clusters 370 371 assert( (X_WIDTH == 4) and (Y_WIDTH == 4) and 372 "ERROR: we must have X_WIDTH == Y_WIDTH == 4"); 373 366 374 ////////////// command line arguments ////////////////////// 367 375 if (argc > 1) … … 389 397 { 390 398 debug_memc_id = atoi(argv[n+1]); 391 assert( (debug_memc_id < (XMAX*YMAX) ) && 392 "debug_memc_id larger than XMAX * YMAX" ); 399 size_t x = debug_memc_id >> 4; 400 size_t y = debug_memc_id & 0xF; 401 if( (x>=XMAX) || (y>=YMAX) ) 402 { 403 std::cout << "PROCID parameter does'nt fit XMAX/YMAX" << std::endl; 404 exit(0); 405 } 393 406 } 394 407 else if ((strcmp(argv[n],"-IOB") == 0) && (n+1<argc) ) … … 398 411 else if ((strcmp(argv[n],"-PROCID") == 0) && (n+1<argc) ) 399 412 { 400 debug_proc_id = atoi(argv[n+1]); 401 assert( (debug_proc_id < (XMAX * YMAX * NB_PROCS_MAX) ) && 402 "debug_proc_id larger than XMAX * YMAX * NB_PROCS" ); 413 debug_proc_id = atoi(argv[n+1]); 414 size_t cluster_xy = debug_proc_id / NB_PROCS_MAX ; 415 size_t x = cluster_xy >> 4; 416 size_t y = cluster_xy & 0xF; 417 if( (x>=XMAX) || (y>=YMAX) ) 418 { 419 std::cout << "PROCID parameter does'nt fit XMAX/YMAX" << std::endl; 420 exit(0); 421 } 403 422 } 404 423 else if ((strcmp(argv[n], "-THREADS") == 0) && ((n+1) < argc)) … … 436 455 437 456 // checking hardware parameters 438 assert( ( (XMAX == 1) or (XMAX == 2) or (XMAX == 4) or 439 (XMAX == 8) or (XMAX == 16) ) and 440 "The XMAX parameter must be 1, 2, 4, 8 or 16" ); 441 442 assert( ( (YMAX == 1) or (YMAX == 2) or (YMAX == 4) or 443 (YMAX == 8) or (YMAX == 16) ) and 444 "The YMAX parameter must be 1, 2, 4, 8 or 16" ); 445 446 assert( ( (NB_PROCS_MAX == 1) or (NB_PROCS_MAX == 2) or (NB_PROCS_MAX == 4) ) and 447 "The NB_PROCS_MAX parameter must be 1, 2, 4" ); 448 449 assert( (NB_DMA_CHANNELS == 4) and 450 "The NB_DMA_CHANNELS parameter must be 4" ); 457 assert( (XMAX <= 16) and 458 "The XMAX parameter cannot be larger than 16" ); 459 460 assert( (YMAX <= 16) and 461 "The YMAX parameter cannot be larger than 16" ); 462 463 assert( (NB_PROCS_MAX <= 8) and 464 "The NB_PROCS_MAX parameter cannot be larger than 8" ); 465 466 assert( (NB_DMA_CHANNELS <= 4) and 467 "The NB_DMA_CHANNELS parameter cannot be larger than 4" ); 451 468 452 469 assert( (NB_TTY_CHANNELS < 16) and … … 498 515 vci_trdid_width, 499 516 vci_wrplen_width> vci_param_ext; 500 501 // Define parameters depending on mesh size502 size_t x_width;503 size_t y_width;504 505 if (XMAX == 1) x_width = 0;506 else if (XMAX == 2) x_width = 1;507 else if (XMAX <= 4) x_width = 2;508 else if (XMAX <= 8) x_width = 3;509 else x_width = 4;510 511 if (YMAX == 1) y_width = 0;512 else if (YMAX == 2) y_width = 1;513 else if (YMAX <= 4) y_width = 2;514 else if (YMAX <= 8) y_width = 3;515 else y_width = 4;516 517 517 518 ///////////////////////////////////////////////////////////////////// … … 1394 1395 for (size_t n = 1; n < ncycles; n++) 1395 1396 { 1396 // Monitor a specific address for L1 and/or L2 caches1397 // Monitor a specific address for one L1 cache 1397 1398 // clusters[1][1]->proc[0]->cache_monitor(0x50090ULL); 1398 // clusters[0][0]->memc->cache_monitor( 0x50090ULL); 1399 1400 // Monitor a specific address for one L2 cache 1401 // clusters[0][0]->memc->cache_monitor( 0x170000ULL); 1402 1403 // Monitor a specific address for one XRAM 1404 // if (n == 3000000) clusters[0][0]->xram->start_monitor( 0x170000ULL , 64); 1399 1405 1400 1406 if (debug_ok and (n > debug_from) and (n % debug_period == 0)) … … 1403 1409 std::cout << " ************************************************" << std::endl; 1404 1410 1405 1406 // trace proc[debug_proc_id] ... or several procs 1407 // for( debug_proc_id = 0 ; debug_proc_id < 2 ; debug_proc_id++ ) 1408 1409 if ( debug_proc_id < XMAX*YMAX*NB_PROCS_MAX ) 1411 // trace proc[debug_proc_id] 1412 if ( debug_proc_id != 0xFFFFFFFF ) 1410 1413 { 1411 size_t l = debug_proc_id % NB_PROCS_MAX ; 1412 size_t y = (debug_proc_id / NB_PROCS_MAX) % YMAX ; 1413 size_t x = debug_proc_id / (YMAX * NB_PROCS_MAX) ; 1414 size_t l = debug_proc_id % NB_PROCS_MAX ; 1415 size_t cluster_xy = debug_proc_id / NB_PROCS_MAX ; 1416 size_t x = cluster_xy >> 4; 1417 size_t y = cluster_xy & 0xF; 1414 1418 1415 1419 clusters[x][y]->proc[l]->print_trace(1); … … 1425 1429 clusters[x][y]->signal_int_vci_tgt_xicu.print_trace(xicu_signame.str()); 1426 1430 1427 if( clusters[x][y]->signal_proc_it[ 0].read() )1431 if( clusters[x][y]->signal_proc_it[l].read() ) 1428 1432 std::cout << "### IRQ_PROC_" << std::dec 1429 << x << "_" << y << " ACTIVE" << std::endl; 1430 1431 // std::ostringstream p2m_signame; 1432 // p2m_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " P2M" ; 1433 // clusters[x][y]->signal_int_dspin_p2m_proc[l].print_trace(p2m_signame.str()); 1434 1435 // std::ostringstream m2p_signame; 1436 // m2p_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " M2P" ; 1437 // clusters[x][y]->signal_int_dspin_m2p_proc[l].print_trace(m2p_signame.str()); 1438 1439 // std::ostringstream p_cmd_signame; 1440 // p_cmd_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " CMD" ; 1441 // clusters[x][y]->signal_int_dspin_cmd_proc_i[l].print_trace(p_cmd_signame.str()); 1442 1443 // std::ostringstream p_rsp_signame; 1444 // p_rsp_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " RSP" ; 1445 // clusters[x][y]->signal_int_dspin_rsp_proc_i[l].print_trace(p_rsp_signame.str()); 1446 1433 << x << "_" << y << "_" << l << " ACTIVE" << std::endl; 1447 1434 } 1448 1435 1449 // trace INT_CMD_D xbar and router in 1_0 1450 // clusters[1][0]->int_xbar_cmd_d->print_trace(); 1451 // clusters[1][0]->int_xbar_rsp_d->print_trace(); 1452 1453 // clusters[1][0]->signal_int_dspin_cmd_l2g_d.print_trace("[SIG] INT_CMD_L2G_D_1_0"); 1454 // clusters[1][0]->signal_int_dspin_rsp_g2l_d.print_trace("[SIG] INT_RSP_G2L_D_1_0"); 1455 1456 // clusters[1][0]->int_router_cmd->print_trace(0); 1457 // clusters[1][0]->int_router_rsp->print_trace(0); 1458 1459 // trace INT_CMD_D xbar and router in 0_0 1436 // trace INT network 1460 1437 // clusters[0][0]->int_xbar_cmd_d->print_trace(); 1461 1438 // clusters[0][0]->int_xbar_rsp_d->print_trace(); 1462 1439 1463 // clusters[0][0]->signal_int_dspin_cmd_ g2l_d.print_trace("[SIG] INT_CMD_G2L_D_0_0");1464 // clusters[0][0]->signal_int_dspin_rsp_ l2g_d.print_trace("[SIG] INT_RSP_L2G_D_0_0");1465 1440 // clusters[0][0]->signal_int_dspin_cmd_l2g_d.print_trace("[SIG] INT_CMD_L2G_D_0_0"); 1441 // clusters[0][0]->signal_int_dspin_rsp_g2l_d.print_trace("[SIG] INT_RSP_G2L_D_0_0"); 1442 1466 1443 // clusters[0][0]->int_router_cmd->print_trace(0); 1467 1444 // clusters[0][0]->int_router_rsp->print_trace(0); 1468 1445 1469 // trace memc[debug_memc_id] and xram[debug_memc_id] 1470 if ( debug_memc_id < XMAX*YMAX ) 1446 // trace INT_CMD_D xbar and router in cluster 0_1 1447 // clusters[0][1]->int_router_cmd->print_trace(0); 1448 // clusters[0][1]->int_router_rsp->print_trace(0); 1449 1450 // clusters[0][1]->signal_int_dspin_cmd_g2l_d.print_trace("[SIG] INT_CMD_G2L_D_0_0"); 1451 // clusters[0][1]->signal_int_dspin_rsp_l2g_d.print_trace("[SIG] INT_RSP_L2G_D_0_0"); 1452 1453 // clusters[0][1]->int_xbar_cmd_d->print_trace(); 1454 // clusters[0][1]->int_xbar_rsp_d->print_trace(); 1455 1456 // trace memc[debug_memc_id] 1457 if ( debug_memc_id != 0xFFFFFFFF ) 1471 1458 { 1472 size_t x = debug_memc_id / YMAX; 1473 size_t y = debug_memc_id % YMAX; 1459 size_t x = debug_memc_id >> 4; 1460 size_t y = debug_memc_id & 0xF; 1461 1474 1462 clusters[x][y]->memc->print_trace(0); 1475 1463 std::ostringstream smemc_tgt; … … 1508 1496 // signal_dspin_rsp_iob0_loopback.print_trace("[SIG]IOB0_RSP_LOOPBACK"); 1509 1497 1510 //cdma->print_trace();1511 //signal_vci_tgt_cdma.print_trace("[SIG]IOX_CDMA_TGT");1512 //signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI");1513 1514 1515 1498 cdma->print_trace(); 1499 signal_vci_tgt_cdma.print_trace("[SIG]IOX_CDMA_TGT"); 1500 signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI"); 1501 1502 // brom->print_trace(); 1503 // signal_vci_tgt_brom.print_trace("[SIG]IOX_BROM_TGT"); 1516 1504 1517 1505 // mtty->print_trace(); 1518 1506 // signal_vci_tgt_mtty.print_trace("[SIG]IOX_MTTY_TGT"); 1519 1507 1520 1521 1522 1508 // bdev->print_trace(); 1509 // signal_vci_tgt_bdev.print_trace("[SIG]IOX_BDEV_TGT"); 1510 // signal_vci_ini_bdev.print_trace("[SIG]IOX_BDEV_INI"); 1523 1511 1524 1512 // fbuf->print_trace(); -
trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h
r550 r607 78 78 sc_signal<bool> signal_proc_it[8]; 79 79 sc_signal<bool> signal_irq_mdma[8]; 80 sc_signal<bool> signal_irq_memc; 80 81 81 82 // INT network DSPIN signals between DSPIN routers and DSPIN local_crossbars -
trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
r599 r607 84 84 assert( (x_id < xmax) and (y_id < ymax) and "Illegal cluster coordinates"); 85 85 86 size_t cluster_id = x_id * ymax+ y_id;87 88 size_t cluster_iob0 = 0; // South-West cluster89 size_t cluster_iob1 = xmax*ymax-1; // North-East cluster86 size_t cluster_id = (x_id<<4) + y_id; 87 88 size_t cluster_iob0 = 0; // South-West cluster 89 size_t cluster_iob1 = ((xmax-1)<<4) + ymax-1; // North-East cluster 90 90 91 91 // Vectors of DSPIN ports for inter-cluster communications … … 621 621 memc->p_dspin_m2p (signal_int_dspin_m2p_memc); 622 622 memc->p_dspin_clack (signal_int_dspin_clack_memc); 623 memc->p_irq (signal_irq_memc); 623 624 624 625 // wrapper to INT network
Note: See TracChangeset
for help on using the changeset viewer.