Merge branch 'mailbox_integration' of git.lfbs.rwth-aachen.de:metalsvm into mailbox_integration
This commit is contained in:
commit
b685c15f81
3 changed files with 33 additions and 2 deletions
|
@ -57,6 +57,7 @@ int icc_send_irq(int ue);
|
||||||
void icc_mail_check(void);
|
void icc_mail_check(void);
|
||||||
int icc_mail_ping(void);
|
int icc_mail_ping(void);
|
||||||
int icc_mail_ping_irq(void);
|
int icc_mail_ping_irq(void);
|
||||||
|
int icc_mail_noise(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -271,11 +271,15 @@ int icc_mail_ping( void )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CORE_A 0
|
||||||
|
#define CORE_B 1
|
||||||
|
#define NOISE_ROUDNS 1000000
|
||||||
|
|
||||||
|
|
||||||
int icc_mail_ping_irq( void )
|
int icc_mail_ping_irq( void )
|
||||||
{
|
{
|
||||||
/* return if not core 0 */
|
/* return if not core 0 */
|
||||||
if( my_ue ) return 0;
|
if( my_ue != CORE_A ) return 0;
|
||||||
|
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
uint64_t timer = 0;
|
uint64_t timer = 0;
|
||||||
|
@ -327,6 +331,31 @@ int icc_mail_ping_irq( void )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int icc_mail_noise() {
|
||||||
|
int i, j;
|
||||||
|
int num_ranks = RCCE_num_ues();
|
||||||
|
iRCCE_MAIL_HEADER* recv_mail = NULL;
|
||||||
|
|
||||||
|
// leave function if not participating
|
||||||
|
if( (my_ue == 0) || (my_ue == 1) ) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for( i=0; i<NOISE_ROUDNS; ++i ) {
|
||||||
|
for( j=0; j<num_ranks; ++j ) {
|
||||||
|
if ( (j == CORE_A) || (j == CORE_B) ) continue;
|
||||||
|
iRCCE_mail_send(0, my_ue*rounds+j, 0, NULL, j);
|
||||||
|
iRCCE_mail_recv(&recv_mail);
|
||||||
|
if( recv_mail ) iRCCE_mail_release(&recv_mail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
iRCCE_mailbox_close(iRCCE_MAILBOX_ALL);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void icc_mail_check(void)
|
void icc_mail_check(void)
|
||||||
{
|
{
|
||||||
iRCCE_MAIL_HEADER* header = NULL;
|
iRCCE_MAIL_HEADER* header = NULL;
|
||||||
|
|
|
@ -88,8 +88,9 @@ static int STDCALL foo(void* arg)
|
||||||
|
|
||||||
#ifdef CONFIG_ROCKCREEK
|
#ifdef CONFIG_ROCKCREEK
|
||||||
int STDCALL mail_ping(void* arg) {
|
int STDCALL mail_ping(void* arg) {
|
||||||
icc_mail_ping();
|
//icc_mail_ping();
|
||||||
icc_mail_ping_irq();
|
icc_mail_ping_irq();
|
||||||
|
icc_mail_noise(); // generate noise in the mesh
|
||||||
icc_halt();
|
icc_halt();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue