General updates

This commit is contained in:
imi415 2022-08-09 10:10:35 +08:00
parent 7f5880d067
commit cead82c9fe
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
4 changed files with 27 additions and 25 deletions

View File

@ -26,7 +26,7 @@ set(TARGET_INCLUDES
)
set(TARGET_DEFS
"ITERATIONS=1"
"ITERATIONS=65536"
"PERFORMANCE_RUN=1"
)

View File

@ -78,8 +78,7 @@ typedef uint32_t CORE_TICKS;
#endif
#endif
#ifndef COMPILER_FLAGS
#define COMPILER_FLAGS \
"-O2"
#define COMPILER_FLAGS "-O2"
#endif
#ifndef MEM_LOCATION
#define MEM_LOCATION "DDR2 LMI"
@ -93,14 +92,14 @@ typedef uint32_t CORE_TICKS;
ee_ptr_int needs to be the data type used to hold pointers, otherwise
coremark may fail!!!
*/
typedef signed short ee_s16;
typedef unsigned short ee_u16;
typedef signed int ee_s32;
typedef double ee_f32;
typedef unsigned char ee_u8;
typedef unsigned int ee_u32;
typedef ee_u32 ee_ptr_int;
typedef size_t ee_size_t;
typedef int16_t ee_s16;
typedef uint16_t ee_u16;
typedef int32_t ee_s32;
typedef float ee_f32;
typedef uint8_t ee_u8;
typedef uint32_t ee_u32;
typedef ee_u32 ee_ptr_int;
typedef size_t ee_size_t;
/* align_mem :
This macro is used to align an offset to point to a 32b value. It is
used in the Matrix algorithm to initialize the input memory blocks.
@ -187,8 +186,7 @@ typedef size_t ee_size_t;
*/
extern ee_u32 default_num_contexts;
typedef struct CORE_PORTABLE_S
{
typedef struct CORE_PORTABLE_S {
ee_u8 portable_id;
} core_portable;
@ -196,8 +194,7 @@ typedef struct CORE_PORTABLE_S
void portable_init(core_portable *p, int *argc, char *argv[]);
void portable_fini(core_portable *p);
#if !defined(PROFILE_RUN) && !defined(PERFORMANCE_RUN) \
&& !defined(VALIDATION_RUN)
#if !defined(PROFILE_RUN) && !defined(PERFORMANCE_RUN) && !defined(VALIDATION_RUN)
#if (TOTAL_DATA_SIZE == 1200)
#define PROFILE_RUN 1
#elif (TOTAL_DATA_SIZE == 2000)

@ -1 +1 @@
Subproject commit eefc986ebd3452d6adde22eafaff3e5c859f29e4
Subproject commit cfa9ab377835911f23d9b0831c7be302ed1f58de

View File

@ -51,7 +51,7 @@ volatile ee_s32 seed5_volatile = 0;
time.h and windows.h definitions included.
*/
#define EE_TICKS_PER_SEC 100000
#define EE_TICKS_PER_SEC 97656
/** Define Host specific (POSIX), or target specific global time variables. */
static uint32_t start_time_val, stop_time_val;
@ -69,11 +69,11 @@ void start_time(void) {
start_time_val = reload_value;
TMU->TSTR &= ~TMU_TSTR_STR0_Msk; /* Stop counter */
TMU->TCR0 = 0x04U; /* 1024 prescale */
TMU->TCNT0 = reload_value; /* 100kHz */
TMU->TCOR0 = reload_value; /* Reload register */
TMU->TSTR |= TMU_TSTR_STR0_Msk; /* Start counter */
TMU->TSTR &= ~TMU_TSTR_STR0_Msk; /* Stop counter */
TMU->TCR0 = 0x04U; /* 1024 prescale */
TMU->TCNT0 = reload_value; /* 100kHz */
TMU->TCOR0 = reload_value; /* Reload register */
TMU->TSTR |= TMU_TSTR_STR0_Msk; /* Start counter */
}
/* Function : stop_time
This function will be called right after ending the timed portion of the
@ -86,6 +86,8 @@ void start_time(void) {
void stop_time(void) {
TMU->TSTR &= ~TMU_TSTR_STR0_Msk; /* Stop counter */
stop_time_val = TMU->TCNT0;
printf("Stop time: 0x%09lx\r\n", stop_time_val);
}
/* Function : get_time
Return an abstract "ticks" number that signifies time on the system.
@ -97,7 +99,8 @@ void stop_time(void) {
controlled by <TIMER_RES_DIVIDER>
*/
CORE_TICKS get_time(void) {
CORE_TICKS elapsed = (CORE_TICKS)(stop_time_val - start_time_val);
CORE_TICKS elapsed = (CORE_TICKS)(start_time_val - stop_time_val);
printf("Get time: 0x%08lx\r\n", elapsed);
return elapsed;
}
/* Function : time_in_secs
@ -139,13 +142,15 @@ void portable_init(core_portable *p, int *argc, char *argv[]) {
uart_init();
ee_printf("Portable initialized\r\n");
if (sizeof(ee_ptr_int) != sizeof(ee_u8 *)) {
ee_printf(
"ERROR! Please define ee_ptr_int to a type that holds a "
"pointer!\n");
"pointer!\r\n");
}
if (sizeof(ee_u32) != 4) {
ee_printf("ERROR! Please define ee_u32 to a 32b unsigned type!\n");
ee_printf("ERROR! Please define ee_u32 to a 32b unsigned type!\r\n");
}
p->portable_id = 1;
}