Jump to content


Cray XD1 and SGI RC100


  • You cannot reply to this topic
5 replies to this topic

#1 Tony

    Member

  • Members
  • PipPip
  • 24 posts

Posted 26 August 2008 - 12:31 PM

Hi,
I tried to use the hello example for cray from Impulse C to run on Cray XD1, it seems that it is not working.
this is the command line
"
Impulse C is Copyright 2003-2005 Impulse Accelerated Technologies, Inc.
Software sending value: ffffffff00000000
"
then it stopped without giving any result.

I changed this hello example to add one done signal in order to run on SGI
this time
the result is"
Impulse C is Copyright 2003-2005 Impulse Accelerated Technologies, Inc.
Software sending value: ffffffff00000000
FPGA hardware returns: 0000000000000000
Software sending value: 5555555577777777
FPGA hardware returns: 0000000000000000
Software sending value: 1234567887654321
FPGA hardware returns: 0000000000000000


Application complete. Press the Enter key to continue.

"
obviously, the FPGA returned all zero values. Originally, the hello example is to swap the upper 32 bits with the lower 32bits.
May I know what the problem is?
Thanks

BTW I am using the latest Co-developer version 3.2


Best Regards,
Tony

#2 RalphBodenner

    Advanced Member

  • Admin
  • PipPipPip
  • 348 posts

Posted 03 September 2008 - 05:01 PM

Hi Tony,

Could you share your code with us by posting it here or emailing it to support@impulsec.com? We can try to reproduce the issue.

Are you using RASC 2.11?

Regards,
Ralph
Ralph Bodenner
Impulse Accelerated Technologies, Inc.

#3 Tony

    Member

  • Members
  • PipPip
  • 24 posts

Posted 09 September 2008 - 07:06 PM

QUOTE (RalphBodenner @ Sep 3 2008, 05:01 PM) <{POST_SNAPBACK}>
Hi Tony,

Could you share your code with us by posting it here or emailing it to support@impulsec.com? We can try to reproduce the issue.

Are you using RASC 2.11?

Regards,
Ralph


hi, please see my code for RASC RC100, i am using RASC 2.2, previous I forgot to add the co_interate and deselect the co_port option when generating the HDL, after fixing this, still, when processing, the SGI machine doesn't have any response. I am wondering if u could reproduce this code on the machine ASAP and give me any feedback on what is wrong with my code. Because this is an only helloworld program. May I know whether it is possible for you to provide me with a Helloworld example which could be able to run on SGI machine since there is only one helloworld example for CRAY XD1.
Thank u so much.

The following is the code I run on SGI

HW CODE

//////////////////////////////////////////////////////////////
// Copyright © 2005, Impulse Accelerated Technologies, Inc.
// All Rights Reserved.
//
// Sample application for Cray XD1 platform.
//
// HelloWorld_hw.c: Hardware processes and configuration code.
//

#include <stdio.h>
#include "co.h"

#define MONITOR

#ifdef MONITOR
#include "cosim_log.h"
#endif

// Software process
extern void SoftwareProcess(co_stream S1, co_stream S2);

