UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant saber26
Participant
6,126 Views
Registered: ‎03-18-2014

Running 2 tasks on both CPU of the Zynq

Hello every body,

 

I am trying ton run two tasks (one on the fisrt CPU other on the second) under FreeRTOS or Linux. I have installed FreeRTOS on the Zynq. I have tested it by running 2 tasks on one CPU and it ok.
But i don't how to share both CPU.

 

Via SDK i create a project (using ps7_cortexa9_0) than another one (using ps7_cortexa9_1) and in the main of each one i create my tasks. How to link between each projetc ? i mean how to link between each task in each Core ?

 

Thanks a lot

0 Kudos
6 Replies
Scholar stephenm
Scholar
6,124 Views
Registered: ‎05-06-2012

Re: Running 2 tasks on both CPU of the Zynq

0 Kudos
Participant saber26
Participant
6,114 Views
Registered: ‎03-18-2014

Re: Running 2 tasks on both CPU of the Zynq

Hello, 

 

Thaks for your reply. 

But what i want to do is a sample SMP architecture. I mean a single OS to utilize both cores and scedule 2 tasks for example on both cores.

 

Best regards

0 Kudos
Scholar milosoftware
Scholar
6,107 Views
Registered: ‎10-26-2012

Re: Running 2 tasks on both CPU of the Zynq

If you run Linux on the zynq, it will automatically allocate tasks to CPUs as it sees fit. It will do a better job than manually assigning tasks to cores, even though it allows you to bind tasks to cores if you insist.

0 Kudos
Participant saber26
Participant
6,092 Views
Registered: ‎03-18-2014

Re: Running 2 tasks on both CPU of the Zynq

Thanks.

 

But how bind tasks to core ? I mean i want to choose the core that will contain the task is it possible to do that ?

0 Kudos
Xilinx Employee
Xilinx Employee
6,084 Views
Registered: ‎02-01-2008

Re: Running 2 tasks on both CPU of the Zynq

Sounds like you want to set processor affinity. Do a google search for the C functions or command line options.

0 Kudos
Scholar milosoftware
Scholar
6,075 Views
Registered: ‎10-26-2012

Re: Running 2 tasks on both CPU of the Zynq

Just google on "cpu affinity".

 

Be aware that manually assigning threads to CPUs will invariably result in lower performance. Don't do it - unless there's a very specific reason that you know better than the OS how to schedule processes.

 

I'm very curious to what you are trying to accomplish. Please tell us why you think you can do better than the Linux scheduler!

0 Kudos