Changeset 1051 for trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba
- Timestamp:
- Apr 11, 2017, 11:50:57 PM (8 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
r1002 r1051 29 29 Uses('common:iss2'), 30 30 Uses('common:elf_file_loader'), 31 Uses('caba:coproc_signals'),32 31 33 32 # internal network components … … 48 47 cell_size = parameter.Reference('vci_data_width_int')), 49 48 50 Uses('caba:vci_m wmr_dma',49 Uses('caba:vci_multi_dma', 51 50 cell_size = parameter.Reference('vci_data_width_int')), 52 53 Uses('caba:coproc_gcd'),54 Uses('caba:coproc_dct'),55 Uses('caba:coproc_cpy'),56 51 57 52 Uses('caba:vci_local_crossbar', -
trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h
r1050 r1051 27 27 #include "vci_dspin_target_wrapper.h" 28 28 #include "dspin_router.h" 29 #include "vci_m wmr_dma.h"29 #include "vci_multi_dma.h" 30 30 #include "vci_mem_cache.h" 31 31 #include "vci_cc_vcache_wrapper.h" 32 32 #include "vci_io_bridge.h" 33 #include "coproc_signals.h"34 #include "coproc_gcd.h"35 #include "coproc_dct.h"36 #include "coproc_cpy.h"37 33 38 34 namespace soclib { namespace caba { … … 80 76 sc_signal<bool> signal_false; 81 77 sc_signal<bool> signal_proc_it[32]; 82 sc_signal<bool> signal_irq_m wmr;78 sc_signal<bool> signal_irq_mdma[8]; 83 79 sc_signal<bool> signal_irq_memc; 84 80 85 // Coprocessor signals86 CoprocSignals<uint32_t,uint8_t> signal_to_coproc[8];87 CoprocSignals<uint32_t,uint8_t> signal_from_coproc[8];88 sc_signal<uint32_t> signal_config_coproc[8];89 sc_signal<uint32_t> signal_status_coproc[8];90 91 81 // INT network DSPIN signals between DSPIN routers and DSPIN local_crossbars 92 82 DspinSignals<dspin_int_cmd_width> signal_int_dspin_cmd_l2g_d; … … 107 97 // INT network VCI signals between VCI components and VCI local crossbar 108 98 VciSignals<vci_param_int> signal_int_vci_ini_proc[8]; 109 VciSignals<vci_param_int> signal_int_vci_ini_m wmr;99 VciSignals<vci_param_int> signal_int_vci_ini_mdma; 110 100 VciSignals<vci_param_int> signal_int_vci_ini_iobx; 111 101 112 102 VciSignals<vci_param_int> signal_int_vci_tgt_memc; 113 103 VciSignals<vci_param_int> signal_int_vci_tgt_xicu; 114 VciSignals<vci_param_int> signal_int_vci_tgt_m wmr;104 VciSignals<vci_param_int> signal_int_vci_tgt_mdma; 115 105 VciSignals<vci_param_int> signal_int_vci_tgt_iobx; 116 106 … … 163 153 VciXicu<vci_param_int>* xicu; 164 154 165 VciMwmrDma<vci_param_int>* mwmr; 166 167 CoprocGcd* gcd; 168 CoprocDct* dct; 169 CoprocCpy* cpy; 155 VciMultiDma<vci_param_int>* mdma; 170 156 171 157 VciLocalCrossbar<vci_param_int>* int_xbar_d; … … 229 215 size_t int_memc_tgt_id, 230 216 size_t int_xicu_tgt_id, 231 size_t int_m wmr_tgt_id,217 size_t int_mdma_tgt_id, 232 218 size_t int_iobx_tgt_id, 233 219 size_t int_proc_ini_id, 234 size_t int_m wmr_ini_id,220 size_t int_mdma_ini_id, 235 221 size_t int_iobx_ini_id, 236 222 -
trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
r1050 r1051 15 15 #include "../include/tsar_iob_cluster.h" 16 16 17 #define MWR_COPROC_CPY 018 #define MWR_COPROC_DCT 119 #define MWR_COPROC_GCD 220 21 17 #define tmpl(x) \ 22 18 template<typename vci_param_int , typename vci_param_ext,\ … … 51 47 size_t int_memc_tgt_id, // local index 52 48 size_t int_xicu_tgt_id, // local index 53 size_t int_m wmr_tgt_id, // local index49 size_t int_mdma_tgt_id, // local index 54 50 size_t int_iobx_tgt_id, // local index 55 51 56 52 size_t int_proc_ini_id, // local index 57 size_t int_m wmr_ini_id, // local index53 size_t int_mdma_ini_id, // local index 58 54 size_t int_iobx_ini_id, // local index 59 55 … … 62 58 size_t ram_iobx_ini_id, // local index 63 59 64 bool is_io, // is IO cluster ( IOB)?60 bool is_io, // is IO cluster ( 65 61 size_t iox_iobx_tgt_id, // local_index 66 62 size_t iox_iobx_ini_id, // local index … … 213 209 xcu_nb_out); // number of output IRQs 214 210 215 //////////// MWMR controller and COPROC //////////////////////////////////////// 216 std::ostringstream s_mwmr; 217 std::ostringstream s_copro; 218 s_mwmr << "mwmr_" << x_id << "_" << y_id; 219 220 if ( coproc_type == MWR_COPROC_CPY) 221 { 222 s_copro << "cpy_" << x_id << "_" << y_id; 223 cpy = new CoprocCpy( s_copro.str().c_str(), 64 ); // burst size 224 225 mwmr = new VciMwmrDma<vci_param_int>( 226 s_mwmr.str().c_str(), 211 //////////// MDMA ////////////////////////////////////////////////////////////// 212 std::ostringstream s_mdma; 213 s_mdma << "mdma_" << x_id << "_" << y_id; 214 mdma = new VciMultiDma<vci_param_int>( 215 s_mdma.str().c_str(), 227 216 mt_int, 228 IntTab(cluster_id, int_mwmr_ini_id), // SRCID 229 IntTab(cluster_id, int_mwmr_tgt_id), // TGTID 230 1, // nb to_coproc ports 231 1, // nb from_coproc ports 232 1, // nb config registers 233 0, // nb status registers 234 64 ); // burst size (bytes) 235 } 236 if ( coproc_type == MWR_COPROC_DCT ) 237 { 238 s_copro << "dct_" << x_id << "_" << y_id; 239 dct = new CoprocDct( s_copro.str().c_str(), 64 , 16 ); // burst size / latency 240 241 mwmr = new VciMwmrDma<vci_param_int>( 242 s_mwmr.str().c_str(), 243 mt_int, 244 IntTab(cluster_id, int_mwmr_ini_id), // SRCID 245 IntTab(cluster_id, int_mwmr_tgt_id), // TGTID 246 1, // nb to_coproc ports 247 1, // nb from_coproc ports 248 1, // nb config registers 249 0, // nb status registers 250 64 ); // burst size (bytes) 251 } 252 if ( coproc_type == MWR_COPROC_GCD ) 253 { 254 s_copro << "gcd_" << x_id << "_" << y_id; 255 gcd = new CoprocGcd( s_copro.str().c_str(), 64 ); // burst size 256 257 mwmr = new VciMwmrDma<vci_param_int>( 258 s_mwmr.str().c_str(), 259 mt_int, 260 IntTab(cluster_id, int_mwmr_ini_id), // SRCID 261 IntTab(cluster_id, int_mwmr_tgt_id), // TGTID 262 2, // nb to_coproc ports 263 1, // nb from_coproc ports 264 1, // nb config registers 265 0, // nb status registers 266 64 ); // burst size (bytes) 267 } 217 IntTab(cluster_id, int_mdma_ini_id), // SRCID 218 IntTab(cluster_id, int_mdma_tgt_id), // TGTID 219 64, // burst size 220 nb_procs ); // number of channels 268 221 269 222 /////////// VCI INT_CMD/RSP LOCAL_XBAR ////////////////////////////////////// … … 526 479 for ( size_t i=0 ; i < xcu_nb_hwi ; i++) 527 480 { 528 if ( i == 0 ) xicu->p_hwi[i] (signal_irq_memc);529 else if ( i == 1 ) xicu->p_hwi[i] (signal_irq_mwmr);530 else xicu->p_hwi[i] (signal_false);481 if ( i == 0 ) xicu->p_hwi[i] (signal_irq_memc); 482 else if ( i < (nb_procs+1) ) xicu->p_hwi[i] (signal_irq_mdma[i-1]); 483 else xicu->p_hwi[i] (signal_false); 531 484 } 532 485 … … 566 519 std::cout << " - xram connected" << std::endl; 567 520 568 /////////////////////////////////// GCD coprocessor 569 if ( coproc_type == MWR_COPROC_GCD ) 570 { 571 gcd->p_clk (this->p_clk); 572 gcd->p_resetn (this->p_resetn); 573 gcd->p_opa (signal_to_coproc[0]); 574 gcd->p_opb (signal_to_coproc[1]); 575 gcd->p_res (signal_from_coproc[0]); 576 gcd->p_config (signal_config_coproc[0]); 577 578 mwmr->p_clk (this->p_clk); 579 mwmr->p_resetn (this->p_resetn); 580 mwmr->p_vci_target (signal_int_vci_tgt_mwmr); 581 mwmr->p_vci_initiator (signal_int_vci_ini_mwmr); 582 mwmr->p_to_coproc[0] (signal_to_coproc[0]); 583 mwmr->p_to_coproc[1] (signal_to_coproc[1]); 584 mwmr->p_from_coproc[0] (signal_from_coproc[0]); 585 mwmr->p_config[0] (signal_config_coproc[0]); 586 mwmr->p_irq (signal_irq_mwmr); 587 } 588 589 /////////////////////////////////// DCT coprocessor 590 if ( coproc_type == MWR_COPROC_DCT ) 591 { 592 dct->p_clk (this->p_clk); 593 dct->p_resetn (this->p_resetn); 594 dct->p_in (signal_to_coproc[0]); 595 dct->p_out (signal_from_coproc[0]); 596 dct->p_config (signal_config_coproc[0]); 597 598 mwmr->p_clk (this->p_clk); 599 mwmr->p_resetn (this->p_resetn); 600 mwmr->p_vci_target (signal_int_vci_tgt_mwmr); 601 mwmr->p_vci_initiator (signal_int_vci_ini_mwmr); 602 mwmr->p_to_coproc[0] (signal_to_coproc[0]); 603 mwmr->p_from_coproc[0] (signal_from_coproc[0]); 604 mwmr->p_config[0] (signal_config_coproc[0]); 605 mwmr->p_irq (signal_irq_mwmr); 606 } 607 608 std::cout << " - coproc connected" << std::endl; 609 610 /////////////////////////////////// CPY coprocessor 611 if ( coproc_type == MWR_COPROC_CPY ) 612 { 613 cpy->p_clk (this->p_clk); 614 cpy->p_resetn (this->p_resetn); 615 cpy->p_load (signal_to_coproc[0]); 616 cpy->p_store (signal_from_coproc[0]); 617 cpy->p_config (signal_config_coproc[0]); 618 619 mwmr->p_clk (this->p_clk); 620 mwmr->p_resetn (this->p_resetn); 621 mwmr->p_vci_target (signal_int_vci_tgt_mwmr); 622 mwmr->p_vci_initiator (signal_int_vci_ini_mwmr); 623 mwmr->p_to_coproc[0] (signal_to_coproc[0]); 624 mwmr->p_from_coproc[0] (signal_from_coproc[0]); 625 mwmr->p_config[0] (signal_config_coproc[0]); 626 mwmr->p_irq (signal_irq_mwmr); 627 } 521 /////////////////////////////////// MDMA 522 mdma->p_clk (this->p_clk); 523 mdma->p_resetn (this->p_resetn); 524 mdma->p_vci_target (signal_int_vci_tgt_mdma); 525 mdma->p_vci_initiator (signal_int_vci_ini_mdma); 526 for( size_t i = 0 ; i < nb_procs ; i++ ) 527 { 528 mdma->p_irq[i] (signal_irq_mdma[i]); 529 } 530 531 std::cout << " - mdma connected" << std::endl; 628 532 629 533 //////////////////////////// RAM NETWORK ROUTERS … … 712 616 int_xbar_d->p_to_target[int_memc_tgt_id] (signal_int_vci_tgt_memc); 713 617 int_xbar_d->p_to_target[int_xicu_tgt_id] (signal_int_vci_tgt_xicu); 714 int_xbar_d->p_to_target[int_m wmr_tgt_id] (signal_int_vci_tgt_mwmr);715 int_xbar_d->p_to_initiator[int_m wmr_ini_id] (signal_int_vci_ini_mwmr);618 int_xbar_d->p_to_target[int_mdma_tgt_id] (signal_int_vci_tgt_mdma); 619 int_xbar_d->p_to_initiator[int_mdma_ini_id] (signal_int_vci_ini_mdma); 716 620 for (size_t p = 0; p < nb_procs; p++) 717 621 int_xbar_d->p_to_initiator[int_proc_ini_id + p] (signal_int_vci_ini_proc[p]);
Note: See TracChangeset
for help on using the changeset viewer.