Changeset 379 for trunk/platforms/tsar_generic_xbar/top.cpp
- Timestamp:
- Apr 20, 2013, 6:32:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/top.cpp
r378 r379 16 16 // - It uses the vci_mem_cache 17 17 // - It contains one vci_xicu and one vci_multi_dma per cluster. 18 // - It contains one vci_simple ram per cluster to model the L3 cache. 18 19 // 19 20 // All clusters are identical, but the cluster containing address … … 27 28 // It is build with one single component implementing a cluster: 28 29 // The Tsarv4ClusterMmu component is defined in files 29 // tsar v4_cluster_mmu.* (with * = cpp, h, sd)30 // tsar_xbar_cluster.* (with * = cpp, h, sd) 30 31 // 31 32 // The IRQs are connected to XICUs as follow: … … 157 158 #define BDEV_IMAGE_NAME "giet_vm/display/images.raw" 158 159 159 #define NIC_RX_NAME "giet_vm/nic/rx_ data.txt"160 #define NIC_TX_NAME "giet_vm/nic/tx_ data.txt"160 #define NIC_RX_NAME "giet_vm/nic/rx_packets.txt" 161 #define NIC_TX_NAME "giet_vm/nic/tx_packets.txt" 161 162 #define NIC_TIMEOUT 10000 162 163 … … 426 427 } 427 428 std::cout << maptabd << std::endl; 428 429 /*430 WE DONT NEED any COHERENCE MAPPING TABLE, AS THE DIRECT NETWORK431 USES DIRECT ADRESSING (XID,YID,LID)432 433 // coherence network434 // - tgtid_c_proc = srcid_c_proc = local procid435 // - tgtid_c_memc = srcid_c_memc = NB_PROCS_MAX436 MappingTable maptabc(address_width,437 IntTab(x_width + y_width, srcid_width - x_width - y_width),438 IntTab(x_width + y_width, srcid_width - x_width - y_width),439 0x00FF0000);440 441 for (size_t x = 0; x < CLUSTER_X; x++)442 {443 for (size_t y = 0; y < CLUSTER_Y; y++)444 {445 sc_uint<address_width> offset = cluster(x,y) << (address_width-x_width-y_width);446 447 // cleanup requests must be routed to the memory cache448 std::ostringstream sh;449 sh << "c_seg_memc_" << x << "_" << y;450 maptabc.add(Segment(sh.str(), (NB_PROCS_MAX << (address_width - srcid_width)) + offset,451 0x10, IntTab(cluster(x,y), NB_PROCS_MAX), false));452 453 // update & invalidate requests must be routed to the proper processor454 for ( size_t p = 0 ; p < NB_PROCS_MAX ; p++)455 {456 std::ostringstream sp;457 sp << "c_seg_proc_" << x << "_" << y << "_" << p;458 maptabc.add( Segment( sp.str() , (p << (address_width - srcid_width)) + offset ,459 0x10 , IntTab(cluster(x,y), p) , false));460 }461 }462 }463 std::cout << maptabc << std::endl;464 465 */466 429 467 430 // external network … … 601 564 ); 602 565 566 std::cout << std::endl; 603 567 std::cout << "cluster_" << x << "_" << y << " constructed" << std::endl; 568 std::cout << std::endl; 569 604 570 #if USE_OPENMP 605 571 } // end critical … … 796 762 clusters[1][1]->signal_dspin_rsp_brom_t.print_trace("DIRECT rsp_out_brom_1_1"); 797 763 */ 764 // trace proc[debug_proc_id] 765 if ( debug_proc_id < (CLUSTER_X * CLUSTER_Y * NB_PROCS_MAX) ) 766 { 767 size_t l = debug_proc_id % (CLUSTER_X * CLUSTER_Y) ; 768 size_t y = (debug_proc_id / NB_PROCS_MAX) % CLUSTER_Y ; 769 size_t x = debug_proc_id / (CLUSTER_Y * NB_PROCS_MAX) ; 770 771 std::ostringstream signame; 772 signame << "VCI signal PROC_" << x << "_" << y << "_" << l; 773 774 clusters[x][y]->proc[l]->print_trace(); 775 clusters[x][y]->signal_vci_ini_proc[l].print_trace("signame"); 776 } 798 777 /* 799 // trace proc[debug_proc_id] 800 if ( debug_proc_id < (CLUSTER_X * CLUSTER_Y * NB_PROCS_MAX) ) 801 { 802 size_t proc_x = debug_proc_id / CLUSTER_Y; 803 size_t proc_y = debug_proc_id % CLUSTER_Y; 804 805 clusters[proc_x][proc_y]->proc[0]->print_trace(); 806 clusters[proc_x][proc_y]->signal_vci_ini_proc[0].print_trace("proc_0"); 807 } 808 809 // trace memc[debug_memc_id] 810 if ( debug_memc_id < (CLUSTER_X * CLUSTER_Y) ) 811 { 812 size_t memc_x = debug_memc_id / CLUSTER_Y; 813 size_t memc_y = debug_memc_id % CLUSTER_Y; 814 815 clusters[memc_x][memc_y]->memc->print_trace(); 816 clusters[memc_x][memc_y]->signal_vci_tgt_memc.print_trace("memc"); 817 } 778 // trace memc[debug_memc_id] 779 if ( debug_memc_id < (CLUSTER_X * CLUSTER_Y) ) 780 { 781 size_t x = debug_memc_id / CLUSTER_Y; 782 size_t y = debug_memc_id % CLUSTER_Y; 783 784 std::ostringstream signame; 785 signame << "VCI signal MEMC_" << x << "_" << y; 786 787 clusters[memc_x][memc_y]->memc->print_trace(); 788 clusters[memc_x][memc_y]->signal_vci_tgt_memc.print_trace("signame"); 789 } 818 790 */ 819 // clusters[0][0]->signal_vci_tgt_xicu.print_trace("xicu_0_0"); 820 // clusters[0][1]->signal_vci_tgt_xicu.print_trace("xicu_0_1"); 821 // clusters[1][0]->signal_vci_tgt_xicu.print_trace("xicu_1_0"); 822 // clusters[1][1]->signal_vci_tgt_xicu.print_trace("xicu_1_1"); 823 824 // if ( clusters[1][1]->signal_irq_mdma[0].read() ) 825 // std::cout << std::endl << " IRQ_DMA_1_1 activated" << std::endl; 826 // if ( clusters[1][1]->signal_proc_it[0].read() ) 827 // std::cout << " IRQ_PROC_1_1 activated" << std::endl << std::endl; 828 829 // trace ioc component 830 // size_t io_x = cluster_io_id / CLUSTER_Y; 831 // size_t io_y = cluster_io_id % CLUSTER_Y; 832 // clusters[io_x][io_y]->bdev->print_trace(); 833 // clusters[io_x][io_y]->signal_vci_tgt_bdev.print_trace("bdev_tgt "); 834 // clusters[io_x][io_y]->signal_vci_ini_bdev.print_trace("bdev_ini "); 835 836 // clusters[1][1]->mdma->print_trace(); 837 // clusters[1][1]->signal_vci_tgt_mdma.print_trace("mdma_1_1_tgt "); 838 // clusters[1][1]->signal_vci_ini_mdma.print_trace("mdma_1_1_ini "); 839 791 // trace external peripherals 792 size_t io_x = cluster_io_id / CLUSTER_Y; 793 size_t io_y = cluster_io_id % CLUSTER_Y; 794 795 clusters[io_x][io_y]->signal_vci_tgt_mtty.print_trace("VCI signal TTY"); 796 /* 797 clusters[io_x][io_y]->bdev->print_trace(); 798 clusters[io_x][io_y]->signal_vci_tgt_bdev.print_trace("VCI signal BDEV_TGT"); 799 clusters[io_x][io_y]->signal_vci_ini_bdev.print_trace("VCI signal BDEV_INI"); 800 */ 840 801 } 841 802
Note: See TracChangeset
for help on using the changeset viewer.