-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot statically allocate task to multicore #25
Comments
By default the zynq7k runtime is monoprocessor, as seen in s-bbpara.ads: Max_Number_Of_CPUs : constant := 1; You will need to change this value to 2 to be able to use the two cores. Best regards,
|
Hi @lambourg, I've modified The error message is not so explanatory, maybe you can give me more details. P.S. I've also tried, just to check, to re-build other runtime library. The same error appears re-compiling the |
How are you rebuilding the runtime? |
Simply by opening |
@lambourg, I'm an idiot. I was attempting to compile the runtime library of GNAT 2019 using the GNAT 2020 toolchain... I had not noticed that the GNAT 2020 installation interfered with that of GNAT 2019. Now the compilation ends successfully. Now, with the new runtime, the tasks seems to be scheduled on the cores. Not sure if this happens for both cores and for the whole task set, but I'm checking. |
Yes, the build system for the runtime has changed between the two releases, and are not compatible. We've just updated the README to take this change into account. Best regards,
|
Hi,
I'm working with the CoraZ7-10 dual core version (Zynq-7000) and GNAT 2019.
I'd like to run a multitasking application whose tasks are statically allocated to the cores. For instance:
Task_1
must run on first core, whileTask_2
on the second one.Following this presentation, I've tried what they suggest on slide 21.
Here is my code
Main
Pkg laborer spec
Pkg laborer body
This code does not compile because, on laborer spec, the compiler says "Affinity" is undefined.
So, I've tried this:
Main
Pkg worker spec
Pkg worker body
This code compiles, but it does not work.
Using XSDB, I can see that only the
main
procedure is scheduled on the first core, while the tasks defined inpackage worker
(i.e.WORK_1
andWORK_2
) are never scheduled on any core.So, I've set two breakpoints just to see what is happening. The first is set on the
null;
instruction in the main procedure loop, while the second one is set on theend loop;
instruction of the same loop.Something quite strange happens, as you can see in the following images.
The
Is_Multi
variable is set to0
, i.e.False
. So, this means that the runtime environment is not aware of the second core. Isn't it? That would be a bad news.However, the
No_CPU
variable is set to2
, so two cores are detected, right?On the second breakpoint, as seen in the previous image, the
No_CPU
variable is set to16
!This confuses me a lot.
This is my project file
What am I doing wrong? Thanks in advance.
The text was updated successfully, but these errors were encountered: