Changeset 428 for trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
- Timestamp:
- Jul 1, 2013, 9:51:00 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
r396 r428 1 1 ////////////////////////////////////////////////////////////////////////////// 2 2 // File: tsar_xbar_cluster.cpp 3 // Author: Alain Greiner 3 // Author: Alain Greiner 4 4 // Copyright: UPMC/LIP6 5 5 // Date : march 2011 … … 7 7 ////////////////////////////////////////////////////////////////////////////// 8 8 // This file define a TSAR cluster architecture with virtual memory: 9 // - It uses two virtual_dspin_router as distributed global interconnect 10 // - It uses four dspin_local_crossbar as local interconnect 9 // - It uses two virtual_dspin_router as distributed global interconnect 10 // - It uses four dspin_local_crossbar as local interconnect 11 11 // - It uses the vci_cc_vcache_wrapper 12 12 // - It uses the vci_mem_cache … … 16 16 // - It uses the vci_xicu interrupt controller 17 17 // - The peripherals MTTY, BDEV, FBUF, MNIC and BROM are in cluster (0,0) 18 // - The Multi-TTY component controls up to 15 terminals. 18 // - The Multi-TTY component controls up to 15 terminals. 19 19 // - Each Multi-DMA component controls up to 8 DMA channels. 20 20 // - The DMA IRQs are connected to IRQ_IN[8]...IRQ_IN[15] 21 21 // - The TTY IRQs are connected to IRQ_IN[16]...IRQ_IN[30] 22 22 // - The BDEV IRQ is connected to IRQ_IN[31] 23 ////////////////////////////////////////////////////////////////////////////////// 23 ////////////////////////////////////////////////////////////////////////////////// 24 24 25 25 #include "../include/tsar_xbar_cluster.h" … … 30 30 31 31 //////////////////////////////////////////////////////////////////////////////////// 32 template<size_t dspin_cmd_width, 32 template<size_t dspin_cmd_width, 33 33 size_t dspin_rsp_width, 34 34 typename vci_param_int, … … 46 46 size_t cluster_id, 47 47 const soclib::common::MappingTable &mtd, 48 const soclib::common::MappingTable &mtx, 48 const soclib::common::MappingTable &mtx, 49 49 size_t x_width, 50 50 size_t y_width, … … 91 91 92 92 ///////////////////////////////////////////////////////////////////////////// 93 // Components definition 93 // Components definition 94 94 ///////////////////////////////////////////////////////////////////////////// 95 95 std::cout << " - building proc_" << x_id << "_" << y_id << "-*" << std::endl; 96 96 97 97 for (size_t p = 0; p < nb_procs; p++) 98 { 98 { 99 99 std::ostringstream sproc; 100 100 sproc << "proc_" << x_id << "_" << y_id << "_" << p; 101 101 proc[p] = new VciCcVCacheWrapper<vci_param_int, 102 102 dspin_cmd_width, 103 dspin_rsp_width, 103 dspin_rsp_width, 104 104 GdbServer<Mips32ElIss> >( 105 105 sproc.str().c_str(), 106 106 cluster_id*nb_procs + p, // GLOBAL PROC_ID 107 mtd, // Mapping Table 107 mtd, // Mapping Table 108 108 IntTab(cluster_id,p), // SRCID 109 109 (cluster_id << l_width) + p, // CC_GLOBAL_ID … … 234 234 x_width, y_width, l_width, 235 235 nb_direct_initiators, // number of local of sources 236 nb_direct_targets, // number of local dests 237 2, 2, // fifo depths 238 true, // use local routing table 236 nb_direct_targets, // number of local dests 237 2, 2, // fifo depths 238 true, // use local routing table 239 239 false ); // no broacast 240 240 … … 247 247 x_id, y_id, // cluster coordinates 248 248 x_width, y_width, l_width, 249 nb_direct_targets, // number of local sources 249 nb_direct_targets, // number of local sources 250 250 nb_direct_initiators, // number of local dests 251 2, 2, // fifo depths 252 false, // don't use local routing table 251 2, 2, // fifo depths 252 false, // don't use local routing table 253 253 false ); // no broacast 254 254 … … 262 262 x_width, y_width, l_width, 263 263 1, // number of local sources 264 nb_procs, // number of local targets 265 2, 2, // fifo depths 264 nb_procs, // number of local targets 265 2, 2, // fifo depths 266 266 false, // don't use local routing table 267 267 true ); // broacast … … 277 277 nb_procs, // number of local sources 278 278 1, // number of local dests 279 2, 2, // fifo depths 279 2, 2, // fifo depths 280 280 false, // don't use local routing table 281 false ); // no broacast 281 false ); // no broacast 282 282 283 283 ///////////////////////////////////////////////////////////////////////////// … … 324 324 IntTab(cluster_id, tgtid_fbuf), 325 325 mtd, 326 xfb, yfb); 326 xfb, yfb); 327 327 328 328 wt_fbuf = new VciDspinTargetWrapper<vci_param_int, … … 388 388 "mtty", 389 389 IntTab(cluster_id, tgtid_mtty), 390 mtd, 390 mtd, 391 391 vect_names); 392 392 … … 494 494 xbar_m2p_c->p_global_in (signal_dspin_m2p_g2l_c); 495 495 xbar_m2p_c->p_local_in[0] (signal_dspin_m2p_memc); 496 for (size_t p = 0; p < nb_procs; p++) 496 for (size_t p = 0; p < nb_procs; p++) 497 497 xbar_m2p_c->p_local_out[p] (signal_dspin_m2p_proc[p]); 498 498 … … 505 505 xbar_p2m_c->p_global_in (signal_dspin_p2m_g2l_c); 506 506 xbar_p2m_c->p_local_out[0] (signal_dspin_p2m_memc); 507 for (size_t p = 0; p < nb_procs; p++) 507 for (size_t p = 0; p < nb_procs; p++) 508 508 xbar_p2m_c->p_local_in[p] (signal_dspin_p2m_proc[p]); 509 509 … … 535 535 536 536 ///////////////////////////////////// XICU 537 xicu->p_clk 538 xicu->p_resetn 539 xicu->p_vci 537 xicu->p_clk (this->p_clk); 538 xicu->p_resetn (this->p_resetn); 539 xicu->p_vci (signal_vci_tgt_xicu); 540 540 for ( size_t p=0 ; p<nb_procs ; p++) 541 541 { 542 xicu->p_irq[p] 542 xicu->p_irq[p] (signal_proc_it[p]); 543 543 } 544 544 for ( size_t i=0 ; i<32 ; i++) … … 547 547 { 548 548 if (i < 8) xicu->p_hwi[i] (signal_false); 549 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] 549 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] (signal_irq_mdma[i-8]); 550 550 else if (i < 16) xicu->p_hwi[i] (signal_false); 551 551 else if (i < (16 + nb_ttys)) xicu->p_hwi[i] (signal_irq_mtty[i-16]); 552 else if (i < 31) xicu->p_hwi[i] 552 else if (i < 31) xicu->p_hwi[i] (signal_false); 553 553 else xicu->p_hwi[i] (signal_irq_bdev); 554 554 } … … 556 556 { 557 557 if (i < 8) xicu->p_hwi[i] (signal_false); 558 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] 559 else xicu->p_hwi[i] 558 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] (signal_irq_mdma[i-8]); 559 else xicu->p_hwi[i] (signal_false); 560 560 } 561 561 } … … 571 571 572 572 //////////////////////////////////////////////// MEMC 573 memc->p_clk 574 memc->p_resetn 575 memc->p_vci_ixr 576 memc->p_vci_tgt 573 memc->p_clk (this->p_clk); 574 memc->p_resetn (this->p_resetn); 575 memc->p_vci_ixr (signal_vci_xram); 576 memc->p_vci_tgt (signal_vci_tgt_memc); 577 577 memc->p_dspin_in (signal_dspin_p2m_memc); 578 memc->p_dspin_out 578 memc->p_dspin_out (signal_dspin_m2p_memc); 579 579 580 580 // wrapper MEMC … … 588 588 589 589 /////////////////////////////////////////////// XRAM 590 xram->p_clk 591 xram->p_resetn 592 xram->p_vci 590 xram->p_clk (this->p_clk); 591 xram->p_resetn (this->p_resetn); 592 xram->p_vci (signal_vci_xram); 593 593 594 594 std::cout << " - XRAM connected" << std::endl; 595 595 596 596 ////////////////////////////////////////////// MDMA 597 mdma->p_clk 598 mdma->p_resetn 599 mdma->p_vci_target 600 mdma->p_vci_initiator 597 mdma->p_clk (this->p_clk); 598 mdma->p_resetn (this->p_resetn); 599 mdma->p_vci_target (signal_vci_tgt_mdma); 600 mdma->p_vci_initiator (signal_vci_ini_mdma); 601 601 for (size_t i=0 ; i<nb_dmas ; i++) 602 602 mdma->p_irq[i] (signal_irq_mdma[i]); … … 618 618 std::cout << " - MDMA connected" << std::endl; 619 619 620 621 622 623 624 // BDEV 625 620 /////////////////////////////// Components in I/O cluster 621 622 if ( io ) 623 { 624 // BDEV 625 bdev->p_clk (this->p_clk); 626 626 bdev->p_resetn (this->p_resetn); 627 627 bdev->p_irq (signal_irq_bdev); … … 698 698 for ( size_t i=0 ; i<nb_ttys ; i++ ) 699 699 { 700 mtty->p_irq[i] 700 mtty->p_irq[i] (signal_irq_mtty[i]); 701 701 } 702 702
Note: See TracChangeset
for help on using the changeset viewer.