[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/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 - How to wake up an idle core?

How to wake up an idle core?

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

Moderator: aolofsson

How to wake up an idle core?

Postby jose » Mon Apr 15, 2013 12:22 pm

jose
 
Posts: 5
Joined: Mon Apr 15, 2013 11:18 am

Re: How to wake up an idle core?

Postby timpart » Mon Apr 15, 2013 1:23 pm

I'm no expert on this but I think raising e_sync is the same as calling e_start function which basically in C based languages sets up the runtime environment then executes main. So your core goes into main which then presumably calls the wait loop.

It might work better if you remove the wait code, load the program into the second core but don't run it, then the e_sync can start it when the first core is ready.

The experts can probably give you a better answer though and correct any mistakes I've made.

In particular is it possible to have core 2 waiting or idling and then get it to continue rather than reset. Would the signal interrupt be better? If so how do you use it properly?

Tim
timpart
 
Posts: 302
Joined: Mon Dec 17, 2012 3:25 am
Location: UK

Re: How to wake up an idle core?

Postby ysapir » Mon Apr 15, 2013 8:13 pm

@jose,

The SYNC signal should be fired when the core is in IDLE state. When fired, the core jumps to the 1st entry in the IVT. Normally, that entry point to main(). Thus, it makes a little sense to go into a wait loop, then fire SYNC. It should actually be done using the SW_INT interrupt, but then, an ISR has to be implemented.

Alternatively, just as @timpart writes, you load, but don't start the second (slave) core. Then, the 1st core (master) can use e_irq_remote_raise() to fire the slave's SYNC signal.

Your code for core(32,36) is basically correct - as this is what should be done to fire that interrupt on (32,37) - but there's a discrepancy I just found in the e-lib. It happens that the interrupt routines where designed according to the POSIX standard for signalling, but the Epiphany signal names (numbers, actually) are different. So, in order to fire the SYNC signal, please use (E_SYNC + 3) instead of just E_SYNC.

I attach a sample project to demonstrate this technique.
Attachments
interrupt-test.tgz
(2.13 KiB) Downloaded 1219 times
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: How to wake up an idle core?

Postby jeinstei » Thu Jun 06, 2013 5:57 pm

ysapir-

Does the SW_INT bring the processor out of idle and continue at the PC after serving the interrupt?
jeinstei
 
Posts: 12
Joined: Mon Dec 17, 2012 3:27 am

Re: How to wake up an idle core?

Postby ysapir » Thu Jun 06, 2013 7:09 pm

User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 111 guests