Changeset 584 for trunk/platforms
- Timestamp:
- Dec 4, 2013, 7:49:03 PM (11 years ago)
- Location:
- trunk/platforms/tsar_generic_iob
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_iob/top.cpp
r569 r584 36 36 // peripherals (MTTY, MNIC, CDMA) is limited by the number of IRQ ports... 37 37 // 38 // In all clusters, the IRQs are connected to XICU as follow: 39 // - IRQ_IN[0] to IRQ_IN[3] not connected (reserved for context switch) 40 // - IRQ_IN[4] to IRQ_IN[7] are connected to 4 MDMA channels 41 // 42 // In external peripheral IRQs are connected in cluster(0,0) only: 38 // In cluster(0,0), the XICU HWI input ports are connected as follow: 39 // - IRQ_IN[0] to IRQ_IN[7] grounded (reserved for PTI or SWI) 43 40 // - IRQ_IN[8] to IRQ_IN[9] are connected to 2 NIC_RX channels. 44 41 // - IRQ_IN[10] to IRQ_IN[11] are connected to 2 NIC_TX channels. … … 46 43 // - IRQ_IN[16] to IRQ_IN[30] are connected to 15 TTY channels 47 44 // - IRQ_IN[31] is connected to BDEV 45 // In other clusters, the XICU HWI input ports are grounded. 48 46 // 49 47 // All clusters are identical, but cluster(0,0) and cluster(XMAX-1,YMAX-1) … … 178 176 //////////////////////i///////////////////////////////////// 179 177 180 #include " giet_vm/hard_config.h"178 #include "/Users/alain/soc/giet_vm/hard_config.h" 181 179 182 180 //////////////////////////////////////////////////////////// … … 231 229 ///////////////////////////////////////////////////////// 232 230 233 // Non replicated peripherals 231 // Non replicated peripherals (must be in cluster 0) 234 232 235 233 #define BROM_BASE 0x00BFC00000 … … 254 252 #define FBUF_SIZE FBUF_X_SIZE * FBUF_Y_SIZE 255 253 256 // replicated segments : address is incremented by a cluster offset254 // Replicated peripherals : address is incremented by a cluster offset 257 255 // offset = cluster(x,y) << (address_width-x_width-y_width); 258 256 … … 266 264 #define MDMA_SIZE 0x0000001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 267 265 266 // Replicated memory segments (XRAM) : address is incremented by a cluster offset 267 // offset = cluster(x,y) << (address_width-x_width-y_width); 268 268 269 #define MEMC_BASE 0x00B2000000 269 270 #define MEMC_SIZE 0x0000001000 // 4 Kbytes 270 271 271 272 272 //////////////////////////////////////////////////////////////////////// … … 429 429 std::cout << " -MEMCID index_memc_to_be_traced" << std::endl; 430 430 std::cout << " -PROCID index_proc_to_be_traced" << std::endl; 431 std::cout << " -IOB ID index_iob_to_be_traced" << std::endl;431 std::cout << " -IOB non_zero_value" << std::endl; 432 432 exit(0); 433 433 } … … 782 782 sc_signal<bool> signal_resetn("resetn"); 783 783 784 sc_signal<bool> signal_ unused_irq[32];784 sc_signal<bool> signal_irq_false; 785 785 sc_signal<bool> signal_irq_bdev; 786 786 sc_signal<bool> signal_irq_mnic_rx[NB_NIC_CHANNELS]; … … 1054 1054 1055 1055 // IOX network connexion 1056 iox_network->p_clk 1057 iox_network->p_resetn 1058 iox_network->p_to_ini[IOX_IOB0_INI_ID] 1059 iox_network->p_to_ini[IOX_IOB1_INI_ID] 1060 iox_network->p_to_ini[IOX_BDEV_INI_ID] 1061 iox_network->p_to_ini[IOX_CDMA_INI_ID] 1062 iox_network->p_to_tgt[IOX_IOB0_TGT_ID] 1063 iox_network->p_to_tgt[IOX_IOB1_TGT_ID] 1064 iox_network->p_to_tgt[IOX_MTTY_TGT_ID] 1065 iox_network->p_to_tgt[IOX_FBUF_TGT_ID] 1066 iox_network->p_to_tgt[IOX_MNIC_TGT_ID] 1067 iox_network->p_to_tgt[IOX_BROM_TGT_ID] 1068 iox_network->p_to_tgt[IOX_BDEV_TGT_ID] 1069 iox_network->p_to_tgt[IOX_CDMA_TGT_ID] 1056 iox_network->p_clk (signal_clk); 1057 iox_network->p_resetn (signal_resetn); 1058 iox_network->p_to_ini[IOX_IOB0_INI_ID] (signal_vci_ini_iob0); 1059 iox_network->p_to_ini[IOX_IOB1_INI_ID] (signal_vci_ini_iob1); 1060 iox_network->p_to_ini[IOX_BDEV_INI_ID] (signal_vci_ini_bdev); 1061 iox_network->p_to_ini[IOX_CDMA_INI_ID] (signal_vci_ini_cdma); 1062 iox_network->p_to_tgt[IOX_IOB0_TGT_ID] (signal_vci_tgt_iob0); 1063 iox_network->p_to_tgt[IOX_IOB1_TGT_ID] (signal_vci_tgt_iob1); 1064 iox_network->p_to_tgt[IOX_MTTY_TGT_ID] (signal_vci_tgt_mtty); 1065 iox_network->p_to_tgt[IOX_FBUF_TGT_ID] (signal_vci_tgt_fbuf); 1066 iox_network->p_to_tgt[IOX_MNIC_TGT_ID] (signal_vci_tgt_mnic); 1067 iox_network->p_to_tgt[IOX_BROM_TGT_ID] (signal_vci_tgt_brom); 1068 iox_network->p_to_tgt[IOX_BDEV_TGT_ID] (signal_vci_tgt_bdev); 1069 iox_network->p_to_tgt[IOX_CDMA_TGT_ID] (signal_vci_tgt_cdma); 1070 1070 1071 1071 // BDEV connexion … … 1073 1073 bdev->p_resetn (signal_resetn); 1074 1074 bdev->p_irq (signal_irq_bdev); 1075 1075 1076 // For AHCI 1076 1077 // bdev->p_channel_irq[0] (signal_irq_bdev); 1078 1077 1079 bdev->p_vci_target (signal_vci_tgt_bdev); 1078 1080 bdev->p_vci_initiator (signal_vci_ini_bdev); … … 1129 1131 std::cout << " - CDMA connected" << std::endl; 1130 1132 1131 // IRQ connexions (forcluster_iob0 only)1133 // IRQ connexions from external peripherals (cluster_iob0 only) 1132 1134 // IRQ_MNIC_RX -> IRQ[08] to IRQ[09] 1133 1135 // IRQ_MNIC_TX -> IRQ[10] to IRQ[11] … … 1139 1141 for ( size_t n=0 ; n<32 ; n++ ) 1140 1142 { 1141 if ( n < 8 ) (*clusters[0][0]->p_irq[n]) (signal_unused_irq[n]); 1142 else if ( n < 10 ) (*clusters[0][0]->p_irq[n]) (signal_irq_mnic_rx[n-8]); 1143 else if ( n < 12 ) (*clusters[0][0]->p_irq[n]) (signal_irq_mnic_tx[n-10]); 1144 else if ( n < 16 ) (*clusters[0][0]->p_irq[n]) (signal_irq_cdma[n-12]); 1143 if ( n < 8 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1144 1145 else if ( n < 10 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1146 // else if ( n < 10 ) (*clusters[0][0]->p_irq[n]) (signal_irq_mnic_rx[n-8]); 1147 1148 else if ( n < 12 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1149 // else if ( n < 12 ) (*clusters[0][0]->p_irq[n]) (signal_irq_mnic_tx[n-10]); 1150 1151 else if ( n < 16 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1152 // else if ( n < 16 ) (*clusters[0][0]->p_irq[n]) (signal_irq_cdma[n-12]); 1153 1145 1154 else if ( n < mx ) (*clusters[0][0]->p_irq[n]) (signal_irq_mtty[n-16]); 1146 else if ( n < 31 ) (*clusters[0][0]->p_irq[n]) (signal_unused_irq[n]); 1155 else if ( n < 31 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1156 1147 1157 else (*clusters[0][0]->p_irq[n]) (signal_irq_bdev); 1148 1158 } … … 1338 1348 1339 1349 sc_start(sc_core::sc_time(0, SC_NS)); 1350 1340 1351 signal_resetn = false; 1352 1353 signal_irq_false = false; 1341 1354 1342 1355 // network boundaries signals … … 1381 1394 for (size_t n = 1; n < ncycles; n++) 1382 1395 { 1383 // Monitor a specific address for L1 &L2 caches1384 // clusters[1][1]->proc[0]->cache_monitor(0x 8ba4ULL);1385 // clusters[0][0]->memc->cache_monitor( 0x 12180ULL);1396 // Monitor a specific address for L1 and/or L2 caches 1397 // clusters[1][1]->proc[0]->cache_monitor(0x50090ULL); 1398 // clusters[0][0]->memc->cache_monitor( 0x50090ULL); 1386 1399 1387 1400 if (debug_ok and (n > debug_from) and (n % debug_period == 0)) … … 1390 1403 std::cout << " ************************************************" << std::endl; 1391 1404 1392 // trace proc[debug_proc_id] 1405 1406 // trace proc[debug_proc_id] ... or several procs 1407 // for( debug_proc_id = 0 ; debug_proc_id < 2 ; debug_proc_id++ ) 1408 1393 1409 if ( debug_proc_id < XMAX*YMAX*NB_PROCS_MAX ) 1394 1410 { 1395 1396 1411 size_t l = debug_proc_id % NB_PROCS_MAX ; 1397 1412 size_t y = (debug_proc_id / NB_PROCS_MAX) % YMAX ; 1398 1413 size_t x = debug_proc_id / (YMAX * NB_PROCS_MAX) ; 1399 1414 1400 clusters[x][y]->proc[l]->print_trace( 0);1415 clusters[x][y]->proc[l]->print_trace(1); 1401 1416 1402 1417 std::ostringstream proc_signame; … … 1404 1419 clusters[x][y]->signal_int_vci_ini_proc[l].print_trace(proc_signame.str()); 1405 1420 1421 clusters[x][y]->xicu->print_trace(l); 1422 1423 std::ostringstream xicu_signame; 1424 xicu_signame << "[SIG]XICU_" << x << "_" << y; 1425 clusters[x][y]->signal_int_vci_tgt_xicu.print_trace(xicu_signame.str()); 1426 1427 if( clusters[x][y]->signal_proc_it[0].read() ) 1428 std::cout << "### IRQ_PROC_" << std::dec 1429 << x << "_" << y << " ACTIVE" << std::endl; 1430 1406 1431 // std::ostringstream p2m_signame; 1407 1432 // p2m_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " P2M" ; … … 1419 1444 // p_rsp_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " RSP" ; 1420 1445 // clusters[x][y]->signal_int_dspin_rsp_proc_i[l].print_trace(p_rsp_signame.str()); 1446 1421 1447 } 1422 1448 … … 1459 1485 } 1460 1486 1461 // trace RAM network 1462 1463 1464 1465 1466 1467 1468 1487 // trace RAM network routers 1488 // for( size_t cluster = 0 ; cluster < XMAX*YMAX ; cluster++ ) 1489 // { 1490 // size_t x = cluster / YMAX; 1491 // size_t y = cluster % YMAX; 1492 // clusters[x][y]->ram_router_cmd->print_trace(); 1493 // clusters[x][y]->ram_router_rsp->print_trace(); 1494 // } 1469 1495 1470 1496 // trace iob, iox and external peripherals … … 1479 1505 signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT"); 1480 1506 1481 1482 1507 // signal_dspin_cmd_iob0_loopback.print_trace("[SIG]IOB0_CMD_LOOPBACK"); 1508 // signal_dspin_rsp_iob0_loopback.print_trace("[SIG]IOB0_RSP_LOOPBACK"); 1483 1509 1484 1510 // cdma->print_trace(); … … 1486 1512 // signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI"); 1487 1513 1488 //brom->print_trace();1489 //signal_vci_tgt_brom.print_trace("[SIG]IOX_BROM_TGT");1514 brom->print_trace(); 1515 signal_vci_tgt_brom.print_trace("[SIG]IOX_BROM_TGT"); 1490 1516 1491 1517 // mtty->print_trace(); -
trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
r550 r584 206 206 mt_int, // mapping table INT network 207 207 IntTab(cluster_id,xicu_int_tgtid), // TGTID direct space 208 nb_procs,// number of timer IRQs208 32, // number of timer IRQs 209 209 32, // number of hard IRQs 210 210 32, // number of soft IRQs … … 366 366 std::ostringstream s_ram_router_cmd; 367 367 s_ram_router_cmd << "ram_router_cmd_" << x_id << "_" << y_id; 368 size_t is_iob0 = (x_id == 0) and (y_id == 0); 369 size_t is_iob1 = (x_id == (xmax-1)) and (y_id == (ymax-1)); 368 370 ram_router_cmd = new DspinRouterTsar<dspin_ram_cmd_width>( 369 371 s_ram_router_cmd.str().c_str(), 370 x_id, y_id, // router coordinates in mesh371 x_width, // x field width in first flit372 x_width,// y field width in first flit373 4, 4, // input & output fifo depths374 cluster_iob0, // cluster containingIOB0375 cluster_iob1, // cluster containingIOB1376 l_width, // local field width in first flit377 iobx_ram_srcid ); // IOB local index372 x_id, y_id, // router coordinates in mesh 373 x_width, // x field width in first flit 374 y_width, // y field width in first flit 375 4, 4, // input & output fifo depths 376 is_iob0, // cluster contains IOB0 377 is_iob1, // cluster contains IOB1 378 false, // not a response router 379 l_width); // local field width in first flit 378 380 379 381 std::ostringstream s_ram_router_rsp; … … 381 383 ram_router_rsp = new DspinRouterTsar<dspin_ram_rsp_width>( 382 384 s_ram_router_rsp.str().c_str(), 383 x_id, y_id, // coordinates in mesh384 x_width, // x field width in first flit385 y_width, // y field width in first flit386 4, 4, // input & output fifo depths387 cluster_iob0, // cluster containingIOB0388 cluster_iob1, // cluster containingIOB1389 l_width, // local field width in first flit390 iobx_ram_srcid ); // IOB local index385 x_id, y_id, // coordinates in mesh 386 x_width, // x field width in first flit 387 y_width, // y field width in first flit 388 4, 4, // input & output fifo depths 389 is_iob0, // cluster contains IOB0 390 is_iob1, // cluster contains IOB1 391 true, // response router 392 l_width); // local field width in first flit 391 393 392 394 … … 460 462 // on coherence network : local srcid[proc] in [0...nb_procs-1] 461 463 // : local srcid[memc] = nb_procs 462 464 // In cluster_iob0, 32 HWI interrupts from external peripherals 465 // are connected to the XICU ports p_hwi[0:31] 466 // In other clusters, no HWI interrupts are connected to XICU 467 463 468 //////////////////////// internal CMD & RSP routers 464 469 int_router_cmd->p_clk (this->p_clk); … … 594 599 xicu->p_irq[p] (signal_proc_it[p]); 595 600 } 596 for ( size_t i=0 ; i<4 ; i++) 597 { 598 xicu->p_hwi[i] (signal_irq_mdma[i]); 599 } 600 for ( size_t i=4 ; i<32 ; i++) 601 for ( size_t i=0 ; i<32 ; i++) 601 602 { 602 603 if (cluster_id == cluster_iob0) 603 xicu->p_hwi[i](*(this->p_irq[i]));604 xicu->p_hwi[i] (*(this->p_irq[i])); 604 605 else 605 xicu->p_hwi[i](signal_false);606 xicu->p_hwi[i] (signal_false); 606 607 } 607 608
Note: See TracChangeset
for help on using the changeset viewer.