[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Accessing shared data in ERAM - A solution for the confused

Accessing shared data in ERAM - A solution for the confused

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

Moderator: aolofsson

Accessing shared data in ERAM - A solution for the confused

Postby AndyC » Thu Aug 21, 2014 9:19 pm

Last edited by AndyC on Fri Aug 22, 2014 2:58 pm, edited 1 time in total.
AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm

Re: Accessing shared data in ERAM - A solution for the confu

Postby notzed » Fri Aug 22, 2014 12:09 am

These topics have some background:

viewtopic.php?f=13&t=1655
viewtopic.php?f=23&t=1660

I still think it's pants because you're still just hard-coding the address labels: you could just as easily use a struct and assign it with thestruct=(void *)0x7000; instead, rather than messing about with linker scripts. The thing the linker is for is assigning addresses and coalescing block with the same parameters, doing it with a pen and paper is mental.

As soon as you have multiple variables in different compilation units (or libraries) it all collapses into an unmanageable mess: you can't manually put everything in one struct.
notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Re: Accessing shared data in ERAM - A solution for the confu

Postby AndyC » Fri Aug 22, 2014 4:57 am

Surely there is a difference?

If you hard code the address the linker may put other data there, therefore you have two things occupying the same address.

If you modify the linker script as I posted above then this will not happen.

Doesn't seem like pants to me!
AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm

Re: Accessing shared data in ERAM - A solution for the confu

Postby sebraa » Fri Aug 22, 2014 1:00 pm

You could always allocate a single dummy-block in a specific section, and then do accesses to that area through pointers, doing your own memory management. After all, that is how people use to implement malloc() and free() on embedded hardware (unless they run an operating system).

By the way, your ".section_fixed_x7000" overlaps both ".code" and ".data_bank3". I don't know whether the linker is bright enough to understand that. (In processors with different address spaces, it might or might not matter.)
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: Accessing shared data in ERAM - A solution for the confu

Postby AndyC » Fri Aug 22, 2014 1:16 pm

I must admit I thought the linker was bright enough, I took the idea from the matmul example which uses the same section.

I will fill up data_bank3 and see what happens.....
AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm

Re: Accessing shared data in ERAM - A solution for the confu

Postby AndyC » Fri Aug 22, 2014 1:21 pm

You are right

section_fixed_x7000 loaded at [00007000,0000700f] overlaps section .data_bank3 loaded at [00006000,00007fff]

I will check the matmul link file, maybe that has the same problem!
AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm

Re: Accessing shared data in ERAM - A solution for the confu

Postby AndyC » Fri Aug 22, 2014 1:37 pm

Yep the matmul example suffers from the same problem, great!
AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm

Re: Accessing shared data in ERAM - A solution for the confu

Postby AndyC » Fri Aug 22, 2014 3:07 pm

AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 7 guests

cron