- Timestamp:
- Oct 7, 2013, 5:31:08 PM (11 years ago)
- Location:
- trunk/platforms/tsar_generic_xbar
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/top.cpp
r512 r547 125 125 #define cluster(x,y) (y + YMAX * x) 126 126 127 #define min(x, y) (x < y ? x : y) 128 127 129 /////////////////////////////////////////////////////////// 128 130 // DSPIN parameters … … 229 231 //////////////////////i///////////////////////////////////// 230 232 231 #define MAX_FROZEN_CYCLES 100000 233 #define MAX_FROZEN_CYCLES 1000000 232 234 233 235 ///////////////////////////////////////////////////////// … … 239 241 ///////////////////////////////////////////////////////// 240 242 241 // specific segments in "IO" cluster : absolute physical address 242 243 #define BROM_BASE 0x00BFC00000 244 #define BROM_SIZE 0x0000100000 // 1 Mbytes 245 246 #define FBUF_BASE 0x00B2000000 247 #define FBUF_SIZE (FBUF_X_SIZE * FBUF_Y_SIZE * 2) 248 249 #define BDEV_BASE 0x00B3000000 250 #define BDEV_SIZE 0x0000001000 // 4 Kbytes 251 252 #define MTTY_BASE 0x00B4000000 253 #define MTTY_SIZE 0x0000001000 // 4 Kbytes 254 255 #define MNIC_BASE 0x00B5000000 256 #define MNIC_SIZE 0x0000080000 // 512 Kbytes (for 8 channels) 257 258 #define CDMA_BASE 0x00B6000000 259 #define CDMA_SIZE 0x0000004000 * NB_CMA_CHANNELS 260 261 // replicated segments : address is incremented by a cluster offset 262 // offset = cluster(x,y) << (address_width-x_width-y_width); 263 264 #define MEMC_BASE 0x0000000000 265 #define MEMC_SIZE 0x0010000000 // 256 Mbytes per cluster 243 #ifdef USE_GIET 244 // specific segments in "IO" cluster : absolute physical address 245 #define BROM_BASE 0x00BFC00000 246 #define BROM_SIZE 0x0000100000 // 1 Mbytes 247 248 #define FBUF_BASE 0x00B2000000 249 #define FBUF_SIZE (FBUF_X_SIZE * FBUF_Y_SIZE * 2) 250 251 #define BDEV_BASE 0x00B3000000 252 #define BDEV_SIZE 0x0000001000 // 4 Kbytes 253 254 #define MTTY_BASE 0x00B4000000 255 #define MTTY_SIZE 0x0000001000 // 4 Kbytes 256 257 #define MNIC_BASE 0x00B5000000 258 #define MNIC_SIZE 0x0000080000 // 512 Kbytes (for 8 channels) 259 260 #define CDMA_BASE 0x00B6000000 261 #define CDMA_SIZE 0x0000004000 * NB_CMA_CHANNELS 262 263 // replicated segments : address is incremented by a cluster offset 264 // offset = cluster(x,y) << (address_width-x_width-y_width); 265 266 #define MEMC_BASE 0x0000000000 267 #define MEMC_SIZE 0x0010000000 // 256 Mbytes per cluster 268 269 #define XICU_BASE 0x00B0000000 270 #define XICU_SIZE 0x0000001000 // 4 Kbytes 271 272 #define MDMA_BASE 0x00B1000000 273 #define MDMA_SIZE 0x0000001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 274 275 #define SIMH_BASE 0x00B7000000 276 #define SIMH_SIZE 0x0000001000 277 #endif 266 278 267 279 #ifdef USE_ALMOS 268 #define XICU_BASE 0x0030000000 269 #endif 270 #ifdef USE_GIET 271 #define XICU_BASE 0x00B0000000 272 #endif 273 #define XICU_SIZE 0x0000001000 // 4 Kbytes 274 275 #ifdef USE_ALMOS 276 #define MDMA_BASE 0x0031000000 277 #endif 278 #ifdef USE_GIET 279 #define MDMA_BASE 0x00B1000000 280 #endif 281 #define MDMA_SIZE 0x0000001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 280 #define CLUSTER_INC (0x80000000ULL / (XMAX * YMAX) * 2) 281 282 #define MEMC_BASE 0x0000000000 283 #define MEMC_SIZE min(0x02000000, (0x80000000 / (XMAX * YMAX))) 284 285 #define BROM_BASE 0x00BFC00000 286 #define BROM_SIZE 0x0000100000 // 1 Mbytes 287 288 #define XICU_BASE (MEMC_SIZE) 289 #define XICU_SIZE 0x0000001000 // 4 Kbytes 290 291 #define MDMA_BASE (XICU_BASE + XICU_SIZE) 292 #define MDMA_SIZE 0x0000001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 293 294 #define BDEV_BASE ((cluster_io_id * (CLUSTER_INC)) + MDMA_BASE + MDMA_SIZE) 295 #define BDEV_SIZE 0x0000001000 // 4 Kbytes 296 297 #define MTTY_BASE (BDEV_BASE + BDEV_SIZE) 298 #define MTTY_SIZE 0x0000001000 // 4 Kbytes 299 300 #define FBUF_BASE (MTTY_BASE + MTTY_SIZE) 301 #define FBUF_SIZE (FBUF_X_SIZE * FBUF_Y_SIZE * 2) // Should be 0x80000 302 303 // Unused in almos 304 #define MNIC_BASE (FBUF_BASE + FBUF_SIZE) 305 #define MNIC_SIZE 0x0000001000 306 307 #define CDMA_BASE (MNIC_BASE + MNIC_SIZE) 308 #define CDMA_SIZE 0x0000004000 * NB_CMA_CHANNELS 309 310 #endif 311 282 312 283 313 //////////////////////////////////////////////////////////////////// … … 295 325 #define BROM_TGTID 7 296 326 #define CDMA_TGTID 8 327 #define SIMH_TGTID 9 297 328 298 329 bool stop_called = false; … … 438 469 std::cout << " - RAM_LATENCY = " << XRAM_LATENCY << std::endl; 439 470 std::cout << " - MAX_FROZEN = " << frozen_cycles << std::endl; 471 std::cout << "[PROCS] " << NB_PROCS_MAX * XMAX * YMAX << std::endl; 440 472 441 473 std::cout << std::endl; … … 498 530 // internal network 499 531 MappingTable maptabd(vci_address_width, 500 IntTab(x_width + y_width, 16- x_width - y_width),532 IntTab(x_width + y_width, 20 - x_width - y_width), 501 533 IntTab(x_width + y_width, vci_srcid_width - x_width - y_width), 502 0x00FF 000000);534 0x00FF800000); 503 535 504 536 for (size_t x = 0; x < XMAX; x++) … … 510 542 << (vci_address_width-x_width-y_width); 511 543 544 std::ostringstream si; 545 si << "seg_xicu_" << x << "_" << y; 546 maptabd.add(Segment(si.str(), XICU_BASE + offset, XICU_SIZE, 547 IntTab(cluster(x,y),XICU_TGTID), false)); 548 549 std::ostringstream sd; 550 sd << "seg_mdma_" << x << "_" << y; 551 maptabd.add(Segment(sd.str(), MDMA_BASE + offset, MDMA_SIZE, 552 IntTab(cluster(x,y),MDMA_TGTID), false)); 553 512 554 std::ostringstream sh; 513 555 sh << "seg_memc_" << x << "_" << y; 514 maptabd.add(Segment(sh.str(), MEMC_BASE+offset, MEMC_SIZE, 515 IntTab(cluster(x,y),MEMC_TGTID), true)); 516 517 std::ostringstream si; 518 si << "seg_xicu_" << x << "_" << y; 519 maptabd.add(Segment(si.str(), XICU_BASE+offset, XICU_SIZE, 520 IntTab(cluster(x,y),XICU_TGTID), false)); 521 522 std::ostringstream sd; 523 sd << "seg_mdma_" << x << "_" << y; 524 maptabd.add(Segment(sd.str(), MDMA_BASE+offset, MDMA_SIZE, 525 IntTab(cluster(x,y),MDMA_TGTID), false)); 556 maptabd.add(Segment(sh.str(), MEMC_BASE + offset, MEMC_SIZE, 557 IntTab(cluster(x,y),MEMC_TGTID), true)); 526 558 527 559 if ( cluster(x,y) == cluster_io_id ) … … 533 565 maptabd.add(Segment("seg_bdev", BDEV_BASE, BDEV_SIZE, 534 566 IntTab(cluster(x,y),BDEV_TGTID), false)); 567 maptabd.add(Segment("seg_brom", BROM_BASE, BROM_SIZE, 568 IntTab(cluster(x,y),BROM_TGTID), true)); 535 569 maptabd.add(Segment("seg_mnic", MNIC_BASE, MNIC_SIZE, 536 570 IntTab(cluster(x,y),MNIC_TGTID), false)); 537 571 maptabd.add(Segment("seg_cdma", CDMA_BASE, CDMA_SIZE, 538 572 IntTab(cluster(x,y),CDMA_TGTID), false)); 539 maptabd.add(Segment("seg_ brom", BROM_BASE, BROM_SIZE,540 IntTab(cluster(x,y), BROM_TGTID), true));573 maptabd.add(Segment("seg_simh", SIMH_BASE, SIMH_SIZE, 574 IntTab(cluster(x,y),SIMH_TGTID), false)); 541 575 } 542 576 } … … 562 596 sh << "x_seg_memc_" << x << "_" << y; 563 597 564 maptabx.add(Segment(sh.str(), MEMC_BASE +offset,598 maptabx.add(Segment(sh.str(), MEMC_BASE + offset, 565 599 MEMC_SIZE, IntTab(cluster(x,y)), false)); 566 600 } … … 670 704 CDMA_TGTID, 671 705 BDEV_TGTID, 706 SIMH_TGTID, 672 707 MEMC_WAYS, 673 708 MEMC_SETS, … … 981 1016 } 982 1017 1018 void voidhandler(int dummy = 0) {} 983 1019 984 1020 int sc_main (int argc, char *argv[]) 985 1021 { 986 1022 signal(SIGINT, handler); 1023 signal(SIGPIPE, voidhandler); 987 1024 988 1025 try { -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/metadata/tsar_xbar_cluster.sd
r475 r547 4 4 Module('caba:tsar_xbar_cluster', 5 5 classname = 'soclib::caba::TsarXbarCluster', 6 7 8 6 tmpl_parameters = [ 7 parameter.Int('dspin_cmd_width'), 8 parameter.Int('dspin_rsp_width'), 9 9 parameter.Module('vci_param_int', default = 'caba:vci_param', 10 10 cell_size = parameter.Reference('vci_data_width_int')), … … 13 13 ], 14 14 15 15 header_files = [ '../source/include/tsar_xbar_cluster.h', 16 16 ], 17 17 18 18 implementation_files = [ '../source/src/tsar_xbar_cluster.cpp', 19 19 ], 20 20 21 22 23 24 21 uses = [ 22 Uses('caba:base_module'), 23 Uses('common:mapping_table'), 24 Uses('common:iss2'), 25 25 26 26 Uses('caba:vci_cc_vcache_wrapper', 27 27 cell_size = parameter.Reference('vci_data_width_int'), 28 28 dspin_in_width = parameter.Reference('dspin_cmd_width'), … … 31 31 gdb_iss_t = 'common:mips32el'), 32 32 33 33 Uses('caba:vci_mem_cache', 34 34 memc_cell_size_int = parameter.Reference('vci_data_width_int'), 35 35 memc_cell_size_ext = parameter.Reference('vci_data_width_ext'), … … 37 37 dspin_out_width = parameter.Reference('dspin_cmd_width')), 38 38 39 39 Uses('caba:vci_simple_rom', 40 40 cell_size = parameter.Reference('vci_data_width_int')), 41 41 42 42 Uses('caba:vci_simple_ram', 43 43 cell_size = parameter.Reference('vci_data_width_ext')), 44 44 45 Uses('caba:vci_xicu',45 Uses('caba:vci_simple_ram', 46 46 cell_size = parameter.Reference('vci_data_width_int')), 47 47 48 Uses('caba:dspin_local_crossbar', 48 Uses('caba:vci_xicu', 49 cell_size = parameter.Reference('vci_data_width_int')), 50 51 Uses('caba:dspin_local_crossbar', 49 52 flit_width = parameter.Reference('dspin_cmd_width')), 50 53 51 54 Uses('caba:dspin_local_crossbar', 52 55 flit_width = parameter.Reference('dspin_rsp_width')), 53 56 54 57 Uses('caba:virtual_dspin_router', 55 58 flit_width = parameter.Reference('dspin_cmd_width')), 56 59 57 60 Uses('caba:virtual_dspin_router', 58 61 flit_width = parameter.Reference('dspin_rsp_width')), 59 62 60 63 Uses('caba:vci_multi_tty', 61 64 cell_size = parameter.Reference('vci_data_width_int')), 62 65 63 66 Uses('caba:vci_framebuffer', 64 67 cell_size = parameter.Reference('vci_data_width_int')), 65 68 66 69 Uses('caba:vci_multi_nic', 67 70 cell_size = parameter.Reference('vci_data_width_int')), 68 71 69 72 Uses('caba:vci_chbuf_dma', 70 73 cell_size = parameter.Reference('vci_data_width_int')), 71 74 72 75 Uses('caba:vci_block_device_tsar', 73 76 cell_size = parameter.Reference('vci_data_width_int')), 74 77 75 78 Uses('caba:vci_multi_dma', 76 79 cell_size = parameter.Reference('vci_data_width_int')), 77 80 78 81 Uses('caba:vci_dspin_target_wrapper', 79 82 cell_size = parameter.Reference('vci_data_width_int')), 80 83 81 84 Uses('caba:vci_dspin_initiator_wrapper', 82 85 cell_size = parameter.Reference('vci_data_width_int')), 83 86 84 Uses('common:elf_file_loader'),85 ],87 Uses('caba:vci_simhelper', 88 cell_size = parameter.Reference('vci_data_width_int')), 86 89 87 ports = [ 88 Port('caba:bit_in', 'p_resetn', auto = 'resetn'), 89 Port('caba:clock_in', 'p_clk', auto = 'clock'), 90 Port('caba:dspin_output', 'p_cmd_out', [4, 3], 90 Uses('common:elf_file_loader'), 91 ], 92 93 ports = [ 94 Port('caba:bit_in', 'p_resetn', auto = 'resetn'), 95 Port('caba:clock_in', 'p_clk', auto = 'clock'), 96 Port('caba:dspin_output', 'p_cmd_out', [4, 3], 91 97 dspin_data_size = parameter.Reference('dspin_cmd_width')), 92 98 Port('caba:dspin_input', 'p_cmd_in', [4, 3], 93 99 dspin_data_size = parameter.Reference('dspin_cmd_width')), 94 100 Port('caba:dspin_output', 'p_rsp_out', [4, 2], 95 101 dspin_data_size = parameter.Reference('dspin_rsp_width')), 96 102 Port('caba:dspin_input', 'p_rsp_in', [4, 2], 97 103 dspin_data_size = parameter.Reference('dspin_rsp_width')), 98 104 ], 99 105 ) 100 106 -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/include/tsar_xbar_cluster.h
r508 r547 35 35 #include "vci_mem_cache.h" 36 36 #include "vci_cc_vcache_wrapper.h" 37 #include "vci_simhelper.h" 37 38 38 39 namespace soclib { namespace caba { … … 96 97 VciSignals<vci_param_int> signal_vci_tgt_mnic; 97 98 VciSignals<vci_param_int> signal_vci_tgt_chbuf; 99 VciSignals<vci_param_int> signal_vci_tgt_simh; 98 100 99 101 // Direct DSPIN signals to local crossbars … … 125 127 DspinSignals<dspin_cmd_width> signal_dspin_cmd_chbuf_t; 126 128 DspinSignals<dspin_rsp_width> signal_dspin_rsp_chbuf_t; 129 DspinSignals<dspin_cmd_width> signal_dspin_cmd_simh_t; 130 DspinSignals<dspin_rsp_width> signal_dspin_rsp_simh_t; 127 131 128 132 // Coherence DSPIN signals to local crossbar … … 187 191 dspin_rsp_width>* wt_mtty; 188 192 193 VciSimhelper<vci_param_int>* simhelper; 194 195 VciDspinTargetWrapper<vci_param_int, 196 dspin_cmd_width, 197 dspin_rsp_width>* wt_simhelper; 198 199 189 200 VciFrameBuffer<vci_param_int>* fbuf; 190 201 … … 193 204 dspin_rsp_width>* wt_fbuf; 194 205 195 VciMultiNic<vci_param_int>* mnic; 206 // for almos 207 VciSimpleRom<vci_param_int>* mnic; 196 208 197 209 VciDspinTargetWrapper<vci_param_int, … … 249 261 size_t tgtid_chbuf, 250 262 size_t tgtid_bdev, 263 size_t tgtid_simh, 251 264 size_t memc_ways, 252 265 size_t memc_sets, -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
r512 r547 59 59 size_t tgtid_chbuf, 60 60 size_t tgtid_bdev, 61 size_t tgtid_simh, 61 62 size_t memc_ways, 62 63 size_t memc_sets, … … 222 223 { 223 224 nb_direct_initiators = nb_procs + 3; 224 nb_direct_targets = 9;225 nb_direct_targets = 10; 225 226 } 226 227 … … 357 358 358 359 ///////////////////////////////////////////// 359 int mac = 0xBEEF0000; 360 mnic = new VciMultiNic<vci_param_int>( 361 "mnic", 362 IntTab(cluster_id, tgtid_mnic), 363 mtd, 364 nic_channels, 365 nic_rx_name, 366 nic_tx_name, 367 mac, // mac_4 address 368 0xBABE ); // mac_2 address 360 // Commented for almos; we don't want the nic; replaced by a rom 361 //int mac = 0xBEEF0000; 362 //mnic = new VciMultiNic<vci_param_int>( 363 // "mnic", 364 // IntTab(cluster_id, tgtid_mnic), 365 // mtd, 366 // nic_channels, 367 // nic_rx_name, 368 // nic_tx_name, 369 // mac, // mac_4 address 370 // 0xBABE ); // mac_2 address 371 mnic = new VciSimpleRom<vci_param_int>( 372 "mnic", 373 IntTab(cluster_id, tgtid_mnic), 374 mtd, 375 loader); 369 376 370 377 wt_mnic = new VciDspinTargetWrapper<vci_param_int, … … 414 421 "wt_mtty", 415 422 x_width + y_width + l_width); 423 424 simhelper = new VciSimhelper<vci_param_int>( 425 "sim_helper", 426 IntTab(cluster_id, tgtid_simh), 427 mtd); 428 429 wt_simhelper = new VciDspinTargetWrapper<vci_param_int, 430 dspin_cmd_width, 431 dspin_rsp_width>( 432 "wt_simhelper", 433 x_width + y_width + l_width); 416 434 } 417 435 … … 479 497 xbar_cmd_d->p_local_out[tgtid_mnic] (signal_dspin_cmd_mnic_t); 480 498 xbar_cmd_d->p_local_out[tgtid_chbuf] (signal_dspin_cmd_chbuf_t); 499 xbar_cmd_d->p_local_out[tgtid_simh] (signal_dspin_cmd_simh_t); 481 500 482 501 xbar_cmd_d->p_local_in[nb_procs + 1] (signal_dspin_cmd_bdev_i); … … 509 528 xbar_rsp_d->p_local_in[tgtid_mnic] (signal_dspin_rsp_mnic_t); 510 529 xbar_rsp_d->p_local_in[tgtid_chbuf] (signal_dspin_rsp_chbuf_t); 530 xbar_rsp_d->p_local_in[tgtid_simh] (signal_dspin_rsp_simh_t); 511 531 512 532 xbar_rsp_d->p_local_out[nb_procs + 1] (signal_dspin_rsp_bdev_i); … … 706 726 for (size_t i = 0; i < nic_channels; i++) 707 727 { 708 mnic->p_rx_irq[i] (signal_irq_mnic_rx[i]);709 mnic->p_tx_irq[i] (signal_irq_mnic_tx[i]);728 //mnic->p_rx_irq[i] (signal_irq_mnic_rx[i]); 729 //mnic->p_tx_irq[i] (signal_irq_mnic_tx[i]); 710 730 } 711 731 … … 774 794 wt_mtty->p_dspin_rsp (signal_dspin_rsp_mtty_t); 775 795 wt_mtty->p_vci (signal_vci_tgt_mtty); 796 797 798 // Sim Helper 799 simhelper->p_clk (this->p_clk); 800 simhelper->p_resetn (this->p_resetn); 801 simhelper->p_vci (signal_vci_tgt_simh); 802 803 // wrapper tgt Sim Helper 804 wt_simhelper->p_clk (this->p_clk); 805 wt_simhelper->p_resetn (this->p_resetn); 806 wt_simhelper->p_dspin_cmd (signal_dspin_cmd_simh_t); 807 wt_simhelper->p_dspin_rsp (signal_dspin_rsp_simh_t); 808 wt_simhelper->p_vci (signal_vci_tgt_simh); 776 809 777 810 std::cout << " - MTTY connected" << std::endl; … … 831 864 delete mtty; 832 865 delete wt_mtty; 866 delete simhelper; 867 delete wt_simhelper; 833 868 } 834 869 }
Note: See TracChangeset
for help on using the changeset viewer.