void HardwareProcess(co_stream S1, co_stream S2, co_signal done_sig)
{
co_uint64 nSample;
co_uint64 nResult;


co_uint1 true = 1;
co_uint1 false = 0;
#ifdef MONITOR
IF_SIM(cosim_logwindow log;)
#endif

#ifdef MONITOR
IF_SIM(log = cosim_logwindow_create("HardwareProcess")wink.gif
#endif

do {

co_stream_open(S1, O_RDONLY, UINT_TYPE(64));
co_stream_open(S2, O_WRONLY, UINT_TYPE(64));
// Read values from the stream
while ( co_stream_read(S1, &nSample, sizeof(co_uint64)) == co_err_none ) {
// Swap the upper and lower 32 bits
// (You can replace this with more interesting calculations)
//#pragma CO pipeline
nResult = nSample + 1;
//nResult |= nSample >> 32;
co_stream_write(S2, &nResult, sizeof(co_uint64));
}
co_stream_close(S1);
co_stream_close(S2);
IF_SIM(break;) // Only run once during desktop simulation

co_signal_post(done_sig, true);

} while (1);
}

void config_hello(void * arg)
{
co_process HWProc, SWProc;
co_stream S1, S2;

co_signal done_sig;
co_port done_port;

done_sig = co_signal_create_ex("done_sig",UINT_TYPE(0));
done_port = co_port_create("done",co_output,done_sig);

S1 = co_stream_create("S1", UINT_TYPE(64), 1);
S2 = co_stream_create("S2", UINT_TYPE(64), 1);




#ifdef MONITOR
IF_SIM(cosim_logwindow_init()wink.gif
#endif

SWProc = co_process_create("SoftwareProcess", (co_function)SoftwareProcess,
2, S1, S2);

HWProc = co_process_create("HardwareProcess", (co_function)HardwareProcess,
3, S1, S2, done_sig);

co_process_config(HWProc, co_loc, "PE0");
}

co_architecture co_initialize(void * arg)
{
return co_architecture_create("hello", "sgi_rasc_vlog", config_hello, arg);
}


SW CODE

#include "co.h"
#include "cosim_log.h"
#include <stdlib.h>
#include <stdio.h>

extern co_architecture co_initialize(void *);


void SoftwareProcess(co_stream S1, co_stream S2)
{
co_uint64 nSample [32];
co_uint64 nResult [32];
co_uint64 i, j;
double app_st, app_end;


IF_SIM(cosim_logwindow log = cosim_logwindow_create("SoftwareProcess")wink.gif

co_stream_open(S1, O_WRONLY, UINT_TYPE(64));
co_stream_open(S2, O_RDONLY, UINT_TYPE(64));


for (j=0; j<32; j++)
{
nSample[j] = j;
}

co_stream_write(S1, &nSample, 32 * sizeof(co_uint64));

co_stream_read(S2, &nResult, 32 * sizeof(co_uint64));

co_iterate_hardware ();

for (i = 0; i <32; i++){
printf(" FPGA hardware returns: %08x\n", nResult[i]);
}



co_stream_close(S1);
co_stream_close(S2);

}

int main(int argc, char *argv[])
{
co_architecture my_arch;
IF_SIM(int c;)

printf("Impulse C is Copyright 2003-2005 Impulse Accelerated Technologies, Inc.\n");

my_arch = co_initialize(NULL);
co_execute(my_arch);

printf("\n\nApplication complete. Press the Enter key to continue.\n");
//IF_SIM(c = getc(stdin)wink.gif

return(0);
}

#4 RalphBodenner

    Advanced Member

  • Admin
  • PipPipPip
  • 348 posts

Posted 10 September 2008 - 06:10 PM

Hi Tony,

The PSP for the SGI RC100 does not support RASC 2.2 at this time, only 2.11. Is downgrading to the earlier version a possibility for you?

Regards,
Ralph
Ralph Bodenner
Impulse Accelerated Technologies, Inc.

#5 Tony

    Member

  • Members
  • PipPip
  • 24 posts

Posted 12 September 2008 - 07:32 AM

QUOTE (RalphBodenner @ Sep 10 2008, 06:10 PM) <{POST_SNAPBACK}>
Hi Tony,

The PSP for the SGI RC100 does not support RASC 2.2 at this time, only 2.11. Is downgrading to the earlier version a possibility for you?

Regards,
Ralph


I don't think it's possible for us to do it. However, I run the MersenneTwister32 example for SGI, it did work. Do u know any reason or solution for it? Thanks

Regards,
Tony

#6 Tony

    Member

  • Members
  • PipPip
  • 24 posts

Posted 16 September 2008 - 12:48 PM

QUOTE (Tony @ Sep 12 2008, 07:32 AM) <{POST_SNAPBACK}>
I don't think it's possible for us to do it. However, I run the MersenneTwister32 example for SGI, it did work. Do u know any reason or solution for it? Thanks

Regards,
Tony

Hi, can u send me or upload a helloworld example for SGI with one input stream and one output stream please, thanks

tony





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users