Changeset 885 for trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster
- Timestamp:
- Nov 14, 2014, 11:05:54 AM (10 years ago)
- Location:
- trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/metadata/tsar_xbar_cluster.sd
r836 r885 56 56 flit_width = parameter.Reference('dspin_rsp_width')), 57 57 58 Uses('caba: virtual_dspin_router',58 Uses('caba:dspin_router', 59 59 flit_width = parameter.Reference('dspin_cmd_width')), 60 60 61 Uses('caba: virtual_dspin_router',61 Uses('caba:dspin_router', 62 62 flit_width = parameter.Reference('dspin_rsp_width')), 63 63 … … 95 95 Port('caba:bit_in', 'p_resetn', auto = 'resetn'), 96 96 Port('caba:clock_in', 'p_clk', auto = 'clock'), 97 Port('caba:dspin_output', 'p_cmd_out', [4, 3], 98 dspin_data_size = parameter.Reference('dspin_cmd_width')), 99 Port('caba:dspin_input', 'p_cmd_in', [4, 3], 100 dspin_data_size = parameter.Reference('dspin_cmd_width')), 101 Port('caba:dspin_output', 'p_rsp_out', [4, 2], 102 dspin_data_size = parameter.Reference('dspin_rsp_width')), 103 Port('caba:dspin_input', 'p_rsp_in', [4, 2], 104 dspin_data_size = parameter.Reference('dspin_rsp_width')), 97 98 Port('caba:dspin_output', 'p_cmd_out', [4], 99 dspin_data_size = parameter.Reference('dspin_cmd_width')), 100 Port('caba:dspin_input', 'p_cmd_in', [4], 101 dspin_data_size = parameter.Reference('dspin_cmd_width')), 102 103 Port('caba:dspin_output', 'p_rsp_out', [4], 104 dspin_data_size = parameter.Reference('dspin_rsp_width')), 105 Port('caba:dspin_input', 'p_rsp_in', [4], 106 dspin_data_size = parameter.Reference('dspin_rsp_width')), 107 108 Port('caba:dspin_output', 'p_m2p_out', [4], 109 dspin_data_size = parameter.Reference('dspin_cmd_width')), 110 Port('caba:dspin_input', 'p_m2p_in', [4], 111 dspin_data_size = parameter.Reference('dspin_cmd_width')), 112 113 Port('caba:dspin_output', 'p_p2m_out', [4], 114 dspin_data_size = parameter.Reference('dspin_rsp_width')), 115 Port('caba:dspin_input', 'p_p2m_in', [4], 116 dspin_data_size = parameter.Reference('dspin_rsp_width')), 117 118 Port('caba:dspin_output', 'p_cla_out', [4], 119 dspin_data_size = parameter.Reference('dspin_cmd_width')), 120 Port('caba:dspin_input', 'p_cla_in', [4], 121 dspin_data_size = parameter.Reference('dspin_cmd_width')), 105 122 ], 106 123 ) 107 124 108 125 -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/include/tsar_xbar_cluster.h
r752 r885 27 27 #include "vci_dspin_initiator_wrapper.h" 28 28 #include "vci_dspin_target_wrapper.h" 29 #include " virtual_dspin_router.h"29 #include "dspin_router.h" 30 30 #include "vci_multi_tty.h" 31 31 #include "vci_multi_nic.h" … … 56 56 sc_in<bool> p_clk; 57 57 sc_in<bool> p_resetn; 58 soclib::caba::DspinOutput<dspin_cmd_width> **p_cmd_out; 59 soclib::caba::DspinInput<dspin_cmd_width> **p_cmd_in; 60 soclib::caba::DspinOutput<dspin_rsp_width> **p_rsp_out; 61 soclib::caba::DspinInput<dspin_rsp_width> **p_rsp_in; 58 59 soclib::caba::DspinOutput<dspin_cmd_width> *p_cmd_out; 60 soclib::caba::DspinInput<dspin_cmd_width> *p_cmd_in; 61 62 soclib::caba::DspinOutput<dspin_rsp_width> *p_rsp_out; 63 soclib::caba::DspinInput<dspin_rsp_width> *p_rsp_in; 64 65 soclib::caba::DspinOutput<dspin_cmd_width> *p_m2p_out; 66 soclib::caba::DspinInput<dspin_cmd_width> *p_m2p_in; 67 68 soclib::caba::DspinOutput<dspin_rsp_width> *p_p2m_out; 69 soclib::caba::DspinInput<dspin_rsp_width> *p_p2m_in; 70 71 soclib::caba::DspinOutput<dspin_cmd_width> *p_cla_out; 72 soclib::caba::DspinInput<dspin_cmd_width> *p_cla_in; 62 73 63 74 // interrupt signals … … 143 154 VciFrameBuffer<vci_param_int>* fbuf; 144 155 145 VciMultiNic<vci_param_int>* mnic;156 VciMultiNic<vci_param_int>* mnic; 146 157 147 158 VciChbufDma<vci_param_int>* chbuf; … … 161 172 DspinLocalCrossbar<dspin_cmd_width>* xbar_clack_c; 162 173 163 VirtualDspinRouter<dspin_cmd_width>* router_cmd; 164 VirtualDspinRouter<dspin_rsp_width>* router_rsp; 174 DspinRouter<dspin_cmd_width>* router_cmd; 175 DspinRouter<dspin_rsp_width>* router_rsp; 176 DspinRouter<dspin_cmd_width>* router_m2p; 177 DspinRouter<dspin_rsp_width>* router_p2m; 178 DspinRouter<dspin_cmd_width>* router_cla; 165 179 166 180 TsarXbarCluster( sc_module_name insname, -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
r836 r885 91 91 n_procs = nb_procs; 92 92 93 // Vectors of ports definition 94 p_cmd_in = alloc_elems<DspinInput<dspin_cmd_width> > ("p_cmd_in", 4, 3); 95 p_cmd_out = alloc_elems<DspinOutput<dspin_cmd_width> > ("p_cmd_out", 4, 3); 96 p_rsp_in = alloc_elems<DspinInput<dspin_rsp_width> > ("p_rsp_in", 4, 2); 97 p_rsp_out = alloc_elems<DspinOutput<dspin_rsp_width> > ("p_rsp_out", 4, 2); 93 ///////////////////////////////////////////////////////////////////////////// 94 // Vectors of ports definition and allocation 95 ///////////////////////////////////////////////////////////////////////////// 96 97 p_cmd_in = alloc_elems<DspinInput<dspin_cmd_width> > ("p_cmd_in", 4); 98 p_cmd_out = alloc_elems<DspinOutput<dspin_cmd_width> > ("p_cmd_out", 4); 99 100 p_rsp_in = alloc_elems<DspinInput<dspin_rsp_width> > ("p_rsp_in", 4); 101 p_rsp_out = alloc_elems<DspinOutput<dspin_rsp_width> > ("p_rsp_out", 4); 102 103 p_m2p_in = alloc_elems<DspinInput<dspin_cmd_width> > ("p_m2p_in", 4); 104 p_m2p_out = alloc_elems<DspinOutput<dspin_cmd_width> > ("p_m2p_out", 4); 105 106 p_p2m_in = alloc_elems<DspinInput<dspin_rsp_width> > ("p_p2m_in", 4); 107 p_p2m_out = alloc_elems<DspinOutput<dspin_rsp_width> > ("p_p2m_out", 4); 108 109 p_cla_in = alloc_elems<DspinInput<dspin_cmd_width> > ("p_cla_in", 4); 110 p_cla_out = alloc_elems<DspinOutput<dspin_cmd_width> > ("p_cla_out", 4); 98 111 99 112 ///////////////////////////////////////////////////////////////////////////// … … 174 187 32, // number of hard IRQs 175 188 32, // number of soft IRQs 176 nb_procs *irq_per_processor);// number of output IRQs189 nb_procs * irq_per_processor); // number of output IRQs 177 190 178 191 … … 262 275 263 276 ///////////////////////////////////////////////////////////////////////////// 264 router_cmd = new VirtualDspinRouter<dspin_cmd_width>( 265 "router_cmd", 277 std::ostringstream s_router_cmd; 278 s_router_cmd << "router_cmd_" << x_id << "_" << y_id; 279 router_cmd = new DspinRouter<dspin_cmd_width>( 280 s_router_cmd.str().c_str(), 266 281 x_id,y_id, // coordinate in the mesh 267 282 x_width, y_width, // x & y fields width 268 3, // nb virtual channels269 283 4,4); // input & output fifo depths 270 284 271 285 ///////////////////////////////////////////////////////////////////////////// 272 router_rsp = new VirtualDspinRouter<dspin_rsp_width>( 273 "router_rsp", 286 std::ostringstream s_router_rsp; 287 s_router_rsp << "router_rsp_" << x_id << "_" << y_id; 288 router_rsp = new DspinRouter<dspin_rsp_width>( 289 s_router_rsp.str().c_str(), 274 290 x_id,y_id, // coordinates in mesh 275 291 x_width, y_width, // x & y fields width 276 2, // nb virtual channels 292 4,4); // input & output fifo depths 293 294 ///////////////////////////////////////////////////////////////////////////// 295 std::ostringstream s_router_m2p; 296 s_router_m2p << "router_m2p_" << x_id << "_" << y_id; 297 router_m2p = new DspinRouter<dspin_cmd_width>( 298 s_router_m2p.str().c_str(), 299 x_id,y_id, // coordinate in the mesh 300 x_width, y_width, // x & y fields width 301 4,4, // input & output fifo depths 302 true); // broadcast supported 303 304 ///////////////////////////////////////////////////////////////////////////// 305 std::ostringstream s_router_p2m; 306 s_router_p2m << "router_p2m_" << x_id << "_" << y_id; 307 router_p2m = new DspinRouter<dspin_rsp_width>( 308 s_router_p2m.str().c_str(), 309 x_id,y_id, // coordinates in mesh 310 x_width, y_width, // x & y fields width 311 4,4); // input & output fifo depths 312 313 ///////////////////////////////////////////////////////////////////////////// 314 std::ostringstream s_router_cla; 315 s_router_cla << "router_cla_" << x_id << "_" << y_id; 316 router_cla = new DspinRouter<dspin_cmd_width>( 317 s_router_cla.str().c_str(), 318 x_id,y_id, // coordinate in the mesh 319 x_width, y_width, // x & y fields width 277 320 4,4); // input & output fifo depths 278 321 … … 350 393 //////////////////////////////////// 351 394 352 //////////////////////// CMD ROUTER and RSP ROUTER 353 router_cmd->p_clk (this->p_clk); 354 router_cmd->p_resetn (this->p_resetn); 355 router_rsp->p_clk (this->p_clk); 356 router_rsp->p_resetn (this->p_resetn); 357 358 for (int i = 0; i < 4; i++) 359 { 360 for (int k = 0; k < 3; k++) 361 { 362 router_cmd->p_out[i][k] (this->p_cmd_out[i][k]); 363 router_cmd->p_in[i][k] (this->p_cmd_in[i][k]); 364 } 365 366 for (int k = 0; k < 2; k++) 367 { 368 router_rsp->p_out[i][k] (this->p_rsp_out[i][k]); 369 router_rsp->p_in[i][k] (this->p_rsp_in[i][k]); 370 } 371 } 372 373 router_cmd->p_out[4][0] (signal_dspin_cmd_g2l_d); 374 router_cmd->p_out[4][1] (signal_dspin_m2p_g2l_c); 375 router_cmd->p_out[4][2] (signal_dspin_clack_g2l_c); 376 router_cmd->p_in[4][0] (signal_dspin_cmd_l2g_d); 377 router_cmd->p_in[4][1] (signal_dspin_m2p_l2g_c); 378 router_cmd->p_in[4][2] (signal_dspin_clack_l2g_c); 379 380 router_rsp->p_out[4][0] (signal_dspin_rsp_g2l_d); 381 router_rsp->p_out[4][1] (signal_dspin_p2m_g2l_c); 382 router_rsp->p_in[4][0] (signal_dspin_rsp_l2g_d); 383 router_rsp->p_in[4][1] (signal_dspin_p2m_l2g_c); 384 385 386 std::cout << " - CMD & RSP routers connected" << std::endl; 395 //////////////////////// ROUTERS 396 router_cmd->p_clk (this->p_clk); 397 router_cmd->p_resetn (this->p_resetn); 398 router_rsp->p_clk (this->p_clk); 399 router_rsp->p_resetn (this->p_resetn); 400 router_m2p->p_clk (this->p_clk); 401 router_m2p->p_resetn (this->p_resetn); 402 router_p2m->p_clk (this->p_clk); 403 router_p2m->p_resetn (this->p_resetn); 404 router_cla->p_clk (this->p_clk); 405 router_cla->p_resetn (this->p_resetn); 406 407 // loop on N/S/E/W ports 408 for (size_t i = 0; i < 4; i++) 409 { 410 router_cmd->p_out[i] (this->p_cmd_out[i]); 411 router_cmd->p_in[i] (this->p_cmd_in[i]); 412 413 router_rsp->p_out[i] (this->p_rsp_out[i]); 414 router_rsp->p_in[i] (this->p_rsp_in[i]); 415 416 router_m2p->p_out[i] (this->p_m2p_out[i]); 417 router_m2p->p_in[i] (this->p_m2p_in[i]); 418 419 router_p2m->p_out[i] (this->p_p2m_out[i]); 420 router_p2m->p_in[i] (this->p_p2m_in[i]); 421 422 router_cla->p_out[i] (this->p_cla_out[i]); 423 router_cla->p_in[i] (this->p_cla_in[i]); 424 } 425 426 router_cmd->p_out[4] (signal_dspin_cmd_g2l_d); 427 router_cmd->p_in[4] (signal_dspin_cmd_l2g_d); 428 429 router_rsp->p_out[4] (signal_dspin_rsp_g2l_d); 430 router_rsp->p_in[4] (signal_dspin_rsp_l2g_d); 431 432 router_m2p->p_out[4] (signal_dspin_m2p_g2l_c); 433 router_m2p->p_in[4] (signal_dspin_m2p_l2g_c); 434 435 router_p2m->p_out[4] (signal_dspin_p2m_g2l_c); 436 router_p2m->p_in[4] (signal_dspin_p2m_l2g_c); 437 438 router_cla->p_out[4] (signal_dspin_clack_g2l_c); 439 router_cla->p_in[4] (signal_dspin_clack_l2g_c); 440 441 std::cout << " - routers connected" << std::endl; 387 442 388 443 wi_xbar_d->p_clk (this->p_clk); … … 633 688 vci_param_ext>::~TsarXbarCluster() { 634 689 635 dealloc_elems<DspinInput<dspin_cmd_width> > (p_cmd_in, 4, 3); 636 dealloc_elems<DspinOutput<dspin_cmd_width> >(p_cmd_out, 4, 3); 637 dealloc_elems<DspinInput<dspin_rsp_width> > (p_rsp_in, 4, 2); 638 dealloc_elems<DspinOutput<dspin_rsp_width> >(p_rsp_out, 4, 2); 690 dealloc_elems<DspinInput<dspin_cmd_width> > (p_cmd_in, 4); 691 dealloc_elems<DspinOutput<dspin_cmd_width> >(p_cmd_out, 4); 692 693 dealloc_elems<DspinInput<dspin_rsp_width> > (p_rsp_in, 4); 694 dealloc_elems<DspinOutput<dspin_rsp_width> >(p_rsp_out, 4); 695 696 dealloc_elems<DspinInput<dspin_cmd_width> > (p_m2p_in, 4); 697 dealloc_elems<DspinOutput<dspin_cmd_width> >(p_m2p_out, 4); 698 699 dealloc_elems<DspinInput<dspin_rsp_width> > (p_p2m_in, 4); 700 dealloc_elems<DspinOutput<dspin_rsp_width> >(p_p2m_out, 4); 701 702 dealloc_elems<DspinInput<dspin_cmd_width> > (p_cla_in, 4); 703 dealloc_elems<DspinOutput<dspin_cmd_width> >(p_cla_out, 4); 639 704 640 705 for (size_t p = 0; p < n_procs; p++) … … 701 766 702 767 } 703 704 705 706 768 707 769 }}
Note: See TracChangeset
for help on using the changeset viewer.