Changeset 791 for soft/giet_vm/applications
- Timestamp:
- Feb 17, 2016, 4:12:02 PM (9 years ago)
- Location:
- soft/giet_vm/applications/rosenfeld
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/rosenfeld/Makefile
r772 r791 19 19 20 20 21 APP_NAME = rosenfeld21 APP_NAME = appli.elf 22 22 23 23 SRC_FILE = $(wildcard $(SRC_PATH)/*.c) … … 32 32 CFLAGS := $(CFLAGS) -g -Wall -fomit-frame-pointer $(CFLAGSW) $(CFLAGSCPU) -I$(INC_PATH) -fno-builtin -ffreestanding 33 33 34 LDFLAGS := -Lnrc2 -L../../build/libs -T $(APP_NAME).ld --start-group -lnrc2x -luser -lmath --end-group34 LDFLAGS := -Lnrc2 -L../../build/libs -Trosenfeld.ld --start-group -lnrc2x -luser -lmath --end-group 35 35 36 36 -
soft/giet_vm/applications/rosenfeld/nrc2/include/nrc_os_config.h
r772 r791 10 10 #define write(x, y, z) giet_fat_write(x, y, z) 11 11 #define fprintf(x, ...) giet_fat_fprintf(x, __VA_ARGS__) 12 #define exit(x) giet_pthread_exit("exit...") 12 #define fscanf(x, ...) ; 13 #define exit(x) giet_pthread_exit(NULL) 13 14 #endif 14 15 -
soft/giet_vm/applications/rosenfeld/rosenfeld.ld
r772 r791 3 3 *****************************************************************************/ 4 4 5 seg_code_base = 0x 00400000;6 seg_data_base = 0x 00500000;5 seg_code_base = 0x10000000; 6 seg_data_base = 0x20000000; 7 7 8 8 /*************************************************************************** -
soft/giet_vm/applications/rosenfeld/rosenfeld.py
r772 r791 35 35 # define vsegs base & size 36 36 code_base = 0x10000000 37 code_size = 0x000 10000 # 64Kbytes (replicated in each cluster)37 code_size = 0x00030000 # 192 Kbytes (replicated in each cluster) 38 38 39 39 data_base = 0x20000000 … … 41 41 42 42 stack_base = 0x40000000 43 stack_size = 0x00 200000 # 2Mbytes (per cluster)43 stack_size = 0x00800000 # 8 Mbytes (per cluster) 44 44 45 45 heap_base = 0x60000000 … … 47 47 48 48 # create vspace 49 vspace = mapping.addVspace( name = 'rosenf led', startname = 'rosen_data' )49 vspace = mapping.addVspace( name = 'rosenfeld', startname = 'rosen_data' ) 50 50 51 51 # data vseg : shared (only in cluster[0,0]) 52 52 mapping.addVseg( vspace, 'rosen_data', data_base, data_size, 53 53 'C_WU', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM', 54 binpath = 'bin/rosenf led/appli.elf',54 binpath = 'bin/rosenfeld/appli.elf', 55 55 local = False ) 56 56 … … 64 64 code_base , code_size, 65 65 'CXWU', vtype = 'ELF', x = x, y = y, pseg = 'RAM', 66 binpath = 'bin/rosenf led/appli.elf',66 binpath = 'bin/rosenfeld/appli.elf', 67 67 local = True ) 68 68 -
soft/giet_vm/applications/rosenfeld/src/ecc_examples.c
r772 r791 22 22 #include "ecc_features.h" 23 23 #include "ecc_generation.h" 24 24 25 25 26 // -------------------------------------------------------------- … … 1416 1417 set_ui8vector_str(X[i++], 0, w-1, " "); // 27 1417 1418 1418 display_ui8matrix_positive(X, 0, h-1, 0, w-1, 4, "forme_boulon1"); printf(""); 1419 write_ui8matrix_positive( X, 0, h-1, 0, w-1, 4, "forme_boulon1.txt"); 1420 } 1419 display_ui8matrix_positive(X, 0, h-1, 0, w-1, 4, "forme_boulon1"); 1420 printf(""); 1421 write_ui8matrix_positive(X, 0, h-1, 0, w-1, 4, "forme_boulon1.txt"); 1422 } -
soft/giet_vm/applications/rosenfeld/src/ecc_generation.c
r777 r791 21 21 #include "mt19937.h" // Mersenne Twister generator 22 22 #include "ecc_generation.h" 23 23 24 24 25 // ------------------------------------------------------------------------------------------------------------------------- -
soft/giet_vm/applications/rosenfeld/src/ecc_main_rosenfeld_sa.c
r777 r791 92 92 init_forme_boulon1(&X0, &i0, &i1, &j0, &j1); 93 93 94 // allocati n memoire94 // allocation memoire 95 95 X = ui8matrix (i0-border, i1+border, j0-border, j1+border); 96 96 E8 = ui8matrix (i0-border, i1+border, j0-border, j1+border); 97 97 E32 = ui32matrix(i0-border, i1+border, j0-border, j1+border); 98 99 // initialisation de la memoir 98 99 // initialisation de la memoire 100 100 zero_ui32matrix(E32, i0-border, i1+border, j0-border, j1+border); 101 101 zero_ui8matrix (E8, i0-border, i1+border, j0-border, j1+border); 102 102 zero_ui8matrix (X, i0-border, i1+border, j0-border, j1+border); 103 103 104 104 // pre-traitements 105 105 binarisation_ui8matrix(X0, i0, i1, j0, j1, 1, 1, X); // pour le traitement … … 182 182 int na; 183 183 184 RegionStats * Stats = NULL;184 RegionStats * Stats = NULL; 185 185 186 186 RGBQuad palette[256]; … … 191 191 192 192 // chargement d'une image depuis le disque 193 X0 = LoadPGM_ui8matrix(complete_filename, &i0, &i1, &j0, &j1); 194 195 // allocatin memoire 196 X = ui8matrix (i0-border, i1+border, j0-border, j1+border); 197 E8 = ui8matrix (i0-border, i1+border, j0-border, j1+border); 198 E32 = ui32matrix(i0-border, i1+border, j0-border, j1+border); 199 200 // initialisation de la memoir 201 zero_ui32matrix(E32, i0-border, i1+border, j0-border, j1+border); 202 zero_ui8matrix (E8, i0-border, i1+border, j0-border, j1+border); 203 zero_ui8matrix (X, i0-border, i1+border, j0-border, j1+border); 193 //X0 = LoadPGM_ui8matrix(complete_filename, &i0, &i1, &j0, &j1); 194 init_forme_boulon1(&X0, &i0, &i1, &j0, &j1); 195 196 // allocation memoire 197 X = ui8matrix (i0 - border, i1 + border, j0 - border, j1 + border); 198 E8 = ui8matrix (i0 - border, i1 + border, j0 - border, j1 + border); 199 E32 = ui32matrix(i0 - border, i1 + border, j0 - border, j1 + border); 200 201 // initialisation de la memoire 202 zero_ui32matrix(E32, i0 - border, i1 + border, j0 - border, j1 + border); 203 zero_ui8matrix (E8, i0 - border, i1 + border, j0 - border, j1 + border); 204 zero_ui8matrix (X, i0 - border, i1 + border, j0 - border, j1 + border); 204 205 205 206 // pre-traitements 206 207 binarisation_ui8matrix(X0, i0, i1, j0, j1, 20, 1, X); // pour le traitement 207 binarisation_ui8matrix(X0, i0, i1, j0, j1, 20, 255, X0); // pour la verif visuelle 208 generate_path_filename(pathDst, "verif.pgm", complete_filename, 1024); 209 SavePGM_ui8matrix(X0, i0, i1, j0, j1, complete_filename); 210 211 height = i1-i0+1; width = j1-j0+1; 212 213 nemax = ((height+1)*(width+1)) / 2; // majorant strict 214 nermax = (width+1) / 2; 208 //binarisation_ui8matrix(X0, i0, i1, j0, j1, 20, 255, X0); // pour la verif visuelle 209 //generate_path_filename(pathDst, "verif.pgm", complete_filename, 1024); 210 //SavePGM_ui8matrix(X0, i0, i1, j0, j1, complete_filename); 211 212 height = i1 - i0 + 1; 213 width = j1 - j0 + 1; 214 215 nemax = ((height + 1) * (width + 1)) / 2; // majorant strict 216 nermax = (width + 1) / 2; 215 217 216 218 // alloc init des tables d'equivalences pour UF, Suzuki et Bailey … … 234 236 na = Rosenfeld_UF_Org1_8C(X, height, width, E32, T, A, nemax, Stats); 235 237 printf("na = %d\n", na); 236 filename = "Rosenfeld_UF_Org1_8C.bmp";238 //filename = "Rosenfeld_UF_Org1_8C.bmp"; 237 239 mod_ui32matrix_ui8matrix(E32, i0, i1, j0, j1, E8); 238 generate_path_filename(pathDst, filename, complete_filename, 1024);239 SaveBMP2_ui8matrix(E8, width, height, palette, complete_filename);240 //generate_path_filename(pathDst, filename, complete_filename, 1024); 241 //SaveBMP2_ui8matrix(E8, width, height, palette, complete_filename); 240 242 zero_ui32matrix(E32, i0 - border, i1 + border, j0 - border, j1 + border); 241 243 display_RegionStatsVector(Stats, 1, na, "Stats"); … … 313 315 // ----------------------------- 314 316 { 317 #if TARGET_OS==GIET_VM 318 giet_tty_alloc(1); 319 #endif 315 320 display_arg(argc, argv); 316 321 ecc_info_define();
Note: See TracChangeset
for help on using the changeset viewer.