Changeset 508 for trunk/platforms
- Timestamp:
- Sep 2, 2013, 1:28:55 PM (11 years ago)
- Location:
- trunk/platforms/tsar_generic_xbar
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/top.cpp
r504 r508 629 629 #pragma omp for 630 630 #endif 631 for (size_t i = 0; i < (XMAX * YMAX); i++)631 for (size_t i = 0; i < (XMAX * YMAX); i++) 632 632 { 633 633 size_t x = i / YMAX; -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/include/tsar_xbar_cluster.h
r485 r508 47 47 { 48 48 public: 49 50 // Used in destructor 51 size_t n_procs; 49 52 50 53 // Ports … … 269 272 bool proc_debug_ok); 270 273 274 ~TsarXbarCluster(); 275 271 276 }; 272 277 }} -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
r504 r508 86 86 87 87 { 88 89 n_procs = nb_procs; 90 88 91 // Vectors of ports definition 89 p_cmd_in = alloc_elems<DspinInput<dspin_cmd_width> >("p_cmd_in",4, 3);90 p_cmd_out = alloc_elems<DspinOutput<dspin_cmd_width> >("p_cmd_out", 4, 3);91 p_rsp_in = alloc_elems<DspinInput<dspin_rsp_width> >("p_rsp_in",4, 2);92 p_rsp_out = alloc_elems<DspinOutput<dspin_rsp_width> >("p_rsp_out", 4, 2);92 p_cmd_in = alloc_elems<DspinInput<dspin_cmd_width> > ("p_cmd_in", 4, 3); 93 p_cmd_out = alloc_elems<DspinOutput<dspin_cmd_width> > ("p_cmd_out", 4, 3); 94 p_rsp_in = alloc_elems<DspinInput<dspin_rsp_width> > ("p_rsp_in", 4, 2); 95 p_rsp_out = alloc_elems<DspinOutput<dspin_rsp_width> > ("p_rsp_out", 4, 2); 93 96 94 97 ///////////////////////////////////////////////////////////////////////////// … … 105 108 GdbServer<Mips32ElIss> >( 106 109 sproc.str().c_str(), 107 cluster_id *nb_procs + p,// GLOBAL PROC_ID110 cluster_id * nb_procs + p, // GLOBAL PROC_ID 108 111 mtd, // Mapping Table 109 112 IntTab(cluster_id,p), // SRCID … … 113 116 8, // DTLB ways 114 117 8, // DTLB sets 115 l1_i_ways,l1_i_sets, 16,// ICACHE size116 l1_d_ways,l1_d_sets, 16,// DCACHE size118 l1_i_ways,l1_i_sets, 16, // ICACHE size 119 l1_d_ways,l1_d_sets, 16, // DCACHE size 117 120 4, // WBUF nlines 118 121 4, // WBUF nwords … … 154 157 8, // INVALIDATE TABLE DEPTH 155 158 debug_start_cycle, 156 memc_debug_ok 159 memc_debug_ok); 157 160 158 161 wt_memc = new VciDspinTargetWrapper<vci_param_int, … … 216 219 size_t nb_direct_initiators = nb_procs + 1; 217 220 size_t nb_direct_targets = 3; 218 if ( io)221 if (io) 219 222 { 220 223 nb_direct_initiators = nb_procs + 3; … … 303 306 304 307 // IO cluster components 305 if ( io)308 if (io) 306 309 { 307 310 ///////////////////////////////////////////// … … 335 338 "bdev", 336 339 mtd, 337 IntTab(cluster_id, nb_procs +1),340 IntTab(cluster_id, nb_procs + 1), 338 341 IntTab(cluster_id, tgtid_bdev), 339 342 disk_name, … … 394 397 ///////////////////////////////////////////// 395 398 std::vector<std::string> vect_names; 396 for ( size_t tid = 0 ; tid < (nb_ttys) ; tid++)399 for (size_t tid = 0; tid < nb_ttys; tid++) 397 400 { 398 401 std::ostringstream term_name; … … 423 426 router_rsp->p_resetn (this->p_resetn); 424 427 425 for (int i = 0; i < 4; i++)428 for (int i = 0; i < 4; i++) 426 429 { 427 430 for (int k = 0; k < 3; k++) … … 468 471 xbar_cmd_d->p_local_in[p] (signal_dspin_cmd_proc_i[p]); 469 472 470 if ( io)473 if (io) 471 474 { 472 475 xbar_cmd_d->p_local_out[tgtid_mtty] (signal_dspin_cmd_mtty_t); … … 475 478 xbar_cmd_d->p_local_out[tgtid_fbuf] (signal_dspin_cmd_fbuf_t); 476 479 xbar_cmd_d->p_local_out[tgtid_mnic] (signal_dspin_cmd_mnic_t); 477 xbar_cmd_d->p_local_out[tgtid_chbuf] 478 479 xbar_cmd_d->p_local_in[nb_procs +1](signal_dspin_cmd_bdev_i);480 xbar_cmd_d->p_local_in[nb_procs +2](signal_dspin_cmd_chbuf_i);480 xbar_cmd_d->p_local_out[tgtid_chbuf] (signal_dspin_cmd_chbuf_t); 481 482 xbar_cmd_d->p_local_in[nb_procs + 1] (signal_dspin_cmd_bdev_i); 483 xbar_cmd_d->p_local_in[nb_procs + 2] (signal_dspin_cmd_chbuf_i); 481 484 } 482 485 … … 498 501 xbar_rsp_d->p_local_out[p] (signal_dspin_rsp_proc_i[p]); 499 502 500 if ( io)503 if (io) 501 504 { 502 505 xbar_rsp_d->p_local_in[tgtid_mtty] (signal_dspin_rsp_mtty_t); … … 505 508 xbar_rsp_d->p_local_in[tgtid_fbuf] (signal_dspin_rsp_fbuf_t); 506 509 xbar_rsp_d->p_local_in[tgtid_mnic] (signal_dspin_rsp_mnic_t); 507 xbar_rsp_d->p_local_in[tgtid_chbuf] 508 509 xbar_rsp_d->p_local_out[nb_procs +1](signal_dspin_rsp_bdev_i);510 xbar_rsp_d->p_local_out[nb_procs +2](signal_dspin_rsp_chbuf_i);510 xbar_rsp_d->p_local_in[tgtid_chbuf] (signal_dspin_rsp_chbuf_t); 511 512 xbar_rsp_d->p_local_out[nb_procs + 1] (signal_dspin_rsp_bdev_i); 513 xbar_rsp_d->p_local_out[nb_procs + 2] (signal_dspin_rsp_chbuf_i); 511 514 } 512 515 … … 531 534 xbar_clack_c->p_local_in[0] (signal_dspin_clack_memc); 532 535 for (size_t p = 0; p < nb_procs; p++) 533 xbar_clack_c->p_local_out[p] 536 xbar_clack_c->p_local_out[p] (signal_dspin_clack_proc[p]); 534 537 535 538 std::cout << " - Clack Coherence crossbar connected" << std::endl; … … 575 578 xicu->p_resetn (this->p_resetn); 576 579 xicu->p_vci (signal_vci_tgt_xicu); 577 for ( size_t p=0 ; p<nb_procs; p++)580 for (size_t p = 0; p < nb_procs; p++) 578 581 { 579 582 xicu->p_irq[p] (signal_proc_it[p]); 580 583 } 581 for ( size_t i=0 ; i<32; i++)582 { 583 if ( io) // I/O cluster584 for (size_t i = 0; i < 32; i++) 585 { 586 if (io) // I/O cluster 584 587 { 585 588 if (i < 8) xicu->p_hwi[i] (signal_false); 586 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] (signal_irq_mdma[i -8]);589 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] (signal_irq_mdma[i - 8]); 587 590 else if (i < 16) xicu->p_hwi[i] (signal_false); 588 else if (i < (16 + nb_ttys)) xicu->p_hwi[i] (signal_irq_mtty[i -16]);591 else if (i < (16 + nb_ttys)) xicu->p_hwi[i] (signal_irq_mtty[i - 16]); 589 592 else if (i < 31) xicu->p_hwi[i] (signal_false); 590 593 else xicu->p_hwi[i] (signal_irq_bdev); … … 593 596 { 594 597 if (i < 8) xicu->p_hwi[i] (signal_false); 595 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] (signal_irq_mdma[i -8]);598 else if (i < (8 + nb_dmas)) xicu->p_hwi[i] (signal_irq_mdma[i - 8]); 596 599 else xicu->p_hwi[i] (signal_false); 597 600 } … … 637 640 mdma->p_vci_target (signal_vci_tgt_mdma); 638 641 mdma->p_vci_initiator (signal_vci_ini_mdma); 639 for (size_t i =0 ; i<nb_dmas; i++)642 for (size_t i = 0; i < nb_dmas; i++) 640 643 mdma->p_irq[i] (signal_irq_mdma[i]); 641 644 … … 658 661 /////////////////////////////// Components in I/O cluster 659 662 660 if ( io)663 if (io) 661 664 { 662 665 // BDEV … … 701 704 mnic->p_resetn (this->p_resetn); 702 705 mnic->p_vci (signal_vci_tgt_mnic); 703 for ( size_t i=0 ; i<nic_channels ; i++)706 for (size_t i = 0; i < nic_channels; i++) 704 707 { 705 708 mnic->p_rx_irq[i] (signal_irq_mnic_rx[i]); … … 721 724 chbuf->p_vci_target (signal_vci_tgt_chbuf); 722 725 chbuf->p_vci_initiator (signal_vci_ini_chbuf); 723 for ( size_t i=0 ; i < chbufdma_channels ; i++)726 for (size_t i = 0; i < chbufdma_channels; i++) 724 727 { 725 728 chbuf->p_irq[i] (signal_irq_chbuf[i]); … … 760 763 mtty->p_resetn (this->p_resetn); 761 764 mtty->p_vci (signal_vci_tgt_mtty); 762 for ( size_t i=0 ; i<nb_ttys ; i++)765 for (size_t i = 0; i < nb_ttys; i++) 763 766 { 764 767 mtty->p_irq[i] (signal_irq_mtty[i]); … … 776 779 } // end constructor 777 780 781 782 783 template<size_t dspin_cmd_width, 784 size_t dspin_rsp_width, 785 typename vci_param_int, 786 typename vci_param_ext> TsarXbarCluster<dspin_cmd_width, 787 dspin_rsp_width, 788 vci_param_int, 789 vci_param_ext>::~TsarXbarCluster() { 790 791 for (size_t p = 0; p < n_procs; p++) 792 { 793 delete proc[p]; 794 delete wi_proc[p]; 795 } 796 797 delete memc; 798 delete wt_memc; 799 delete xram; 800 delete xicu; 801 delete wt_xicu; 802 delete mdma; 803 delete wt_mdma; 804 delete wi_mdma; 805 delete xbar_cmd_d; 806 delete xbar_rsp_d; 807 delete xbar_m2p_c; 808 delete xbar_p2m_c; 809 delete xbar_clack_c; 810 delete router_cmd; 811 delete router_rsp; 812 if (brom != NULL) 813 { 814 delete brom; 815 delete wt_brom; 816 delete fbuf; 817 delete wt_fbuf; 818 delete bdev; 819 delete wt_bdev; 820 delete wi_bdev; 821 delete mnic; 822 delete wt_mnic; 823 delete chbuf; 824 delete wt_chbuf; 825 delete wi_chbuf; 826 delete mtty; 827 delete wt_mtty; 828 } 829 } 830 831 778 832 }} 779 833 780 834 // Local Variables: 781 // tab-width: 3782 // c-basic-offset: 3835 // tab-width: 4 836 // c-basic-offset: 4 783 837 // c-file-offsets:((innamespace . 0)(inline-open . 0)) 784 838 // indent-tabs-mode: nil 785 839 // End: 786 840 787 // vim: filetype=cpp:expandtab:shiftwidth= 3:tabstop=3:softtabstop=3788 789 790 841 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 842 843 844
Note: See TracChangeset
for help on using the changeset viewer.