Changeset 1023 for trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster
- Timestamp:
- Oct 21, 2015, 11:48:40 AM (9 years ago)
- Location:
- trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/include/tsar_xbar_cluster.h
r885 r1023 190 190 size_t y_width, // y field bits 191 191 size_t l_width, // l field bits 192 size_t p_width, 192 193 size_t tgtid_memc, 193 194 size_t tgtid_xicu, -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
r885 r1023 50 50 size_t y_width, 51 51 size_t l_width, 52 size_t p_width, 52 53 size_t tgtid_memc, 53 54 size_t tgtid_xicu, … … 85 86 : soclib::caba::BaseModule(insname), 86 87 p_clk("clk"), 87 p_resetn("resetn") 88 89 { 88 p_resetn("resetn") { 90 89 91 90 n_procs = nb_procs; … … 114 113 ///////////////////////////////////////////////////////////////////////////// 115 114 116 for (size_t p = 0; p < nb_procs; p++) 117 { 115 for (size_t p = 0; p < nb_procs; p++) { 118 116 std::ostringstream sproc; 119 117 sproc << "proc_" << x_id << "_" << y_id << "_" << p; … … 123 121 GdbServer<Mips32ElIss> >( 124 122 sproc.str().c_str(), 125 cluster_id * nb_procs + p,// GLOBAL PROC_ID123 (cluster_id << p_width) + p, // GLOBAL PROC_ID 126 124 mtd, // Mapping Table 127 IntTab(cluster_id, p),// SRCID125 IntTab(cluster_id, p), // SRCID 128 126 (cluster_id << l_width) + p, // CC_GLOBAL_ID 129 127 8, // ITLB ways … … 205 203 size_t nb_direct_initiators = nb_procs + 1; 206 204 size_t nb_direct_targets = 3; 207 if (io) 208 { 205 if (io) { 209 206 nb_direct_initiators = nb_procs + 3; 210 207 nb_direct_targets = 10; … … 321 318 322 319 // IO cluster components 323 if (io) 324 { 320 if (io) { 325 321 ///////////////////////////////////////////// 326 322 brom = new VciSimpleRom<vci_param_int>( … … 371 367 ///////////////////////////////////////////// 372 368 std::vector<std::string> vect_names; 373 for (size_t tid = 0; tid < nb_ttys; tid++) 374 { 369 for (size_t tid = 0; tid < nb_ttys; tid++) { 375 370 std::ostringstream term_name; 376 371 term_name << "term" << tid; … … 406 401 407 402 // loop on N/S/E/W ports 408 for (size_t i = 0; i < 4; i++) 409 { 403 for (size_t i = 0; i < 4; i++) { 410 404 router_cmd->p_out[i] (this->p_cmd_out[i]); 411 405 router_cmd->p_in[i] (this->p_cmd_in[i]); … … 469 463 xbar_d->p_to_initiator[nb_procs] (signal_vci_ini_mdma); 470 464 471 for (size_t p = 0; p < nb_procs; p++) 465 for (size_t p = 0; p < nb_procs; p++) { 472 466 xbar_d->p_to_initiator[p] (signal_vci_ini_proc[p]); 473 474 if (io) 475 {467 } 468 469 if (io) { 476 470 xbar_d->p_to_target[tgtid_mtty] (signal_vci_tgt_mtty); 477 471 xbar_d->p_to_target[tgtid_brom] (signal_vci_tgt_brom); … … 494 488 xbar_m2p_c->p_global_in (signal_dspin_m2p_g2l_c); 495 489 xbar_m2p_c->p_local_in[0] (signal_dspin_m2p_memc); 496 for (size_t p = 0; p < nb_procs; p++) 490 for (size_t p = 0; p < nb_procs; p++) { 497 491 xbar_m2p_c->p_local_out[p] (signal_dspin_m2p_proc[p]); 492 } 498 493 499 494 std::cout << " - M2P Coherence crossbar connected" << std::endl; … … 505 500 xbar_clack_c->p_global_in (signal_dspin_clack_g2l_c); 506 501 xbar_clack_c->p_local_in[0] (signal_dspin_clack_memc); 507 for (size_t p = 0; p < nb_procs; p++) 502 for (size_t p = 0; p < nb_procs; p++) { 508 503 xbar_clack_c->p_local_out[p] (signal_dspin_clack_proc[p]); 504 } 509 505 510 506 std::cout << " - Clack Coherence crossbar connected" << std::endl; … … 516 512 xbar_p2m_c->p_global_in (signal_dspin_p2m_g2l_c); 517 513 xbar_p2m_c->p_local_out[0] (signal_dspin_p2m_memc); 518 for (size_t p = 0; p < nb_procs; p++) 514 for (size_t p = 0; p < nb_procs; p++) { 519 515 xbar_p2m_c->p_local_in[p] (signal_dspin_p2m_proc[p]); 516 } 520 517 521 518 std::cout << " - P2M Coherence crossbar connected" << std::endl; … … 523 520 524 521 //////////////////////////////////// Processors 525 for (size_t p = 0; p < nb_procs; p++) 526 { 522 for (size_t p = 0; p < nb_procs; p++) { 527 523 proc[p]->p_clk (this->p_clk); 528 524 proc[p]->p_resetn (this->p_resetn); … … 532 528 proc[p]->p_dspin_clack (signal_dspin_clack_proc[p]); 533 529 534 for ( size_t i = 0; i < irq_per_processor; i++) 535 { 530 for ( size_t i = 0; i < irq_per_processor; i++) { 536 531 proc[p]->p_irq[i] (signal_proc_it[p*irq_per_processor + i]); 537 532 } 538 for ( size_t j = irq_per_processor; j < 6; j++) // 6 = number of irqs in the MIPS539 {533 for ( size_t j = irq_per_processor; j < 6; j++) { 534 // 6 = number of irqs in the MIPS 540 535 proc[p]->p_irq[j] (signal_false); 541 536 } … … 549 544 xicu->p_resetn (this->p_resetn); 550 545 xicu->p_vci (signal_vci_tgt_xicu); 551 for (size_t p = 0; p < nb_procs * irq_per_processor; p++) 552 { 546 for (size_t p = 0; p < nb_procs * irq_per_processor; p++) { 553 547 xicu->p_irq[p] (signal_proc_it[p]); 554 548 } 555 for (size_t i = 0; i < 32; i++) 556 { 557 if (io) // I/O cluster 558 { 549 for (size_t i = 0; i < 32; i++) { 550 if (io) { 551 // I/O cluster 559 552 if (i < 8) xicu->p_hwi[i] (signal_false); 560 553 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] (signal_irq_mdma[i - 8]); … … 565 558 else xicu->p_hwi[i] (signal_irq_bdev); 566 559 } 567 else // other clusters568 {560 else { 561 // other clusters 569 562 if (i < 8) xicu->p_hwi[i] (signal_false); 570 563 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] (signal_irq_mdma[i - 8]); … … 601 594 mdma->p_vci_target (signal_vci_tgt_mdma); 602 595 mdma->p_vci_initiator (signal_vci_ini_mdma); 603 for (size_t i = 0; i < nb_dmas; i++) 596 for (size_t i = 0; i < nb_dmas; i++) { 604 597 mdma->p_irq[i] (signal_irq_mdma[i]); 598 } 605 599 606 600 std::cout << " - MDMA connected" << std::endl; … … 608 602 /////////////////////////////// Components in I/O cluster 609 603 610 if (io) 611 { 604 if (io) { 612 605 // BDEV 613 606 bdev->p_clk (this->p_clk); … … 630 623 mnic->p_resetn (this->p_resetn); 631 624 mnic->p_vci (signal_vci_tgt_mnic); 632 for (size_t i = 0; i < nic_channels; i++) 633 { 625 for (size_t i = 0; i < nic_channels; i++) { 634 626 mnic->p_rx_irq[i] (signal_irq_mnic_rx[i]); 635 627 mnic->p_tx_irq[i] (signal_irq_mnic_tx[i]); … … 643 635 chbuf->p_vci_target (signal_vci_tgt_chbuf); 644 636 chbuf->p_vci_initiator (signal_vci_ini_chbuf); 645 for (size_t i = 0; i < chbufdma_channels; i++) 646 { 637 for (size_t i = 0; i < chbufdma_channels; i++) { 647 638 chbuf->p_irq[i] (signal_irq_chbuf[i]); 648 639 } … … 661 652 mtty->p_resetn (this->p_resetn); 662 653 mtty->p_vci (signal_vci_tgt_mtty); 663 for (size_t i = 0; i < nb_ttys; i++) 664 { 654 for (size_t i = 0; i < nb_ttys; i++) { 665 655 mtty->p_irq[i] (signal_irq_mtty[i]); 666 656 } … … 703 693 dealloc_elems<DspinOutput<dspin_cmd_width> >(p_cla_out, 4); 704 694 705 for (size_t p = 0; p < n_procs; p++) 706 { 695 for (size_t p = 0; p < n_procs; p++) { 707 696 delete proc[p]; 708 697 } … … 720 709 delete router_cmd; 721 710 delete router_rsp; 722 if (brom != NULL) 723 { 711 if (brom != NULL) { 724 712 delete brom; 725 713 delete fbuf;
Note: See TracChangeset
for help on using the changeset viewer.