Proper way to get the registers from core to the host

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Proper way to get the registers from core to the host

Postby dmarquez » Tue Dec 16, 2014 10:26 pm

Hi everybody,

I am currently working on a simple debugger. For that end I am trying to read the general purpose registers of all cores from core 0 and write that to the host. To do that, after waking up all the cores and sending them to idle, I use the following code (in C, only for core 1 1, from core 0):

Code: Select all
int registers[128];
e_read(&e_group_config, (void*)registers, 1, 1,
   (void*)PAGE_REG, 128 * sizeof(int));

e_write(&e_emem_config, (void*)registers, 0, 0,
   (void*)REG_ADDRESS, 128 * sizeof(int));


REG_ADDRESS corresponds to a random address I chose which is in host memory (0x01002000). PAGE_REG corresponds to 0xF0000.

This does not seem to work, since all positions in the array "registers" contain the same value: the value of register R0 for the corresponding core. I could not find anything in the documentation or the forums on this.

What would be the proper way of getting the register values?

Thanks in advance!
User avatar
dmarquez
 
Posts: 4
Joined: Mon Dec 15, 2014 10:06 pm

Re: Proper way to get the registers from core to the host

Postby aolofsson » Wed Dec 31, 2014 2:06 pm

Sorry for the slow reply..so ust to confirm you you are tying to run the following program in core 1,1:

1.) Read register values from core 0,0 into and place them in the variable registers (why 128?)
2.) Copy the registers[128] values to DRAM.

At first look, I think your REG_ADDRESS is wrong...(that is the address as seen from the host)

https://github.com/adapteva/epiphany-li ... B/fast.ldf

Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Proper way to get the registers from core to the host

Postby dmarquez » Thu Jan 08, 2015 7:26 pm

No problem, I continue working on.
In my example, I try to read a register, from a remote core. The number 128 that you mention is a mistake, the registers count is 64.

Have you an example for reading register from a remote core?. I realize that it is not possible to read if the core is running. The core must to be halt for make the reading?

Thanks in advance,
David.
User avatar
dmarquez
 
Posts: 4
Joined: Mon Dec 15, 2014 10:06 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 2 guests

cron