Hardware Design: SIE
Sign in or create your account | Project List | Help
Hardware Design: SIE Git Source Tree
Root/
| 1 | |
| 2 | /** Genetic definitions **/ |
| 3 | #define HW_ENABLE 1 //cambiar en genetic.h habilitar hw, 0 se hace por SW |
| 4 | |
| 5 | #define RESULTADOS 2 |
| 6 | |
| 7 | #define ARBOLES 5 |
| 8 | #define LONG_ARBOL 8 |
| 9 | |
| 10 | #define nivel1 pentarboles * 4 |
| 11 | #define ARBOLES_INDIV (int)(nivel1 + *(nivel2+pentarboles) + *(nivel3+pentarboles) + *(nivel4+pentarboles) + *(nivel5+pentarboles)) |
| 12 | #define LONG_INDIV (int)(ARBOLES_INDIV * LONG_ARBOL) |
| 13 | |
| 14 | #define EVALFIT_PHYSBASE1 0xcd800000 |
| 15 | #define EVALFIT_PHYSBASE2 0xcd820000 |
| 16 | #define EVALFIT_PHYSBASE3 0xcd840000 |
| 17 | #define EVALFIT_PHYSBASE4 0xcd860000 |
| 18 | |
| 19 | //sockets defs |
| 20 | #define PORT 3550 /* El puerto que sera abierto */ |
| 21 | #define BACKLOG 2 /* El numero de conexiones permitidas */ |
| 22 | #define MAXDATASIZE 10000 /* El numero maximo de datos en bytes */ |
| 23 | |
| 24 | /* Variables globales */ |
| 25 | char *funlut_ap, *puertas_ap; |
| 26 | void *evalfit_ptr1, *evalfit_ptr4, *evalfit_ptr3, *evalfit_ptr2; |
| 27 | int maxgeneraciones, poblacion; |
| 28 | |
| 29 | |
| 30 | typedef long long timestamp_t; |
| 31 | static timestamp_t |
| 32 | get_timestamp () |
| 33 | { |
| 34 | struct timeval now; |
| 35 | gettimeofday (&now, NULL); |
| 36 | return now.tv_usec + (timestamp_t)now.tv_sec *1000000 ; |
| 37 | } |
| 38 | |
| 39 | struct gen_datos_tipo |
| 40 | { |
| 41 | int *objetivo; |
| 42 | int tamaobj; |
| 43 | int pentarboles; |
| 44 | int vars; |
| 45 | int tamacrom; |
| 46 | int maxgen; |
| 47 | char *cromo_sal; |
| 48 | int *fitness; |
| 49 | char *cromo_entrada; |
| 50 | int fitness_entrada; |
| 51 | int nivel_max; |
| 52 | int en_cromo_entrada; |
| 53 | int *generacion; |
| 54 | int *tiempo; |
| 55 | int aux; |
| 56 | int *aux_sal; |
| 57 | }; |
| 58 | |
| 59 |
Branches:
master
