Changeset 805
- Timestamp:
- Mar 15, 2016, 6:35:28 PM (9 years ago)
- Location:
- soft/giet_vm/applications/rosenfeld
- Files:
-
- 15 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/rosenfeld/Makefile
r798 r805 1 1 2 2 # -- Paths ---------- 3 SRC_PATH = src 3 SRC_PATH = src-par 4 4 OBJ_PATH = obj 5 5 EXE_PATH = bin … … 42 42 43 43 44 CFLAGSW := -Wredundant-decls -Wdisabled-optimization -Winline -Wpointer-arith -Wsign-compare -Wendif-labels -Wno-unused-function 44 CFLAGSW := -Wredundant-decls -Wdisabled-optimization -Winline -Wpointer-arith -Wsign-compare -Wendif-labels -Wno-unused-function -Wno-unused-variable 45 45 46 46 # -- Flags ---------- -
soft/giet_vm/applications/rosenfeld/nrc2/src/nrio1.c
r772 r805 323 323 for(i=nl; i<=nh; i++) { 324 324 printf(format, i); 325 } 326 printf("\n"); 327 328 for(i=nl; i<=nh; i++) { 329 printf(format, v[i]); 325 printf(" "); 326 } 327 printf("\n"); 328 329 for(i=nl; i<=nh; i++) { 330 printf(format, v[i]); 331 printf(" "); 330 332 } 331 333 printf("\n"); -
soft/giet_vm/applications/rosenfeld/nrc2/src/nrio2.c
r798 r805 734 734 int i, j; 735 735 736 char * format; 737 char * str; 738 739 select_display_positive_parameters(iformat, &format, &str); 740 741 if (name != NULL) { 742 printf("%s\n", name); 743 } 744 745 // @QM have to hack this function for the giet 746 for (i = i0; i <= i1; i++) { 747 for (j = j0; j <= j1; j++) { 748 if (m[i][j]) { 749 // For the giet 750 int a = m[i][j]; 751 int len = 0; 752 if (a == 0) { 753 len = 1; 754 } 755 else { 756 while (a != 0) { 757 a = a / 10; 758 len++; 759 } 760 } 761 for (int k = len; k < iformat; k++) { 762 printf(" "); 763 } 764 printf("%d", m[i][j]); 765 } 766 else { 767 printf("%s", str); 768 } 769 } 770 printf("\n"); 771 } 772 } 773 774 775 // -------------------------------------------------------------------------------------------------- 776 void display_si16matrix_positive(sint16 **m, int i0, int i1, int j0, int j1, int iformat, char *name) 777 // -------------------------------------------------------------------------------------------------- 778 { 779 int i, j; 780 736 781 char *format, *str; 737 782 … … 752 797 } 753 798 // -------------------------------------------------------------------------------------------------- 754 void display_ si16matrix_positive(sint16 **m, int i0, int i1, int j0, int j1, int iformat, char *name)799 void display_ui16matrix_positive(uint16 **m, int i0, int i1, int j0, int j1, int iformat, char *name) 755 800 // -------------------------------------------------------------------------------------------------- 756 801 { 757 802 int i, j; 758 759 803 char *format, *str; 760 804 … … 775 819 } 776 820 // -------------------------------------------------------------------------------------------------- 777 void display_ ui16matrix_positive(uint16**m, int i0, int i1, int j0, int j1, int iformat, char *name)821 void display_si32matrix_positive(sint32 **m, int i0, int i1, int j0, int j1, int iformat, char *name) 778 822 // -------------------------------------------------------------------------------------------------- 779 823 { … … 797 841 } 798 842 // -------------------------------------------------------------------------------------------------- 799 void display_ si32matrix_positive(sint32 **m, int i0, int i1, int j0, int j1, int iformat, char *name)843 void display_ui32matrix_positive(uint32 **m, int i0, int i1, int j0, int j1, int iformat, char *name) 800 844 // -------------------------------------------------------------------------------------------------- 801 845 { 802 846 int i, j; 803 char *format, *str; 847 char * format; 848 char * str; 804 849 805 850 select_display_positive_parameters(iformat, &format, &str); 806 851 807 if(name != NULL) printf(name); 808 809 for(i=i0; i<=i1; i++) { 810 for(j=j0; j<=j1; j++) { 811 if(m[i][j]) { 812 printf(format, m[i][j]); 813 } else { 852 if (name != NULL) { 853 printf("%s\n", name); 854 } 855 856 // @QM have to hack this function for the giet 857 for (i = i0; i <= i1; i++) { 858 for (j = j0; j <= j1; j++) { 859 if (m[i][j] != 0) { 860 int a = m[i][j]; 861 int len = 0; 862 if (a == 0) { 863 len = 1; 864 } 865 else { 866 while (a != 0) { 867 a = a / 10; 868 len++; 869 } 870 } 871 for (int k = len; k < iformat; k++) { 872 printf(" "); 873 } 874 printf("%d", m[i][j]); 875 } 876 else { 814 877 printf("%s", str); 815 878 } … … 817 880 printf("\n"); 818 881 } 819 } 820 // -------------------------------------------------------------------------------------------------- 821 void display_ui32matrix_positive(uint32 **m, int i0, int i1, int j0, int j1, int iformat, char *name) 822 // -------------------------------------------------------------------------------------------------- 823 { 824 int i, j; 825 char *format, *str; 826 827 select_display_positive_parameters(iformat, &format, &str); 828 829 if(name != NULL) printf(name); 830 831 for(i=i0; i<=i1; i++) { 832 for(j=j0; j<=j1; j++) { 833 if(m[i][j]) { 834 printf(format, m[i][j]); 835 } else { 836 printf("%s", str); 837 } 838 } 839 printf("\n"); 840 } 882 841 883 } 842 884 // -------------------------------------------------------------------------------------------------- -
soft/giet_vm/applications/rosenfeld/nrc2/src/nrset1.c
r772 r805 497 497 /* --------------------------------------------------------------------- */ 498 498 { 499 int i; 500 char c[1]; 501 for(i=nl; i<=nh; i++) { 502 503 *c = *str++; 504 if(isdigit(*c)) 499 // @QM 500 int i; 501 char c[2]; 502 c[1] = '\0'; 503 for (i = nl; i <= nh; i++) { 504 c[0] = *str++; 505 if (isdigit(c[0])) { 505 506 v[i] = (uint8) atoi(c); 506 else 507 } 508 else { 507 509 v[i] = (uint8) 0; 510 } 508 511 } 509 512 } -
soft/giet_vm/applications/rosenfeld/rosenfeld.py
r798 r805 25 25 26 26 ######################### 27 def extend( mapping):27 def extend(mapping): 28 28 29 29 x_size = mapping.x_size … … 59 59 for y in xrange (y_size): 60 60 cluster_id = (x * y_size) + y 61 if ( mapping.clusters[cluster_id].procs):61 if (mapping.clusters[cluster_id].procs): 62 62 63 63 mapping.addVseg( vspace, 'rosen_code_%d_%d' %(x,y), … … 71 71 for y in xrange (y_size): 72 72 cluster_id = (x * y_size) + y 73 if ( mapping.clusters[cluster_id].procs):74 for p in xrange( nprocs):73 if (mapping.clusters[cluster_id].procs): 74 for p in xrange(nprocs): 75 75 proc_id = (((x * y_size) + y) * nprocs) + p 76 76 size = (stack_size / nprocs) & 0xFFFFF000 … … 86 86 for y in xrange (y_size): 87 87 cluster_id = (x * y_size) + y 88 if ( mapping.clusters[cluster_id].procs):89 size 90 base 88 if (mapping.clusters[cluster_id].procs): 89 size = heap_size 90 base = heap_base + (cluster_id * size) 91 91 92 mapping.addVseg( vspace, 'rosen_heap_%d_%d' % (x,y), base, size,93 94 92 mapping.addVseg(vspace, 'rosen_heap_%d_%d' % (x, y), base, size, 93 'C_WU', vtype = 'HEAP', x = x, y = y, pseg = 'RAM', 94 local = False, big = True ) 95 95 96 96 # distributed tasks / one task per processor 97 #for x in xrange (x_size): 98 # for y in xrange (y_size): 99 # cluster_id = (x * y_size) + y 100 # if ( mapping.clusters[cluster_id].procs ): 101 # for p in xrange( nprocs ): 102 # trdid = (((x * y_size) + y) * nprocs) + p 97 for x in xrange (x_size): 98 for y in xrange (y_size): 99 cluster_id = (x * y_size) + y 100 if (mapping.clusters[cluster_id].procs): 101 for p in xrange(nprocs): 102 trdid = (((x * y_size) + y) * nprocs) + p 103 if trdid == 0: 104 startid = 0 105 is_main = 1 106 else: 107 startid = 1 108 is_main = 0 109 #startid = trdid == 0 and 0 or 1 110 #is_main = startid == 0 103 111 104 # mapping.addTask( vspace, 'rosen_%d_%d_%d' % (x,y,p), 105 # trdid, x, y, p, 106 # 'rosen_stack_%d_%d_%d' % (x,y,p), 107 # 'rosen_heap_%d_%d' % (x,y), 0 ) 108 mapping.addThread( vspace, 'main', True, 0, 0, 0, 109 'rosen_stack_0_0_0', 110 'rosen_heap_0_0', 111 0 ) # index in start_vector 112 mapping.addThread(vspace, 'rosen_%d_%d_%d' % (x, y, p), 113 is_main, x, y, p, 114 'rosen_stack_%d_%d_%d' % (x,y,p), 115 'rosen_heap_%d_%d' % (x,y), startid) 112 116 113 117 -
soft/giet_vm/applications/rosenfeld/src/ecc_main_rosenfeld_sa.c
r798 r805 120 120 N = ui32vector(0, nemax); 121 121 122 S = ui32vector(0, 2 *nermax);122 S = ui32vector(0, 2 * nermax); 123 123 124 124 initT(T, nemax);
Note: See TracChangeset
for help on using the changeset viewer.