Changeset 972 for trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba
- Timestamp:
- Apr 11, 2015, 8:26:46 PM (10 years ago)
- Location:
- trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/metadata/tsar_iob_cluster.sd
r836 r972 29 29 Uses('common:iss2'), 30 30 Uses('common:elf_file_loader'), 31 Uses('caba:coproc_signals'), 31 32 32 33 # internal network components … … 47 48 cell_size = parameter.Reference('vci_data_width_int')), 48 49 49 Uses('caba:vci_m ulti_dma',50 Uses('caba:vci_mwmr_dma', 50 51 cell_size = parameter.Reference('vci_data_width_int')), 52 53 Uses('caba:coproc_gcd'), 54 Uses('caba:coproc_dct'), 55 Uses('caba:coproc_cpy'), 51 56 52 57 Uses('caba:vci_local_crossbar', -
trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h
r959 r972 28 28 #include "dspin_router.h" 29 29 #include "virtual_dspin_router.h" 30 #include "vci_m ulti_dma.h"30 #include "vci_mwmr_dma.h" 31 31 #include "vci_mem_cache.h" 32 32 #include "vci_cc_vcache_wrapper.h" 33 33 #include "vci_io_bridge.h" 34 #include "coproc_signals.h" 35 #include "coproc_gcd.h" 36 #include "coproc_dct.h" 37 #include "coproc_cpy.h" 34 38 35 39 namespace soclib { namespace caba { … … 71 75 sc_signal<bool> signal_false; 72 76 sc_signal<bool> signal_proc_it[32]; 73 sc_signal<bool> signal_irq_m dma[8];77 sc_signal<bool> signal_irq_mwmr; 74 78 sc_signal<bool> signal_irq_memc; 75 79 80 // Coprocessor signals 81 CoprocSignals<uint32_t,uint8_t> signal_to_coproc[8]; 82 CoprocSignals<uint32_t,uint8_t> signal_from_coproc[8]; 83 sc_signal<uint32_t> signal_config_coproc[8]; 84 sc_signal<uint32_t> signal_status_coproc[8]; 85 76 86 // INT network DSPIN signals between DSPIN routers and DSPIN local_crossbars 77 87 DspinSignals<dspin_int_cmd_width> signal_int_dspin_cmd_l2g_d; … … 88 98 // INT network VCI signals between VCI components and VCI local crossbar 89 99 VciSignals<vci_param_int> signal_int_vci_ini_proc[8]; 90 VciSignals<vci_param_int> signal_int_vci_ini_m dma;100 VciSignals<vci_param_int> signal_int_vci_ini_mwmr; 91 101 VciSignals<vci_param_int> signal_int_vci_ini_iobx; 92 102 93 103 VciSignals<vci_param_int> signal_int_vci_tgt_memc; 94 104 VciSignals<vci_param_int> signal_int_vci_tgt_xicu; 95 VciSignals<vci_param_int> signal_int_vci_tgt_m dma;105 VciSignals<vci_param_int> signal_int_vci_tgt_mwmr; 96 106 VciSignals<vci_param_int> signal_int_vci_tgt_iobx; 97 107 … … 144 154 VciXicu<vci_param_int>* xicu; 145 155 146 VciMultiDma<vci_param_int>* mdma; 156 VciMwmrDma<vci_param_int>* mwmr; 157 158 CoprocGcd* gcd; 159 CoprocDct* dct; 160 CoprocCpy* cpy; 147 161 148 162 VciLocalCrossbar<vci_param_int>* int_xbar_d; … … 188 202 TsarIobCluster( sc_module_name insname, 189 203 size_t nb_procs, 190 size_t nb_dmas,191 204 size_t x, // x coordinate 192 205 size_t y, // y coordinate … … 205 218 size_t int_memc_tgt_id, 206 219 size_t int_xicu_tgt_id, 207 size_t int_m dma_tgt_id,220 size_t int_mwmr_tgt_id, 208 221 size_t int_iobx_tgt_id, 209 222 size_t int_proc_ini_id, 210 size_t int_m dma_ini_id,223 size_t int_mwmr_ini_id, 211 224 size_t int_iobx_ini_id, 212 225 … … 231 244 size_t xcu_nb_irq, 232 245 246 size_t coproc_type, 247 233 248 const Loader &loader, // loader for XRAM 234 249 … … 245 260 void init(); 246 261 247 248 262 }; 249 263 -
trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
r959 r972 15 15 #include "../include/tsar_iob_cluster.h" 16 16 17 #define MWR_COPROC_CPY 0 18 #define MWR_COPROC_DCT 1 19 #define MWR_COPROC_GCD 2 20 17 21 #define tmpl(x) \ 18 22 template<typename vci_param_int , typename vci_param_ext,\ … … 26 30 namespace soclib { namespace caba { 27 31 28 ////////////////////////////////////////////////////////////////////////// 29 // Constructor 30 ////////////////////////////////////////////////////////////////////////// 32 ///////////////////////////////////////////////////////////////////////////// 31 33 tmpl(/**/)::TsarIobCluster( 32 ////////////////////////////////////////////////////////////////////////// 34 ///////////////////////////////////////////////////////////////////////////// 33 35 sc_module_name insname, 34 36 size_t nb_procs, 35 size_t nb_dmas,36 37 size_t x_id, 37 38 size_t y_id, … … 50 51 size_t int_memc_tgt_id, // local index 51 52 size_t int_xicu_tgt_id, // local index 52 size_t int_m dma_tgt_id, // local index53 size_t int_mwmr_tgt_id, // local index 53 54 size_t int_iobx_tgt_id, // local index 54 55 55 56 size_t int_proc_ini_id, // local index 56 size_t int_m dma_ini_id, // local index57 size_t int_mwmr_ini_id, // local index 57 58 size_t int_iobx_ini_id, // local index 58 59 … … 77 78 size_t xcu_nb_out, 78 79 80 size_t coproc_type, 81 79 82 const Loader &loader, 80 83 … … 88 91 p_resetn("resetn") 89 92 { 90 assert( (x_id < xmax) and (y_id < ymax) and "Illegal cluster coordinates"); 93 assert( (x_id < xmax) and (y_id < ymax) and 94 "Error in tsar_iob_cluster : Illegal cluster coordinates"); 91 95 92 96 size_t cluster_id = (x_id<<4) + y_id; … … 186 190 xcu_nb_out); // number of output IRQs 187 191 188 //////////// MDMA 189 std::ostringstream s_mdma; 190 s_mdma << "mdma_" << x_id << "_" << y_id; 191 mdma = new VciMultiDma<vci_param_int>( 192 s_mdma.str().c_str(), 192 //////////// MWMR controller and coprocessor 193 std::ostringstream s_mwmr; 194 std::ostringstream s_copro; 195 s_mwmr << "mwmr_" << x_id << "_" << y_id; 196 197 if ( coproc_type == MWR_COPROC_CPY) 198 { 199 s_copro << "cpy_" << x_id << "_" << y_id; 200 cpy = new CoprocCpy( s_copro.str().c_str(), 64 ); // burst size 201 202 mwmr = new VciMwmrDma<vci_param_int>( 203 s_mwmr.str().c_str(), 193 204 mt_int, 194 IntTab(cluster_id, nb_procs), // SRCID 195 IntTab(cluster_id, int_mdma_tgt_id), // TGTID 196 64, // burst size 197 nb_dmas); // number of IRQs 205 IntTab(cluster_id, int_mwmr_ini_id), // SRCID 206 IntTab(cluster_id, int_mwmr_tgt_id), // TGTID 207 1, // nb to_coproc ports 208 1, // nb from_coproc ports 209 1, // nb config registers 210 0, // nb status registers 211 64 ); // burst size (bytes) 212 } 213 if ( coproc_type == MWR_COPROC_DCT ) 214 { 215 s_copro << "dct_" << x_id << "_" << y_id; 216 dct = new CoprocDct( s_copro.str().c_str(), 64 , 16 ); // burst size / latency 217 218 mwmr = new VciMwmrDma<vci_param_int>( 219 s_mwmr.str().c_str(), 220 mt_int, 221 IntTab(cluster_id, int_mwmr_ini_id), // SRCID 222 IntTab(cluster_id, int_mwmr_tgt_id), // TGTID 223 1, // nb to_coproc ports 224 1, // nb from_coproc ports 225 1, // nb config registers 226 0, // nb status registers 227 64 ); // burst size (bytes) 228 } 229 if ( coproc_type == MWR_COPROC_GCD ) 230 { 231 s_copro << "gcd_" << x_id << "_" << y_id; 232 gcd = new CoprocGcd( s_copro.str().c_str(), 64 ); // burst size 233 234 mwmr = new VciMwmrDma<vci_param_int>( 235 s_mwmr.str().c_str(), 236 mt_int, 237 IntTab(cluster_id, int_mwmr_ini_id), // SRCID 238 IntTab(cluster_id, int_mwmr_tgt_id), // TGTID 239 2, // nb to_coproc ports 240 1, // nb from_coproc ports 241 1, // nb config registers 242 0, // nb status registers 243 64 ); // burst size (bytes) 244 } 198 245 199 246 /////////// Direct LOCAL_XBAR(S) … … 435 482 int_xbar_d->p_to_target[int_memc_tgt_id] (signal_int_vci_tgt_memc); 436 483 int_xbar_d->p_to_target[int_xicu_tgt_id] (signal_int_vci_tgt_xicu); 437 int_xbar_d->p_to_target[int_m dma_tgt_id] (signal_int_vci_tgt_mdma);438 int_xbar_d->p_to_initiator[int_m dma_ini_id] (signal_int_vci_ini_mdma);484 int_xbar_d->p_to_target[int_mwmr_tgt_id] (signal_int_vci_tgt_mwmr); 485 int_xbar_d->p_to_initiator[int_mwmr_ini_id] (signal_int_vci_ini_mwmr); 439 486 for (size_t p = 0; p < nb_procs; p++) 440 487 int_xbar_d->p_to_initiator[int_proc_ini_id + p] (signal_int_vci_ini_proc[p]); … … 513 560 { 514 561 if ( i == 0 ) xicu->p_hwi[i] (signal_irq_memc); 515 else if ( i <= nb_dmas ) xicu->p_hwi[i] (signal_irq_mdma[i-1]);562 else if ( i == 1 ) xicu->p_hwi[i] (signal_irq_mwmr); 516 563 else xicu->p_hwi[i] (signal_false); 517 564 } … … 546 593 xram_ram_wt->p_vci (signal_ram_vci_tgt_xram); 547 594 548 /////////////////////////////////// MDMA 549 mdma->p_clk (this->p_clk); 550 mdma->p_resetn (this->p_resetn); 551 mdma->p_vci_target (signal_int_vci_tgt_mdma); 552 mdma->p_vci_initiator (signal_int_vci_ini_mdma); 553 for (size_t i=0 ; i<nb_dmas ; i++) 554 mdma->p_irq[i] (signal_irq_mdma[i]); 595 /////////////////////////////////// GCD coprocessor 596 if ( coproc_type == MWR_COPROC_GCD ) 597 { 598 gcd->p_clk (this->p_clk); 599 gcd->p_resetn (this->p_resetn); 600 gcd->p_opa (signal_to_coproc[0]); 601 gcd->p_opb (signal_to_coproc[1]); 602 gcd->p_res (signal_from_coproc[0]); 603 gcd->p_config (signal_config_coproc[0]); 604 605 mwmr->p_clk (this->p_clk); 606 mwmr->p_resetn (this->p_resetn); 607 mwmr->p_vci_target (signal_int_vci_tgt_mwmr); 608 mwmr->p_vci_initiator (signal_int_vci_ini_mwmr); 609 mwmr->p_to_coproc[0] (signal_to_coproc[0]); 610 mwmr->p_to_coproc[1] (signal_to_coproc[1]); 611 mwmr->p_from_coproc[0] (signal_from_coproc[0]); 612 mwmr->p_config[0] (signal_config_coproc[0]); 613 mwmr->p_irq (signal_irq_mwmr); 614 } 615 616 /////////////////////////////////// DCT coprocessor 617 if ( coproc_type == MWR_COPROC_DCT ) 618 { 619 dct->p_clk (this->p_clk); 620 dct->p_resetn (this->p_resetn); 621 dct->p_in (signal_to_coproc[0]); 622 dct->p_out (signal_from_coproc[0]); 623 dct->p_config (signal_config_coproc[0]); 624 625 mwmr->p_clk (this->p_clk); 626 mwmr->p_resetn (this->p_resetn); 627 mwmr->p_vci_target (signal_int_vci_tgt_mwmr); 628 mwmr->p_vci_initiator (signal_int_vci_ini_mwmr); 629 mwmr->p_to_coproc[0] (signal_to_coproc[0]); 630 mwmr->p_from_coproc[0] (signal_from_coproc[0]); 631 mwmr->p_config[0] (signal_config_coproc[0]); 632 mwmr->p_irq (signal_irq_mwmr); 633 } 634 635 /////////////////////////////////// CPY coprocessor 636 if ( coproc_type == MWR_COPROC_CPY ) 637 { 638 cpy->p_clk (this->p_clk); 639 cpy->p_resetn (this->p_resetn); 640 cpy->p_load (signal_to_coproc[0]); 641 cpy->p_store (signal_from_coproc[0]); 642 cpy->p_config (signal_config_coproc[0]); 643 644 mwmr->p_clk (this->p_clk); 645 mwmr->p_resetn (this->p_resetn); 646 mwmr->p_vci_target (signal_int_vci_tgt_mwmr); 647 mwmr->p_vci_initiator (signal_int_vci_ini_mwmr); 648 mwmr->p_to_coproc[0] (signal_to_coproc[0]); 649 mwmr->p_from_coproc[0] (signal_from_coproc[0]); 650 mwmr->p_config[0] (signal_config_coproc[0]); 651 mwmr->p_irq (signal_irq_mwmr); 652 } 555 653 556 654 //////////////////////////// RAM network CMD & RSP routers … … 624 722 signal_ram_dspin_cmd_false.write = false; 625 723 signal_ram_dspin_rsp_false.read = true; 626 } // end init724 } 627 725 628 726 }}
Note: See TracChangeset
for help on using the changeset viewer.