[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 - Software implemented code cache?

Software implemented code cache?

Forum for anything not suitable for the other forums.

Software implemented code cache?

Postby fredd » Wed Jan 09, 2013 6:59 pm

Many intresting use cases for Epiphany would require more than 16K of code (if one uses half of SRAM for code), and running code directly from DRAM on the host is far too slow. Since the architecture lacks hardware code/data caching one idea would be implement code caching to SRAM in software.

My idea is roughly: the compiler dives the compiled code into "pages" (I think 1k, but optimal size have to be found by testing), so the code of each function doesn't span over two pages. All pages are always present on shared DRAM, but the code thats currently running on a core well be in thats core's SRAM. When a function wants to call another function it instead jumps to helper code that checks if the function already are in SRAM, otherwise copies in the right page from DRAM, then calls it. (or maybe even from neighbouring cores, but that will probably require a lot more logic. I want the helper code small and simple)

Of course, some often called functions may need to be locked on SRAM, and called directly, so calling them is really fast. Or if function A very often calls function B the complier could put them on the same page so the call (using relative addressing) will be overhead free. At first alls this will need to be done with explicit code directives, but collecting runtime profile information to use at recompiles would be a intresting improvement. I also think that functions currently on stack should be locked, so returns always can be done directly.

Is this just a crazy idea or could it be turned into something useful? I think it would be useful for code where the "main loop logic" could be fit in say, 8k, but now and then needs to call a function from a large set of functions. (Think an interpreter for a reasonably complex language.) If one elaborates more on the idea it could be extended into a software MMU, shared libraries or even a OS. But I think just a (manually tuned) code cache will be a good start and enough in many cases.
fredd
 
Posts: 12
Joined: Wed Dec 19, 2012 1:09 pm

Re: Software implemented code cache?

Postby ed2k » Thu Jan 10, 2013 5:47 am

all these ideas are not new. once upon a time we only had 8KB memory. It just take time to adjust those old technology to the new epiphany arch. Don't forget our host is a powerful ARM core, so the adaptation should use the host as much as possible.
ed2k
 
Posts: 113
Joined: Mon Dec 17, 2012 3:27 am

Re: Software implemented code cache?

Postby fredd » Thu Jan 10, 2013 8:34 pm

fredd
 
Posts: 12
Joined: Wed Dec 19, 2012 1:09 pm

Re: Software implemented code cache?

Postby Folknology » Fri Jan 11, 2013 11:48 am

Just thinking out loud (so prob way of the mark) but what about a technique of using mobile processes much like that implemented by occam-Pi (http://www.cs.kent.ac.uk/projects/ofa/kroc/)

I would love to see a proper CSP implementation for Epiphany

PS you guys (really should make some connections with the guys in Kent I'm sure they would be interested)

regards
Al
User avatar
Folknology
 
Posts: 36
Joined: Mon Dec 17, 2012 3:25 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 8 guests