From adc10512ed1900ce121442ad18b365976acb3477 Mon Sep 17 00:00:00 2001 From: Generic account for RWTHAachen Students Date: Tue, 13 Dec 2011 03:39:21 -0800 Subject: [PATCH] little changes in pingpong bench --- apps/tests.c | 15 +++++++++------ arch/x86/scc/icc.c | 8 ++++---- kernel/init.c | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/tests.c b/apps/tests.c index 8441b2ac..7f104626 100644 --- a/apps/tests.c +++ b/apps/tests.c @@ -100,9 +100,12 @@ static int foo(void* arg) static int mail_ping(void* arg) { int i; - icc_mail_ping(); - icc_mail_ping_irq(); - //icc_mail_ping_jitter(); +// icc_mail_ping(); + + for( i=0; i<5; ++i ) { + icc_mail_ping_irq(); + icc_mail_ping_jitter(); + } //icc_irq_ping(); //icc_mail_datarates(); //icc_halt(); @@ -411,10 +414,10 @@ int test_init(void) //create_kernel_task(NULL, join_test, NULL, NORMAL_PRIO); //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_ping, 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, svm_bench, NULL, NORMAL_PRIO); //create_kernel_task(NULL, pi, NULL, NORMAL_PRIO); //create_kernel_task(NULL, laplace, NULL, NORMAL_PRIO); //create_user_task(NULL, "/bin/hello", argv); diff --git a/arch/x86/scc/icc.c b/arch/x86/scc/icc.c index 501faa5b..54b42987 100644 --- a/arch/x86/scc/icc.c +++ b/arch/x86/scc/icc.c @@ -298,7 +298,7 @@ int icc_halt(void) #define ROUNDS 20000 #define CORE_A 0 // sender -#define CORE_B RC_RCCEID[30] // receiver +#define CORE_B 25 // 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(iRCCE_MAILBOX_ALL); + res = iRCCE_mail_check(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(iRCCE_MAILBOX_ALL); + res = iRCCE_mail_check(CORE_A); } while( res != iRCCE_SUCCESS ); /* check mail */ @@ -538,7 +538,7 @@ int icc_mail_noise(void) { /* send a mail to each UE */ for( j=0; j