User avatar
Burngate
Posts: 5661
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Using another core on Pi 2B

Wed Feb 11, 2015 7:14 pm

On another thread (http://www.raspberrypi.org/forums/viewt ... 31&t=99710) rhapsody asked a question that set me thinking.
I'm not well up on such things, so I didn't want to interrupt that thread with off-topic trivia, so I thought I'd ask on a new thread.

One of the draw-backs of most none-real-time OS's such as Linux or RISC OS is that they take time out to do housekeeping, so we don't know when things are going to happen.
My preferred OS is RISC OS, which isn't (as yet, to my knowledge) multi-core aware.
On the Pi B+, I've had "problems" driving a couple of 32x16 LED panels, because as soon as the Pi wanders off to do other stuff, one line is left lit for too long, causing flickering.
I did look into a hardware buffer to flatten out the timing, but it gets expensive and clutzy.

But we now have four cores, so would it be possible to reserve one of them to do the real-time stuff, and just feed a buffer from the other cores with what we want to output down the GPIOs?

Core 0 running RISC OS, with an area of ram set up as a buffer
Core 1 ... unused
Core 2 ... unused
Core 3 bare-metal program reading that area of ram, and driving GPIOs

My areas of ignorance:
I'm fairly happy about accessing the GPIOs from assembler inside RISC OS (not a problem on B or B+ though there are elephant-traps on 2) but there're probably things I'll need to do to set it up.
I'm not sure how to create an area of ram that other threads can see.
How do we access another core, to bring it awake, point it at its program (that will be probably small enough to fit into the L1 cache, if that makes much difference), and enable it to see the buffer?

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: Using another core on Pi 2B

Thu Feb 12, 2015 7:07 am

RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

User avatar
Burngate
Posts: 5661
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Using another core on Pi 2B

Thu Feb 12, 2015 10:32 am

Thankyou for those two - I'll spend some time looking at them.
I knew I was either away with the fairies or re-inventing the wheel. Just glad it's the latter rather than the former.

Got to go rescue my father-in-law - he can't place his order with Sainsbury's. I'll be back tomorrow.

User avatar
DavidS
Posts: 3710
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Using another core on Pi 2B

Sun Feb 15, 2015 6:19 pm

I have wondered about using the extra cores on multi core ARM systems running RISC OS as soft hardware. Then we could have very inexpensive HW options for RISC OS, just add the correct connector to the GPIO, or in the case of a delta sigma ADC a couple of resisters and an adaptor (great low freq (up to 10M samples per second on the RPi) software digital osciloscope).

This would give the availability of VGA, PS/2, and any number of other periphials for very little cost. And RISC OS seems the perfect base for such as the OS and Applications only use one core at most.
The Raspberry Pi is an ARM computer, that runs many Operating Systems, including Linux, RISC OS, BSD, Pi64, CP/M as well as many more.
Soon to add AROS to the list of operating systems.

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Using another core on Pi 2B

Mon Feb 16, 2015 9:07 am

DavidS wrote:I have wondered about using the extra cores on multi core ARM systems running RISC OS as soft hardware. Then we could have very inexpensive HW options for RISC OS, just add the correct connector to the GPIO, or in the case of a delta sigma ADC a couple of resisters and an adaptor (great low freq (up to 10M samples per second on the RPi) software digital osciloscope).

This would give the availability of VGA, PS/2, and any number of other periphials for very little cost. And RISC OS seems the perfect base for such as the OS and Applications only use one core at most.
VGA is already supported. see vga666 which uses the HW DPI interface

User avatar
DavidS
Posts: 3710
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Using another core on Pi 2B

Mon Feb 16, 2015 1:33 pm

mimi123 wrote:
DavidS wrote:I have wondered about using the extra cores on multi core ARM systems running RISC OS as soft hardware. Then we could have very inexpensive HW options for RISC OS, just add the correct connector to the GPIO, or in the case of a delta sigma ADC a couple of resisters and an adaptor (great low freq (up to 10M samples per second on the RPi) software digital osciloscope).

This would give the availability of VGA, PS/2, and any number of other periphials for very little cost. And RISC OS seems the perfect base for such as the OS and Applications only use one core at most.
VGA is already supported. see vga666 which uses the HW DPI interface
VGA was an example. My point being we could have any HW interface that can be read write bit banged through the GPIO (in some cases with the addition of a few resisters, in others just a connector) Without using any other IC's.
The Raspberry Pi is an ARM computer, that runs many Operating Systems, including Linux, RISC OS, BSD, Pi64, CP/M as well as many more.
Soon to add AROS to the list of operating systems.

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Using another core on Pi 2B

Mon Feb 16, 2015 2:02 pm

DavidS wrote:
mimi123 wrote:
DavidS wrote:I have wondered about using the extra cores on multi core ARM systems running RISC OS as soft hardware. Then we could have very inexpensive HW options for RISC OS, just add the correct connector to the GPIO, or in the case of a delta sigma ADC a couple of resisters and an adaptor (great low freq (up to 10M samples per second on the RPi) software digital osciloscope).

This would give the availability of VGA, PS/2, and any number of other periphials for very little cost. And RISC OS seems the perfect base for such as the OS and Applications only use one core at most.
VGA is already supported. see vga666 which uses the HW DPI interface
VGA was an example. My point being we could have any HW interface that can be read write bit banged through the GPIO (in some cases with the addition of a few resisters, in others just a connector) Without using any other IC's.
There is the VPU which has a full RTOS with SMP<ThreadX> :roll:
I see that as more adapted with a AMP-capable RiscOS(which runs a RISC OS instance per app and then compose them)

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Using another core on Pi 2B

Sun Feb 22, 2015 10:30 am

I got the 4 cores working under ROS.It's just adding the right address(I found it on the bare-metal forum).

User avatar
DavidS
Posts: 3710
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Using another core on Pi 2B

Sat Mar 14, 2015 12:21 pm

mimi123 wrote:I got the 4 cores working under ROS.It's just adding the right address(I found it on the bare-metal forum).
Could you link the thread?

I am very interested in the possibilities.
The Raspberry Pi is an ARM computer, that runs many Operating Systems, including Linux, RISC OS, BSD, Pi64, CP/M as well as many more.
Soon to add AROS to the list of operating systems.

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: Using another core on Pi 2B

Thu Apr 09, 2015 7:40 pm

RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

Return to “RISCOS”