From 49ee4593d0c9e56126ff2986a40be4ace3fd22c6 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 14 Dec 2011 01:39:55 -0800 Subject: [PATCH] minor optimization of the mail benchmark --- apps/tests.c | 11 +++++------ arch/x86/scc/icc.c | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/tests.c b/apps/tests.c index e6b4696a..43e9c470 100644 --- a/apps/tests.c +++ b/apps/tests.c @@ -100,12 +100,11 @@ static int foo(void* arg) static int mail_ping(void* arg) { int i; -// icc_mail_ping(); - - for( i=0; i<5; ++i ) { + for(i=0; i<5; ++i) + icc_mail_ping(); + for(i=0; i<5; ++i) icc_mail_ping_irq(); - icc_mail_ping_jitter(); - } + //icc_mail_ping_jitter(); //icc_irq_ping(); //icc_mail_datarates(); //icc_halt(); @@ -429,7 +428,7 @@ int test_init(void) //create_kernel_task(NULL, producer, , NORMAL_PRIO); //create_kernel_task(NULL, consumer, NULL, NORMAL_PRIO); create_kernel_task(NULL, mail_ping, NULL, NORMAL_PRIO); - create_kernel_task(NULL, mail_noise, NULL, NORMAL_PRIO); + //create_kernel_task(NULL, mail_noise, NULL, NORMAL_PRIO); //create_kernel_task(NULL, svm_test, NULL, NORMAL_PRIO); //create_kernel_task(NULL, svm_bench, NULL, NORMAL_PRIO); //create_kernel_task(NULL, pi, NULL, NORMAL_PRIO); diff --git a/arch/x86/scc/icc.c b/arch/x86/scc/icc.c index 54b42987..f3ae7f41 100644 --- a/arch/x86/scc/icc.c +++ b/arch/x86/scc/icc.c @@ -297,8 +297,8 @@ int icc_halt(void) } #define ROUNDS 20000 -#define CORE_A 0 // sender -#define CORE_B 25 // receiver +#define CORE_A RC_RCCEID[0] // sender +#define CORE_B RC_RCCEID[30] // receiver int icc_send_gic_irq(int core_num) { volatile uint32_t* irq_request = (volatile uint32_t*)(FPGA_BASE+IRQ_REQUEST+RC_MY_COREID*8); @@ -346,7 +346,7 @@ int icc_mail_ping(void) /* wait for response */ do { - res = iRCCE_mail_check(CORE_B); + res = iRCCE_mail_check(iRCCE_MAILBOX_ALL); //CORE_B); } while( res != iRCCE_SUCCESS ); /* release mail */ @@ -357,7 +357,7 @@ int icc_mail_ping(void) else { /* wait for request */ do { - res = iRCCE_mail_check(CORE_A); + res = iRCCE_mail_check(iRCCE_MAILBOX_ALL); //CORE_A); } while( res != iRCCE_SUCCESS ); /* check mail */