Changeset 692 for trunk/platforms/tsar_generic_leti/tsar_leti_cluster
- Timestamp:
- May 16, 2014, 7:01:38 PM (10 years ago)
- Location:
- trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/metadata/tsar_leti_cluster.sd
r628 r692 41 41 42 42 Uses('caba:vci_xicu', 43 cell_size = parameter.Reference('vci_data_width_int')), 44 45 Uses('caba:vci_local_crossbar', 43 46 cell_size = parameter.Reference('vci_data_width_int')), 44 47 -
trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/include/tsar_leti_cluster.h
r628 r692 22 22 #include "vci_simple_ram.h" 23 23 #include "vci_xicu.h" 24 #include "vci_local_crossbar.h" 24 25 #include "dspin_local_crossbar.h" 25 26 #include "vci_dspin_initiator_wrapper.h" … … 44 45 45 46 // Used in destructor 46 size_t n_procs;47 size_t m_nprocs; 47 48 48 49 // Ports … … 75 76 DspinSignals<dspin_cmd_width> signal_dspin_cmd_l2g_d; 76 77 DspinSignals<dspin_cmd_width> signal_dspin_cmd_g2l_d; 78 DspinSignals<dspin_rsp_width> signal_dspin_rsp_l2g_d; 79 DspinSignals<dspin_rsp_width> signal_dspin_rsp_g2l_d; 77 80 DspinSignals<dspin_cmd_width> signal_dspin_m2p_l2g_c; 78 81 DspinSignals<dspin_cmd_width> signal_dspin_m2p_g2l_c; 79 82 DspinSignals<dspin_cmd_width> signal_dspin_clack_l2g_c; 80 83 DspinSignals<dspin_cmd_width> signal_dspin_clack_g2l_c; 81 DspinSignals<dspin_rsp_width> signal_dspin_rsp_l2g_d;82 DspinSignals<dspin_rsp_width> signal_dspin_rsp_g2l_d;83 84 DspinSignals<dspin_rsp_width> signal_dspin_p2m_l2g_c; 84 85 DspinSignals<dspin_rsp_width> signal_dspin_p2m_g2l_c; 85 86 86 // Direct VCI signals to VCI/DSPIN wrappers87 // Direct VCI signals 87 88 VciSignals<vci_param_int> signal_vci_ini_proc[4]; 88 89 VciSignals<vci_param_int> signal_vci_ini_mdma; … … 100 101 VciSignals<vci_param_int> signal_vci_tgt_simh; 101 102 102 // Direct DSPIN signals to local crossbars 103 DspinSignals<dspin_cmd_width> signal_dspin_cmd_proc_i[4]; 104 DspinSignals<dspin_rsp_width> signal_dspin_rsp_proc_i[4]; 105 DspinSignals<dspin_cmd_width> signal_dspin_cmd_mdma_i; 106 DspinSignals<dspin_rsp_width> signal_dspin_rsp_mdma_i; 107 DspinSignals<dspin_cmd_width> signal_dspin_cmd_bdev_i; 108 DspinSignals<dspin_rsp_width> signal_dspin_rsp_bdev_i; 109 DspinSignals<dspin_cmd_width> signal_dspin_cmd_chbuf_i; 110 DspinSignals<dspin_rsp_width> signal_dspin_rsp_chbuf_i; 111 112 DspinSignals<dspin_cmd_width> signal_dspin_cmd_memc_t; 113 DspinSignals<dspin_rsp_width> signal_dspin_rsp_memc_t; 114 DspinSignals<dspin_cmd_width> signal_dspin_cmd_xicu_t; 115 DspinSignals<dspin_rsp_width> signal_dspin_rsp_xicu_t; 116 DspinSignals<dspin_cmd_width> signal_dspin_cmd_mdma_t; 117 DspinSignals<dspin_rsp_width> signal_dspin_rsp_mdma_t; 118 DspinSignals<dspin_cmd_width> signal_dspin_cmd_mtty_t; 119 DspinSignals<dspin_rsp_width> signal_dspin_rsp_mtty_t; 120 DspinSignals<dspin_cmd_width> signal_dspin_cmd_bdev_t; 121 DspinSignals<dspin_rsp_width> signal_dspin_rsp_bdev_t; 122 DspinSignals<dspin_cmd_width> signal_dspin_cmd_fbuf_t; 123 DspinSignals<dspin_rsp_width> signal_dspin_rsp_fbuf_t; 124 DspinSignals<dspin_cmd_width> signal_dspin_cmd_mnic_t; 125 DspinSignals<dspin_rsp_width> signal_dspin_rsp_mnic_t; 126 DspinSignals<dspin_cmd_width> signal_dspin_cmd_chbuf_t; 127 DspinSignals<dspin_rsp_width> signal_dspin_rsp_chbuf_t; 128 DspinSignals<dspin_cmd_width> signal_dspin_cmd_simh_t; 129 DspinSignals<dspin_rsp_width> signal_dspin_rsp_simh_t; 103 VciSignals<vci_param_int> signal_vci_g2l; 104 VciSignals<vci_param_int> signal_vci_l2g; 130 105 131 106 // Coherence DSPIN signals to local crossbar … … 147 122 GdbServer<Mips32ElIss> >* proc[4]; 148 123 149 VciDspinInitiatorWrapper<vci_param_int,150 dspin_cmd_width,151 dspin_rsp_width>* wi_proc[4];152 153 124 VciMemCache<vci_param_int, 154 125 vci_param_ext, … … 156 127 dspin_cmd_width>* memc; 157 128 158 VciDspinTargetWrapper<vci_param_int,159 dspin_cmd_width,160 dspin_rsp_width>* wt_memc;161 162 129 VciXicu<vci_param_int>* xicu; 163 164 VciDspinTargetWrapper<vci_param_int,165 dspin_cmd_width,166 dspin_rsp_width>* wt_xicu;167 130 168 131 VciSimpleRam<vci_param_ext>* xram; … … 170 133 VciMultiTty<vci_param_int>* mtty; 171 134 172 VciDspinTargetWrapper<vci_param_int, 173 dspin_cmd_width, 174 dspin_rsp_width>* wt_mtty; 135 VciBlockDeviceTsar<vci_param_int>* bdev; 175 136 176 Vci BlockDeviceTsar<vci_param_int>* bdev;137 VciLocalCrossbar<vci_param_int>* xbar_cmd; 177 138 178 139 VciDspinInitiatorWrapper<vci_param_int, 179 140 dspin_cmd_width, 180 dspin_rsp_width>* wi_ bdev;141 dspin_rsp_width>* wi_gate; 181 142 182 143 VciDspinTargetWrapper<vci_param_int, 183 144 dspin_cmd_width, 184 dspin_rsp_width>* wt_ bdev;145 dspin_rsp_width>* wt_gate; 185 146 186 DspinLocalCrossbar<dspin_cmd_width>* xbar_cmd;187 DspinLocalCrossbar<dspin_rsp_width>* xbar_rsp;188 147 DspinLocalCrossbar<dspin_cmd_width>* xbar_m2p; 189 148 DspinLocalCrossbar<dspin_rsp_width>* xbar_p2m; -
trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/src/tsar_leti_cluster.cpp
r664 r692 52 52 uint32_t trace_memc_id ) 53 53 : soclib::caba::BaseModule(insname), 54 m_nprocs(nb_procs), 54 55 p_clk("clk"), 55 56 p_resetn("resetn") … … 114 115 trace_start_cycle, 115 116 trace_ok ); 116 117 std::ostringstream swip;118 swip << "wi_proc_" << x_id << "_" << y_id << "_" << p;119 wi_proc[p] = new VciDspinInitiatorWrapper<vci_param_int,120 dspin_cmd_width,121 dspin_rsp_width>(122 swip.str().c_str(),123 x_width + y_width + l_width);124 117 } 125 118 … … 148 141 trace_ok ); 149 142 150 wt_memc = new VciDspinTargetWrapper<vci_param_int,151 dspin_cmd_width,152 dspin_rsp_width>(153 "wt_memc",154 x_width + y_width + l_width);155 156 143 ///////////////////////////////////////////////////////////////////////////// 157 144 std::ostringstream sxram; … … 176 163 16 ); // number of output IRQs 177 164 178 wt_xicu = new VciDspinTargetWrapper<vci_param_int, 165 ///////////////////////////////////////////////////////////////////////////// 166 size_t nb_initiators = nb_procs; 167 size_t nb_targets = 2; 168 169 if ((x_id == 0) and (y_id == 0)) // cluster(0,0) 170 { 171 nb_initiators = nb_procs + 1; 172 nb_targets = 4; 173 } 174 175 std::ostringstream s_xbar_cmd; 176 xbar_cmd = new VciLocalCrossbar<vci_param_int>( 177 s_xbar_cmd.str().c_str(), 178 mtd, // mapping table 179 cluster_xy, // cluster id 180 nb_initiators, // number of local initiators 181 nb_targets, // number of local targets 182 0 ); // default target 183 184 wi_gate = new VciDspinInitiatorWrapper<vci_param_int, 185 dspin_cmd_width, 186 dspin_rsp_width>( 187 "wi_gate", 188 x_width + y_width + l_width); 189 190 wt_gate = new VciDspinTargetWrapper<vci_param_int, 179 191 dspin_cmd_width, 180 192 dspin_rsp_width>( 181 "wt_ xicu",193 "wt_gate", 182 194 x_width + y_width + l_width); 183 184 /////////////////////////////////////////////////////////////////////////////185 size_t nb_initiators = nb_procs;186 size_t nb_targets = 2;187 188 if ((x_id == 0) and (y_id == 0)) // cluster(0,0)189 {190 nb_initiators = nb_procs + 1;191 nb_targets = 4;192 }193 194 std::ostringstream s_xbar_cmd;195 s_xbar_cmd << "xbar_cmd_" << x_id << "_" << y_id;196 xbar_cmd = new DspinLocalCrossbar<dspin_cmd_width>(197 s_xbar_cmd.str().c_str(),198 mtd, // mapping table199 x_id, y_id, // cluster coordinates200 x_width, y_width, l_width,201 nb_initiators, // number of local of sources202 nb_targets, // number of local dests203 2, 2, // fifo depths204 true, // CMD205 true, // use local routing table206 false ); // no broadcast207 208 /////////////////////////////////////////////////////////////////////////////209 std::ostringstream s_xbar_rsp;210 s_xbar_rsp << "xbar_rsp_" << x_id << "_" << y_id;211 xbar_rsp = new DspinLocalCrossbar<dspin_rsp_width>(212 s_xbar_rsp.str().c_str(),213 mtd, // mapping table214 x_id, y_id, // cluster coordinates215 x_width, y_width, l_width,216 nb_targets, // number of local sources217 nb_initiators, // number of local dests218 2, 2, // fifo depths219 false, // RSP220 false, // don't use local routing table221 false ); // no broadcast222 195 223 196 ///////////////////////////////////////////////////////////////////////////// … … 313 286 314 287 // backup BDV and TTY peripherals in cluster(0,0) 288 bdev = NULL; 289 mtty = NULL; 315 290 if ((x_id == 0) and (y_id == 0)) 316 291 { … … 325 300 64 ); // burst size 326 301 327 wt_bdev = new VciDspinTargetWrapper<vci_param_int,328 dspin_cmd_width,329 dspin_rsp_width>(330 "wt_bdev",331 x_width + y_width + l_width);332 333 wi_bdev = new VciDspinInitiatorWrapper<vci_param_int,334 dspin_cmd_width,335 dspin_rsp_width>(336 "wi_bdev",337 x_width + y_width + l_width);338 339 302 ///////////////////////////////////////////// 340 303 mtty = new VciMultiTty<vci_param_int>( … … 342 305 IntTab(cluster_xy, tgtid_mtty), 343 306 mtd, 344 "backup", NULL ); 345 346 wt_mtty = new VciDspinTargetWrapper<vci_param_int, 347 dspin_cmd_width, 348 dspin_rsp_width>( 349 "wt_mtty", 350 x_width + y_width + l_width); 307 "tty_backup", NULL ); 351 308 } 352 309 … … 408 365 xbar_cmd->p_clk (this->p_clk); 409 366 xbar_cmd->p_resetn (this->p_resetn); 410 xbar_cmd->p_ global_out (signal_dspin_cmd_l2g_d);411 xbar_cmd->p_ global_in (signal_dspin_cmd_g2l_d);412 413 xbar_cmd->p_ local_out[tgtid_memc] (signal_dspin_cmd_memc_t);414 xbar_cmd->p_ local_out[tgtid_xicu] (signal_dspin_cmd_xicu_t);367 xbar_cmd->p_initiator_to_up (signal_vci_l2g); 368 xbar_cmd->p_target_to_up (signal_vci_g2l); 369 370 xbar_cmd->p_to_target[tgtid_memc] (signal_vci_tgt_memc); 371 xbar_cmd->p_to_target[tgtid_xicu] (signal_vci_tgt_xicu); 415 372 416 373 for (size_t p = 0; p < nb_procs; p++) 417 xbar_cmd->p_ local_in[p] (signal_dspin_cmd_proc_i[p]);374 xbar_cmd->p_to_initiator[p] (signal_vci_ini_proc[p]); 418 375 419 376 if ((x_id == 0) and (y_id == 0)) // cluster(0,0) 420 377 { 421 xbar_cmd->p_local_out[tgtid_mtty] (signal_dspin_cmd_mtty_t); 422 xbar_cmd->p_local_out[tgtid_bdev] (signal_dspin_cmd_bdev_t); 423 424 xbar_cmd->p_local_in[nb_procs] (signal_dspin_cmd_bdev_i); 425 } 426 427 std::cout << " - CMD Direct crossbar connected" << std::endl; 428 429 //////////////////////// RSP DSPIN local crossbar direct 430 xbar_rsp->p_clk (this->p_clk); 431 xbar_rsp->p_resetn (this->p_resetn); 432 xbar_rsp->p_global_out (signal_dspin_rsp_l2g_d); 433 xbar_rsp->p_global_in (signal_dspin_rsp_g2l_d); 434 435 xbar_rsp->p_local_in[tgtid_memc] (signal_dspin_rsp_memc_t); 436 xbar_rsp->p_local_in[tgtid_xicu] (signal_dspin_rsp_xicu_t); 437 438 for (size_t p = 0; p < nb_procs; p++) 439 xbar_rsp->p_local_out[p] (signal_dspin_rsp_proc_i[p]); 440 441 if ((x_id == 0) and (y_id == 0)) // cluster(0,0) 442 { 443 xbar_rsp->p_local_in[tgtid_mtty] (signal_dspin_rsp_mtty_t); 444 xbar_rsp->p_local_in[tgtid_bdev] (signal_dspin_rsp_bdev_t); 445 446 xbar_rsp->p_local_out[nb_procs] (signal_dspin_rsp_bdev_i); 447 } 448 449 std::cout << " - RSP Direct crossbar connected" << std::endl; 378 xbar_cmd->p_to_target[tgtid_mtty] (signal_vci_tgt_mtty); 379 xbar_cmd->p_to_target[tgtid_bdev] (signal_vci_tgt_bdev); 380 xbar_cmd->p_to_initiator[nb_procs] (signal_vci_ini_bdev); 381 } 382 383 wi_gate->p_clk (this->p_clk); 384 wi_gate->p_resetn (this->p_resetn); 385 wi_gate->p_vci (signal_vci_l2g); 386 wi_gate->p_dspin_cmd (signal_dspin_cmd_l2g_d); 387 wi_gate->p_dspin_rsp (signal_dspin_rsp_g2l_d); 388 389 wt_gate->p_clk (this->p_clk); 390 wt_gate->p_resetn (this->p_resetn); 391 wt_gate->p_vci (signal_vci_g2l); 392 wt_gate->p_dspin_cmd (signal_dspin_cmd_g2l_d); 393 wt_gate->p_dspin_rsp (signal_dspin_rsp_l2g_d); 394 395 std::cout << " - CMD & RSP Direct crossbar connected" << std::endl; 450 396 451 397 ////////////////////// M2P DSPIN local crossbar coherence … … 497 443 else proc[p]->p_irq[j] (signal_false); 498 444 } 499 500 wi_proc[p]->p_clk (this->p_clk);501 wi_proc[p]->p_resetn (this->p_resetn);502 wi_proc[p]->p_dspin_cmd (signal_dspin_cmd_proc_i[p]);503 wi_proc[p]->p_dspin_rsp (signal_dspin_rsp_proc_i[p]);504 wi_proc[p]->p_vci (signal_vci_ini_proc[p]);505 445 } 506 446 … … 533 473 } 534 474 535 // wrapper XICU536 wt_xicu->p_clk (this->p_clk);537 wt_xicu->p_resetn (this->p_resetn);538 wt_xicu->p_dspin_cmd (signal_dspin_cmd_xicu_t);539 wt_xicu->p_dspin_rsp (signal_dspin_rsp_xicu_t);540 wt_xicu->p_vci (signal_vci_tgt_xicu);541 542 475 std::cout << " - XICU connected" << std::endl; 543 476 … … 552 485 memc->p_dspin_clack (signal_dspin_clack_memc); 553 486 554 // wrapper MEMC555 wt_memc->p_clk (this->p_clk);556 wt_memc->p_resetn (this->p_resetn);557 wt_memc->p_dspin_cmd (signal_dspin_cmd_memc_t);558 wt_memc->p_dspin_rsp (signal_dspin_rsp_memc_t);559 wt_memc->p_vci (signal_vci_tgt_memc);560 561 487 std::cout << " - MEMC connected" << std::endl; 562 488 … … 579 505 bdev->p_vci_initiator (signal_vci_ini_bdev); 580 506 581 // wrapper tgt BDEV582 wt_bdev->p_clk (this->p_clk);583 wt_bdev->p_resetn (this->p_resetn);584 wt_bdev->p_dspin_cmd (signal_dspin_cmd_bdev_t);585 wt_bdev->p_dspin_rsp (signal_dspin_rsp_bdev_t);586 wt_bdev->p_vci (signal_vci_tgt_bdev);587 588 // wrapper ini BDEV589 wi_bdev->p_clk (this->p_clk);590 wi_bdev->p_resetn (this->p_resetn);591 wi_bdev->p_dspin_cmd (signal_dspin_cmd_bdev_i);592 wi_bdev->p_dspin_rsp (signal_dspin_rsp_bdev_i);593 wi_bdev->p_vci (signal_vci_ini_bdev);594 595 507 std::cout << " - BDEV connected" << std::endl; 596 508 … … 600 512 mtty->p_vci (signal_vci_tgt_mtty); 601 513 mtty->p_irq[0] (signal_irq_mtty); 602 603 // wrapper tgt MTTY604 wt_mtty->p_clk (this->p_clk);605 wt_mtty->p_resetn (this->p_resetn);606 wt_mtty->p_dspin_cmd (signal_dspin_cmd_mtty_t);607 wt_mtty->p_dspin_rsp (signal_dspin_rsp_mtty_t);608 wt_mtty->p_vci (signal_vci_tgt_mtty);609 514 610 515 std::cout << " - MTTY connected" << std::endl; … … 637 542 dealloc_elems<DspinOutput<dspin_cmd_width> >(p_cla_out, 4); 638 543 639 for (size_t p = 0; p < 4 ; p++) 640 { 641 if ( proc[p] ) delete proc[p]; 642 if ( wi_proc[p] ) delete wi_proc[p]; 544 for (size_t p = 0; p < m_nprocs ; p++) 545 { 546 if ( proc[p] ) delete proc[p]; 643 547 } 644 548 645 549 delete memc; 646 delete wt_memc;647 550 delete xram; 648 551 delete xicu; 649 delete wt_xicu;650 552 delete xbar_cmd; 651 delete xbar_rsp;652 553 delete xbar_m2p; 653 554 delete xbar_p2m; … … 658 559 delete router_p2m; 659 560 delete router_cla; 561 delete wi_gate; 562 delete wt_gate; 660 563 661 564 if ( bdev ) 662 565 { 663 566 delete bdev; 664 delete wt_bdev;665 delete wi_bdev;666 567 } 667 568 … … 669 570 { 670 571 delete mtty; 671 delete wt_mtty;672 572 } 673 573 }
Note: See TracChangeset
for help on using the changeset viewer.