Changeset 885 for trunk/platforms/tsar_generic_xbar
- Timestamp:
- Nov 14, 2014, 11:05:54 AM (10 years ago)
- Location:
- trunk/platforms/tsar_generic_xbar
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/top.cpp
r836 r885 654 654 655 655 // Horizontal inter-clusters DSPIN signals 656 DspinSignals<dspin_cmd_width>*** signal_dspin_h_cmd_inc = 657 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cmd_inc", X_SIZE-1, Y_SIZE, 3); 658 DspinSignals<dspin_cmd_width>*** signal_dspin_h_cmd_dec = 659 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cmd_dec", X_SIZE-1, Y_SIZE, 3); 660 DspinSignals<dspin_rsp_width>*** signal_dspin_h_rsp_inc = 661 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_inc", X_SIZE-1, Y_SIZE, 2); 662 DspinSignals<dspin_rsp_width>*** signal_dspin_h_rsp_dec = 663 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_dec", X_SIZE-1, Y_SIZE, 2); 656 DspinSignals<dspin_cmd_width>** signal_dspin_h_cmd_inc = 657 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cmd_inc", X_SIZE-1, Y_SIZE); 658 DspinSignals<dspin_cmd_width>** signal_dspin_h_cmd_dec = 659 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cmd_dec", X_SIZE-1, Y_SIZE); 660 661 DspinSignals<dspin_rsp_width>** signal_dspin_h_rsp_inc = 662 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_inc", X_SIZE-1, Y_SIZE); 663 DspinSignals<dspin_rsp_width>** signal_dspin_h_rsp_dec = 664 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_dec", X_SIZE-1, Y_SIZE); 665 666 DspinSignals<dspin_cmd_width>** signal_dspin_h_m2p_inc = 667 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_m2p_inc", X_SIZE-1, Y_SIZE); 668 DspinSignals<dspin_cmd_width>** signal_dspin_h_m2p_dec = 669 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_m2p_dec", X_SIZE-1, Y_SIZE); 670 671 DspinSignals<dspin_rsp_width>** signal_dspin_h_p2m_inc = 672 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_p2m_inc", X_SIZE-1, Y_SIZE); 673 DspinSignals<dspin_rsp_width>** signal_dspin_h_p2m_dec = 674 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_p2m_dec", X_SIZE-1, Y_SIZE); 675 676 DspinSignals<dspin_cmd_width>** signal_dspin_h_cla_inc = 677 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cla_inc", X_SIZE-1, Y_SIZE); 678 DspinSignals<dspin_cmd_width>** signal_dspin_h_cla_dec = 679 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cla_dec", X_SIZE-1, Y_SIZE); 664 680 665 681 // Vertical inter-clusters DSPIN signals 666 DspinSignals<dspin_cmd_width>*** signal_dspin_v_cmd_inc = 667 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cmd_inc", X_SIZE, Y_SIZE-1, 3); 668 DspinSignals<dspin_cmd_width>*** signal_dspin_v_cmd_dec = 669 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cmd_dec", X_SIZE, Y_SIZE-1, 3); 670 DspinSignals<dspin_rsp_width>*** signal_dspin_v_rsp_inc = 671 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_inc", X_SIZE, Y_SIZE-1, 2); 672 DspinSignals<dspin_rsp_width>*** signal_dspin_v_rsp_dec = 673 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_dec", X_SIZE, Y_SIZE-1, 2); 674 675 // Mesh boundaries DSPIN signals 676 DspinSignals<dspin_cmd_width>**** signal_dspin_false_cmd_in = 677 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_in" , X_SIZE, Y_SIZE, 4, 3); 678 DspinSignals<dspin_cmd_width>**** signal_dspin_false_cmd_out = 679 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_out", X_SIZE, Y_SIZE, 4, 3); 680 DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_in = 681 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_in" , X_SIZE, Y_SIZE, 4, 2); 682 DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_out = 683 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_out", X_SIZE, Y_SIZE, 4, 2); 682 DspinSignals<dspin_cmd_width>** signal_dspin_v_cmd_inc = 683 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cmd_inc", X_SIZE, Y_SIZE-1); 684 DspinSignals<dspin_cmd_width>** signal_dspin_v_cmd_dec = 685 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cmd_dec", X_SIZE, Y_SIZE-1); 686 687 DspinSignals<dspin_rsp_width>** signal_dspin_v_rsp_inc = 688 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_inc", X_SIZE, Y_SIZE-1); 689 DspinSignals<dspin_rsp_width>** signal_dspin_v_rsp_dec = 690 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_dec", X_SIZE, Y_SIZE-1); 691 692 DspinSignals<dspin_cmd_width>** signal_dspin_v_m2p_inc = 693 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_m2p_inc", X_SIZE, Y_SIZE-1); 694 DspinSignals<dspin_cmd_width>** signal_dspin_v_m2p_dec = 695 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_m2p_dec", X_SIZE, Y_SIZE-1); 696 697 DspinSignals<dspin_rsp_width>** signal_dspin_v_p2m_inc = 698 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_p2m_inc", X_SIZE, Y_SIZE-1); 699 DspinSignals<dspin_rsp_width>** signal_dspin_v_p2m_dec = 700 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_p2m_dec", X_SIZE, Y_SIZE-1); 701 702 DspinSignals<dspin_cmd_width>** signal_dspin_v_cla_inc = 703 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cla_inc", X_SIZE, Y_SIZE-1); 704 DspinSignals<dspin_cmd_width>** signal_dspin_v_cla_dec = 705 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cla_dec", X_SIZE, Y_SIZE-1); 706 707 // Mesh boundaries DSPIN signals (Most of those signals are not used...) 708 DspinSignals<dspin_cmd_width>*** signal_dspin_bound_cmd_in = 709 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_cmd_in" , X_SIZE, Y_SIZE, 4); 710 DspinSignals<dspin_cmd_width>*** signal_dspin_bound_cmd_out = 711 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_cmd_out", X_SIZE, Y_SIZE, 4); 712 713 DspinSignals<dspin_rsp_width>*** signal_dspin_bound_rsp_in = 714 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_bound_rsp_in" , X_SIZE, Y_SIZE, 4); 715 DspinSignals<dspin_rsp_width>*** signal_dspin_bound_rsp_out = 716 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_bound_rsp_out", X_SIZE, Y_SIZE, 4); 717 718 DspinSignals<dspin_cmd_width>*** signal_dspin_bound_m2p_in = 719 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_m2p_in" , X_SIZE, Y_SIZE, 4); 720 DspinSignals<dspin_cmd_width>*** signal_dspin_bound_m2p_out = 721 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_m2p_out", X_SIZE, Y_SIZE, 4); 722 723 DspinSignals<dspin_rsp_width>*** signal_dspin_bound_p2m_in = 724 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_bound_p2m_in" , X_SIZE, Y_SIZE, 4); 725 DspinSignals<dspin_rsp_width>*** signal_dspin_bound_p2m_out = 726 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_bound_p2m_out", X_SIZE, Y_SIZE, 4); 727 728 DspinSignals<dspin_cmd_width>*** signal_dspin_bound_cla_in = 729 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_cla_in" , X_SIZE, Y_SIZE, 4); 730 DspinSignals<dspin_cmd_width>*** signal_dspin_bound_cla_out = 731 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_cla_out", X_SIZE, Y_SIZE, 4); 732 684 733 685 734 //////////////////////////// … … 794 843 795 844 // Inter Clusters horizontal connections 796 if (X_SIZE > 1){ 797 for (size_t x = 0; x < (X_SIZE-1); x++){ 798 for (size_t y = 0; y < Y_SIZE; y++){ 799 for (size_t k = 0; k < 3; k++){ 800 clusters[x][y]->p_cmd_out[EAST][k] (signal_dspin_h_cmd_inc[x][y][k]); 801 clusters[x+1][y]->p_cmd_in[WEST][k] (signal_dspin_h_cmd_inc[x][y][k]); 802 clusters[x][y]->p_cmd_in[EAST][k] (signal_dspin_h_cmd_dec[x][y][k]); 803 clusters[x+1][y]->p_cmd_out[WEST][k] (signal_dspin_h_cmd_dec[x][y][k]); 804 } 805 806 for (size_t k = 0; k < 2; k++){ 807 clusters[x][y]->p_rsp_out[EAST][k] (signal_dspin_h_rsp_inc[x][y][k]); 808 clusters[x+1][y]->p_rsp_in[WEST][k] (signal_dspin_h_rsp_inc[x][y][k]); 809 clusters[x][y]->p_rsp_in[EAST][k] (signal_dspin_h_rsp_dec[x][y][k]); 810 clusters[x+1][y]->p_rsp_out[WEST][k] (signal_dspin_h_rsp_dec[x][y][k]); 811 } 812 } 813 } 814 } 815 std::cout << std::endl << "Horizontal connections established" << std::endl; 845 if (X_SIZE > 1) { 846 for (size_t x = 0; x < (X_SIZE-1); x++) { 847 for (size_t y = 0; y < (Y_SIZE); y++) { 848 clusters[x][y]->p_cmd_out[EAST] (signal_dspin_h_cmd_inc[x][y]); 849 clusters[x+1][y]->p_cmd_in[WEST] (signal_dspin_h_cmd_inc[x][y]); 850 clusters[x][y]->p_cmd_in[EAST] (signal_dspin_h_cmd_dec[x][y]); 851 clusters[x+1][y]->p_cmd_out[WEST] (signal_dspin_h_cmd_dec[x][y]); 852 853 clusters[x][y]->p_rsp_out[EAST] (signal_dspin_h_rsp_inc[x][y]); 854 clusters[x+1][y]->p_rsp_in[WEST] (signal_dspin_h_rsp_inc[x][y]); 855 clusters[x][y]->p_rsp_in[EAST] (signal_dspin_h_rsp_dec[x][y]); 856 clusters[x+1][y]->p_rsp_out[WEST] (signal_dspin_h_rsp_dec[x][y]); 857 858 clusters[x][y]->p_m2p_out[EAST] (signal_dspin_h_m2p_inc[x][y]); 859 clusters[x+1][y]->p_m2p_in[WEST] (signal_dspin_h_m2p_inc[x][y]); 860 clusters[x][y]->p_m2p_in[EAST] (signal_dspin_h_m2p_dec[x][y]); 861 clusters[x+1][y]->p_m2p_out[WEST] (signal_dspin_h_m2p_dec[x][y]); 862 863 clusters[x][y]->p_p2m_out[EAST] (signal_dspin_h_p2m_inc[x][y]); 864 clusters[x+1][y]->p_p2m_in[WEST] (signal_dspin_h_p2m_inc[x][y]); 865 clusters[x][y]->p_p2m_in[EAST] (signal_dspin_h_p2m_dec[x][y]); 866 clusters[x+1][y]->p_p2m_out[WEST] (signal_dspin_h_p2m_dec[x][y]); 867 868 clusters[x][y]->p_cla_out[EAST] (signal_dspin_h_cla_inc[x][y]); 869 clusters[x+1][y]->p_cla_in[WEST] (signal_dspin_h_cla_inc[x][y]); 870 clusters[x][y]->p_cla_in[EAST] (signal_dspin_h_cla_dec[x][y]); 871 clusters[x+1][y]->p_cla_out[WEST] (signal_dspin_h_cla_dec[x][y]); 872 } 873 } 874 } 875 std::cout << std::endl << "Horizontal connections done" << std::endl; 816 876 817 877 // Inter Clusters vertical connections 818 878 if (Y_SIZE > 1) { 819 for (size_t y = 0; y < (Y_SIZE-1); y++){ 820 for (size_t x = 0; x < X_SIZE; x++){ 821 for (size_t k = 0; k < 3; k++){ 822 clusters[x][y]->p_cmd_out[NORTH][k] (signal_dspin_v_cmd_inc[x][y][k]); 823 clusters[x][y+1]->p_cmd_in[SOUTH][k] (signal_dspin_v_cmd_inc[x][y][k]); 824 clusters[x][y]->p_cmd_in[NORTH][k] (signal_dspin_v_cmd_dec[x][y][k]); 825 clusters[x][y+1]->p_cmd_out[SOUTH][k] (signal_dspin_v_cmd_dec[x][y][k]); 826 } 827 828 for (size_t k = 0; k < 2; k++){ 829 clusters[x][y]->p_rsp_out[NORTH][k] (signal_dspin_v_rsp_inc[x][y][k]); 830 clusters[x][y+1]->p_rsp_in[SOUTH][k] (signal_dspin_v_rsp_inc[x][y][k]); 831 clusters[x][y]->p_rsp_in[NORTH][k] (signal_dspin_v_rsp_dec[x][y][k]); 832 clusters[x][y+1]->p_rsp_out[SOUTH][k] (signal_dspin_v_rsp_dec[x][y][k]); 833 } 834 } 835 } 836 } 837 std::cout << "Vertical connections established" << std::endl; 879 for (size_t y = 0; y < (Y_SIZE-1); y++) { 880 for (size_t x = 0; x < X_SIZE; x++) { 881 clusters[x][y]->p_cmd_out[NORTH] (signal_dspin_v_cmd_inc[x][y]); 882 clusters[x][y+1]->p_cmd_in[SOUTH] (signal_dspin_v_cmd_inc[x][y]); 883 clusters[x][y]->p_cmd_in[NORTH] (signal_dspin_v_cmd_dec[x][y]); 884 clusters[x][y+1]->p_cmd_out[SOUTH] (signal_dspin_v_cmd_dec[x][y]); 885 886 clusters[x][y]->p_rsp_out[NORTH] (signal_dspin_v_rsp_inc[x][y]); 887 clusters[x][y+1]->p_rsp_in[SOUTH] (signal_dspin_v_rsp_inc[x][y]); 888 clusters[x][y]->p_rsp_in[NORTH] (signal_dspin_v_rsp_dec[x][y]); 889 clusters[x][y+1]->p_rsp_out[SOUTH] (signal_dspin_v_rsp_dec[x][y]); 890 891 clusters[x][y]->p_m2p_out[NORTH] (signal_dspin_v_m2p_inc[x][y]); 892 clusters[x][y+1]->p_m2p_in[SOUTH] (signal_dspin_v_m2p_inc[x][y]); 893 clusters[x][y]->p_m2p_in[NORTH] (signal_dspin_v_m2p_dec[x][y]); 894 clusters[x][y+1]->p_m2p_out[SOUTH] (signal_dspin_v_m2p_dec[x][y]); 895 896 clusters[x][y]->p_p2m_out[NORTH] (signal_dspin_v_p2m_inc[x][y]); 897 clusters[x][y+1]->p_p2m_in[SOUTH] (signal_dspin_v_p2m_inc[x][y]); 898 clusters[x][y]->p_p2m_in[NORTH] (signal_dspin_v_p2m_dec[x][y]); 899 clusters[x][y+1]->p_p2m_out[SOUTH] (signal_dspin_v_p2m_dec[x][y]); 900 901 clusters[x][y]->p_cla_out[NORTH] (signal_dspin_v_cla_inc[x][y]); 902 clusters[x][y+1]->p_cla_in[SOUTH] (signal_dspin_v_cla_inc[x][y]); 903 clusters[x][y]->p_cla_in[NORTH] (signal_dspin_v_cla_dec[x][y]); 904 clusters[x][y+1]->p_cla_out[SOUTH] (signal_dspin_v_cla_dec[x][y]); 905 } 906 } 907 } 908 std::cout << std::endl << "Vertical connections done" << std::endl; 838 909 839 910 // East & West boundary cluster connections 840 for (size_t y = 0; y < Y_SIZE; y++) 841 { 842 for (size_t k = 0; k < 3; k++) 843 { 844 clusters[0][y]->p_cmd_in[WEST][k] (signal_dspin_false_cmd_in [0][y][WEST][k]); 845 clusters[0][y]->p_cmd_out[WEST][k] (signal_dspin_false_cmd_out[0][y][WEST][k]); 846 clusters[X_SIZE-1][y]->p_cmd_in[EAST][k] (signal_dspin_false_cmd_in [X_SIZE-1][y][EAST][k]); 847 clusters[X_SIZE-1][y]->p_cmd_out[EAST][k](signal_dspin_false_cmd_out[X_SIZE-1][y][EAST][k]); 848 } 849 850 for (size_t k = 0; k < 2; k++) 851 { 852 clusters[0][y]->p_rsp_in[WEST][k] (signal_dspin_false_rsp_in [0][y][WEST][k]); 853 clusters[0][y]->p_rsp_out[WEST][k] (signal_dspin_false_rsp_out[0][y][WEST][k]); 854 clusters[X_SIZE-1][y]->p_rsp_in[EAST][k] (signal_dspin_false_rsp_in [X_SIZE-1][y][EAST][k]); 855 clusters[X_SIZE-1][y]->p_rsp_out[EAST][k](signal_dspin_false_rsp_out[X_SIZE-1][y][EAST][k]); 856 } 857 } 911 for (size_t y = 0; y < (Y_SIZE); y++) { 912 clusters[0][y]->p_cmd_in[WEST] (signal_dspin_bound_cmd_in[0][y][WEST]); 913 clusters[0][y]->p_cmd_out[WEST] (signal_dspin_bound_cmd_out[0][y][WEST]); 914 clusters[X_SIZE-1][y]->p_cmd_in[EAST] (signal_dspin_bound_cmd_in[X_SIZE-1][y][EAST]); 915 clusters[X_SIZE-1][y]->p_cmd_out[EAST] (signal_dspin_bound_cmd_out[X_SIZE-1][y][EAST]); 916 917 clusters[0][y]->p_rsp_in[WEST] (signal_dspin_bound_rsp_in[0][y][WEST]); 918 clusters[0][y]->p_rsp_out[WEST] (signal_dspin_bound_rsp_out[0][y][WEST]); 919 clusters[X_SIZE-1][y]->p_rsp_in[EAST] (signal_dspin_bound_rsp_in[X_SIZE-1][y][EAST]); 920 clusters[X_SIZE-1][y]->p_rsp_out[EAST] (signal_dspin_bound_rsp_out[X_SIZE-1][y][EAST]); 921 922 clusters[0][y]->p_m2p_in[WEST] (signal_dspin_bound_m2p_in[0][y][WEST]); 923 clusters[0][y]->p_m2p_out[WEST] (signal_dspin_bound_m2p_out[0][y][WEST]); 924 clusters[X_SIZE-1][y]->p_m2p_in[EAST] (signal_dspin_bound_m2p_in[X_SIZE-1][y][EAST]); 925 clusters[X_SIZE-1][y]->p_m2p_out[EAST] (signal_dspin_bound_m2p_out[X_SIZE-1][y][EAST]); 926 927 clusters[0][y]->p_p2m_in[WEST] (signal_dspin_bound_p2m_in[0][y][WEST]); 928 clusters[0][y]->p_p2m_out[WEST] (signal_dspin_bound_p2m_out[0][y][WEST]); 929 clusters[X_SIZE-1][y]->p_p2m_in[EAST] (signal_dspin_bound_p2m_in[X_SIZE-1][y][EAST]); 930 clusters[X_SIZE-1][y]->p_p2m_out[EAST] (signal_dspin_bound_p2m_out[X_SIZE-1][y][EAST]); 931 932 clusters[0][y]->p_cla_in[WEST] (signal_dspin_bound_cla_in[0][y][WEST]); 933 clusters[0][y]->p_cla_out[WEST] (signal_dspin_bound_cla_out[0][y][WEST]); 934 clusters[X_SIZE-1][y]->p_cla_in[EAST] (signal_dspin_bound_cla_in[X_SIZE-1][y][EAST]); 935 clusters[X_SIZE-1][y]->p_cla_out[EAST] (signal_dspin_bound_cla_out[X_SIZE-1][y][EAST]); 936 } 937 938 std::cout << std::endl << "West & East boundaries connections done" << std::endl; 858 939 859 940 // North & South boundary clusters connections 860 for (size_t x = 0; x < X_SIZE; x++) 861 { 862 for (size_t k = 0; k < 3; k++) 863 { 864 clusters[x][0]->p_cmd_in[SOUTH][k] (signal_dspin_false_cmd_in [x][0][SOUTH][k]); 865 clusters[x][0]->p_cmd_out[SOUTH][k] (signal_dspin_false_cmd_out[x][0][SOUTH][k]); 866 clusters[x][Y_SIZE-1]->p_cmd_in[NORTH][k] (signal_dspin_false_cmd_in [x][Y_SIZE-1][NORTH][k]); 867 clusters[x][Y_SIZE-1]->p_cmd_out[NORTH][k](signal_dspin_false_cmd_out[x][Y_SIZE-1][NORTH][k]); 868 } 869 870 for (size_t k = 0; k < 2; k++) 871 { 872 clusters[x][0]->p_rsp_in[SOUTH][k] (signal_dspin_false_rsp_in [x][0][SOUTH][k]); 873 clusters[x][0]->p_rsp_out[SOUTH][k] (signal_dspin_false_rsp_out[x][0][SOUTH][k]); 874 clusters[x][Y_SIZE-1]->p_rsp_in[NORTH][k] (signal_dspin_false_rsp_in [x][Y_SIZE-1][NORTH][k]); 875 clusters[x][Y_SIZE-1]->p_rsp_out[NORTH][k](signal_dspin_false_rsp_out[x][Y_SIZE-1][NORTH][k]); 876 } 877 } 878 std::cout << "North, South, West, East connections established" << std::endl; 941 for (size_t x = 0; x < X_SIZE; x++) { 942 clusters[x][0]->p_cmd_in[SOUTH] (signal_dspin_bound_cmd_in[x][0][SOUTH]); 943 clusters[x][0]->p_cmd_out[SOUTH] (signal_dspin_bound_cmd_out[x][0][SOUTH]); 944 clusters[x][Y_SIZE-1]->p_cmd_in[NORTH] (signal_dspin_bound_cmd_in[x][Y_SIZE-1][NORTH]); 945 clusters[x][Y_SIZE-1]->p_cmd_out[NORTH] (signal_dspin_bound_cmd_out[x][Y_SIZE-1][NORTH]); 946 947 clusters[x][0]->p_rsp_in[SOUTH] (signal_dspin_bound_rsp_in[x][0][SOUTH]); 948 clusters[x][0]->p_rsp_out[SOUTH] (signal_dspin_bound_rsp_out[x][0][SOUTH]); 949 clusters[x][Y_SIZE-1]->p_rsp_in[NORTH] (signal_dspin_bound_rsp_in[x][Y_SIZE-1][NORTH]); 950 clusters[x][Y_SIZE-1]->p_rsp_out[NORTH] (signal_dspin_bound_rsp_out[x][Y_SIZE-1][NORTH]); 951 952 clusters[x][0]->p_m2p_in[SOUTH] (signal_dspin_bound_m2p_in[x][0][SOUTH]); 953 clusters[x][0]->p_m2p_out[SOUTH] (signal_dspin_bound_m2p_out[x][0][SOUTH]); 954 clusters[x][Y_SIZE-1]->p_m2p_in[NORTH] (signal_dspin_bound_m2p_in[x][Y_SIZE-1][NORTH]); 955 clusters[x][Y_SIZE-1]->p_m2p_out[NORTH] (signal_dspin_bound_m2p_out[x][Y_SIZE-1][NORTH]); 956 957 clusters[x][0]->p_p2m_in[SOUTH] (signal_dspin_bound_p2m_in[x][0][SOUTH]); 958 clusters[x][0]->p_p2m_out[SOUTH] (signal_dspin_bound_p2m_out[x][0][SOUTH]); 959 clusters[x][Y_SIZE-1]->p_p2m_in[NORTH] (signal_dspin_bound_p2m_in[x][Y_SIZE-1][NORTH]); 960 clusters[x][Y_SIZE-1]->p_p2m_out[NORTH] (signal_dspin_bound_p2m_out[x][Y_SIZE-1][NORTH]); 961 962 clusters[x][0]->p_cla_in[SOUTH] (signal_dspin_bound_cla_in[x][0][SOUTH]); 963 clusters[x][0]->p_cla_out[SOUTH] (signal_dspin_bound_cla_out[x][0][SOUTH]); 964 clusters[x][Y_SIZE-1]->p_cla_in[NORTH] (signal_dspin_bound_cla_in[x][Y_SIZE-1][NORTH]); 965 clusters[x][Y_SIZE-1]->p_cla_out[NORTH] (signal_dspin_bound_cla_out[x][Y_SIZE-1][NORTH]); 966 } 967 968 std::cout << std::endl << "North & South boundaries connections done" << std::endl; 879 969 std::cout << std::endl; 880 970 … … 955 1045 signal_resetn = false; 956 1046 957 // network boundaries signals 958 for (size_t x = 0; x < X_SIZE ; x++){ 959 for (size_t y = 0; y < Y_SIZE ; y++){ 960 for (size_t a = 0; a < 4; a++){ 961 for (size_t k = 0; k < 3; k++){ 962 signal_dspin_false_cmd_in [x][y][a][k].write = false; 963 signal_dspin_false_cmd_in [x][y][a][k].read = true; 964 signal_dspin_false_cmd_out[x][y][a][k].write = false; 965 signal_dspin_false_cmd_out[x][y][a][k].read = true; 966 } 967 for (size_t k = 0; k < 2; k++){ 968 signal_dspin_false_rsp_in [x][y][a][k].write = false; 969 signal_dspin_false_rsp_in [x][y][a][k].read = true; 970 signal_dspin_false_rsp_out[x][y][a][k].write = false; 971 signal_dspin_false_rsp_out[x][y][a][k].read = true; 972 } 973 } 974 } 1047 // set network boundaries signals default values 1048 // for all boundary clusters 1049 for (size_t x = 0; x < X_SIZE ; x++) { 1050 for (size_t y = 0; y < Y_SIZE ; y++) { 1051 for (size_t face = 0; face < 4; face++) { 1052 signal_dspin_bound_cmd_in [x][y][face].write = false; 1053 signal_dspin_bound_cmd_in [x][y][face].read = true; 1054 signal_dspin_bound_cmd_out[x][y][face].write = false; 1055 signal_dspin_bound_cmd_out[x][y][face].read = true; 1056 1057 signal_dspin_bound_rsp_in [x][y][face].write = false; 1058 signal_dspin_bound_rsp_in [x][y][face].read = true; 1059 signal_dspin_bound_rsp_out[x][y][face].write = false; 1060 signal_dspin_bound_rsp_out[x][y][face].read = true; 1061 1062 signal_dspin_bound_m2p_in [x][y][face].write = false; 1063 signal_dspin_bound_m2p_in [x][y][face].read = true; 1064 signal_dspin_bound_m2p_out[x][y][face].write = false; 1065 signal_dspin_bound_m2p_out[x][y][face].read = true; 1066 1067 signal_dspin_bound_p2m_in [x][y][face].write = false; 1068 signal_dspin_bound_p2m_in [x][y][face].read = true; 1069 signal_dspin_bound_p2m_out[x][y][face].write = false; 1070 signal_dspin_bound_p2m_out[x][y][face].read = true; 1071 1072 signal_dspin_bound_cla_in [x][y][face].write = false; 1073 signal_dspin_bound_cla_in [x][y][face].read = true; 1074 signal_dspin_bound_cla_out[x][y][face].write = false; 1075 signal_dspin_bound_cla_out[x][y][face].read = true; 1076 } 1077 } 975 1078 } 976 1079 … … 1037 1140 1038 1141 clusters[x][y]->proc[proc]->print_trace(); 1039 1040 1142 std::ostringstream proc_signame; 1041 1143 proc_signame << "[SIG]PROC_" << x << "_" << y << "_" << proc ; … … 1121 1223 } 1122 1224 1123 1225 1124 1226 // Free memory 1125 1227 for (size_t i = 0; i < (X_SIZE * Y_SIZE); i++) … … 1130 1232 } 1131 1233 1132 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_inc, X_SIZE - 1, Y_SIZE, 3); 1133 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_dec, X_SIZE - 1, Y_SIZE, 3); 1134 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_inc, X_SIZE - 1, Y_SIZE, 2); 1135 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_dec, X_SIZE - 1, Y_SIZE, 2); 1136 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_inc, X_SIZE, Y_SIZE - 1, 3); 1137 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_dec, X_SIZE, Y_SIZE - 1, 3); 1138 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_inc, X_SIZE, Y_SIZE - 1, 2); 1139 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_dec, X_SIZE, Y_SIZE - 1, 2); 1140 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_false_cmd_in, X_SIZE, Y_SIZE, 4, 3); 1141 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_false_cmd_out, X_SIZE, Y_SIZE, 4, 3); 1142 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_false_rsp_in, X_SIZE, Y_SIZE, 4, 2); 1143 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_false_rsp_out, X_SIZE, Y_SIZE, 4, 2); 1234 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_inc, X_SIZE-1, Y_SIZE); 1235 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_dec, X_SIZE-1, Y_SIZE); 1236 1237 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_inc, X_SIZE-1, Y_SIZE); 1238 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_dec, X_SIZE-1, Y_SIZE); 1239 1240 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_m2p_inc, X_SIZE-1, Y_SIZE); 1241 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_m2p_dec, X_SIZE-1, Y_SIZE); 1242 1243 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_p2m_inc, X_SIZE-1, Y_SIZE); 1244 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_p2m_dec, X_SIZE-1, Y_SIZE); 1245 1246 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cla_inc, X_SIZE-1, Y_SIZE); 1247 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cla_dec, X_SIZE-1, Y_SIZE); 1248 1249 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_inc, X_SIZE, Y_SIZE-1); 1250 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_dec, X_SIZE, Y_SIZE-1); 1251 1252 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_inc, X_SIZE, Y_SIZE-1); 1253 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_dec, X_SIZE, Y_SIZE-1); 1254 1255 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_m2p_inc, X_SIZE, Y_SIZE-1); 1256 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_m2p_dec, X_SIZE, Y_SIZE-1); 1257 1258 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_p2m_inc, X_SIZE, Y_SIZE-1); 1259 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_p2m_dec, X_SIZE, Y_SIZE-1); 1260 1261 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cla_inc, X_SIZE, Y_SIZE-1); 1262 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cla_dec, X_SIZE, Y_SIZE-1); 1263 1264 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_cmd_in, X_SIZE, Y_SIZE, 4); 1265 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_cmd_out, X_SIZE, Y_SIZE, 4); 1266 1267 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_bound_rsp_in, X_SIZE, Y_SIZE, 4); 1268 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_bound_rsp_out, X_SIZE, Y_SIZE, 4); 1269 1270 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_m2p_in, X_SIZE, Y_SIZE, 4); 1271 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_m2p_out, X_SIZE, Y_SIZE, 4); 1272 1273 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_bound_p2m_in, X_SIZE, Y_SIZE, 4); 1274 dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_bound_p2m_out, X_SIZE, Y_SIZE, 4); 1275 1276 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_cla_in, X_SIZE, Y_SIZE, 4); 1277 dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_cla_out, X_SIZE, Y_SIZE, 4); 1144 1278 1145 1279 return EXIT_SUCCESS; -
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.