COPRTHR-2: Host calls from the epiphany

Moderator: dar

COPRTHR-2: Host calls from the epiphany

Postby nickoppen » Sun Nov 26, 2017 11:29 am

Hi,

Has anyone used USRCALL to execute a routine on the host from the co-processor? I'm giving it a go as a way of signalling back to the host that there is data in shared memory that can be retrieved.

Following the API ref to the letter, I declare and define my routine on the host:

Code: Select all
int epip_callback(int coreId, int i);
USRCALL(epip_callback, 1);
int epip_callback(int coreId, int i)
{
    printf("call back received from: %i", coreId);

}


and then in the Kernel:

Code: Select all
int epip_callback(int coreId, int i);

void __attribute__((interrupt)) int_isr()
{
    epip_callback(coprthr_corenum(), 0);
}


However, I get the compiler error:

gcc -g -DDEBUG -I. -I/usr/local/browndeer/coprthr2/include -I/opt/adapteva/esdk/tools/host/include -c egdma.c -o egdma.o
egdma.c:13:24: error: expected ‘)’ before numeric constant
USRCALL(epip_callback, 1);

(Up arrow under the 1)

If I remove the second argument the host compile but the call in the kernel code says that the call is undefined.

Does anyone understand USRCALL and how it works. The API ref is very terse.

nick
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 263
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: COPRTHR-2: Host calls from the epiphany

Postby dar » Mon Nov 27, 2017 7:41 pm

Nick,
I have implemented user-defined host calls. Let me look into this to see what is going on. I will follow up.
dar
 
Posts: 90
Joined: Mon Dec 17, 2012 3:26 am

Re: COPRTHR-2: Host calls from the epiphany

Postby nickoppen » Tue Nov 28, 2017 6:56 am

Thanks dar,

I've updated my git repository (https://github.com/nickoppen/egDMA) with the call back code in it.

nick
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 263
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: COPRTHR-2: Host calls from the epiphany

Postby dar » Sat Dec 09, 2017 2:54 pm

Nick,
Just an update. The documentation is unclear, but the bigger issue is that when I ported to the 2016 parallella image, symbol changes for this feature were overlooked. The changes from 2015 to 2016 images included completely changing the ABI symbol naming conventions and required going through and adjusting in many places. This got overlooked. I will update when I get this resolved and my test code is able to link.
-DAR
dar
 
Posts: 90
Joined: Mon Dec 17, 2012 3:26 am

Re: COPRTHR-2: Host calls from the epiphany

Postby nickoppen » Fri Dec 15, 2017 9:58 am

Thanks David,

I'll keep an eye out for updates.

nick
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 263
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia


Return to OpenCL

Who is online

Users browsing this forum: No registered users and 2 guests

cron