How to run Tutorial 1: Component-based Development on Real FPGA development board

Recently, with the help of aolivarez and waltersdom, I tested that my third-party FGPA development board can use the ZCU102 solution. I now want to implement x86 (ubuntu) and FPGA data transmission interconnection based on network cables. I remembered Tutorial 1: Component-based Development, which is a good example. I want to port the original running on xsim to the real physical development board. What else do I need to do besides replacing xsim with zcu102 when compiling? At present, I found the bitstream file about zcu102 in the artifacts folder.
I have a few doubts now.

  1. If I only want to run HDL on the zynq series development board, do I still need to compile the arm platform (e.g. xilinx24_1_aarch64)?
  2. Do I need to run the ocpiremote command in the project folder to send the sandbox (fpga serve package) file to the FPGA development board?
  3. Do I also need to start additional services or configure ports, configuration scripts, etc. in the zynq development board?
  4. I want RCC to execute in ubuntu20_04, HDL to execute on the FPGA development board, there are relevant sample documents for reference?

Thank you very much for your selfless help

  1. Yes, the reason for that is that the command line utilities and kernel module need be cross compiled and running on the zcu102 arm for it facilitate the data transfer.

  2. Yes, by using ocpiremote load and ocpiremote start will make the RCC and HDL platforms available to your host.

  3. No, if you have your development host setup properly you do not need to setup any additional items on the zynq development board

  4. There are two different ways to let OpenCPI know where you want a worker to run. The first way is to utilize ocpirun , the -P flag can be used to specify which platform you want the worker to run. For more information you can look at man pages for ocpirun. The second way is to add XML attributes to the application XML by added Platform xml attribute to the component instance.

For example ocpidev run application DemoApp.xml --run-arg=' -Psource=zcu102

thank you,aolivarez!

hi,aolivarez:
I have now successfully checked the platform of zcu102.


When I run tutorial1 now, directly executing ocpidev run application DemoApp.xml will get stuck. I follow the command you gaveocpidev run application DemoApp.xml --run-arg = '-Psource = zcu102 to prompt that there is no --run-arg parameter.

1 Like

We use ocpidev run application because it takes out an additional step that may add confusion when first getting started.

This complicates the command you trying to run but ocpidev run application essential sits on on top of ocpirun command line utility. I will describe how to use it here and show running example of tutorial #1

One thing that ocpidev run application does in the background is set OCPI_LIBRARY_PATH environment variable correctly for you. When using ocpirun we have to set it ourselves. OCPI_LIBRARY_PATH does is lets OpenCPI framework know where to look for OpenCPI artifacts needed to run an OpenCPI application. Before we can use ocpirun it is imperative to set OCPI_LIBRARY_PATH variable correctly.

Running Tutorial 1 on Hardware

Assumptions

  • OpenCPI is installed
  • Tools are installed
  • HDL Platform is installed
  • RCC Platform is installed
  • ocpiremote load
  • ocpiremote start -b

Steps

  1. Run through Tutorial 1 (replace xsim with desired platform)
  2. Set OCPI_LIBRARY_PATH
  3. Run application using ocpirun

ocpirun

The following commands should get it going.

cd projects/DemoProject/applications
export OCPI_LIBRARY_PATH=../artifacts:../../core/artifacts
ocpirun -v -d DemoApp.xml

What to expect:

aaron@desktop:~/opencpi-v2.4.8-rc1/projects/DemoProject/applications$ ocpirun -v -d DemoApp.xml
OCPI( 2:262.0675): When searching for PCI device '0000:29:00.0': Can't open /dev/mem, forgot to load the driver? sudo?
OCPI( 2:262.0677): In HDL Container driver, got PCI search error: Can't open /dev/mem, forgot to load the driver? sudo?
Simulation HDL device lsim:xsim for xsim (UUID b675b04c-0477-11f0-974c-573d81cec5b8, dir simulations/xsim.xsim.109252.0, ticks 200000000)
Received server information from "192.168.1.2:12345".  Available containers are:
  192.168.1.2:12345/PL:0               platform libresdr, model hdl, os , version , arch , build 
    Transports: ocpi-dma-pio,00:0a:35:00:1e:53,0,0,0x41,0x101|ocpi-socket-rdma, ,1,0,0x42,0x41|
  192.168.1.2:12345/rcc0               platform xilinx24_1_aarch32, model rcc, os linux, version 24_1, arch aarch32, build 
    Transports: ocpi-dma-pio,00:0a:35:00:1e:53,1,0,0x103,0x103|ocpi-smb-pio,00:0a:35:00:1e:53,0,0,0xb,0xb|ocpi-socket-rdma, ,1,0,0x42,0x43|
Available containers are:  0: lsim:xsim [model: hdl os:  platform: xsim], 1: 192.168.1.2:12345/PL:0 [model: hdl os:  platform: libresdr], 2: 192.168.1.2:12345/rcc0 [model: rcc os: linux platform: xilinx24_1_aarch32], 3: rcc0 [model: rcc os: linux platform: ubuntu22_04]
Actual deployment is:
  Instance  0 source (spec local.DemoProject.source) on rcc container 3: rcc0, using source in ../artifacts//local.DemoProject.source.rcc.0.ubuntu22_04.so dated Tue Mar 18 23:01:32 2025
  Instance  1 ramp (spec local.DemoProject.ramp) on hdl container 1: 192.168.1.2:12345/PL:0, using ramp/a/ramp in ../artifacts//local.DemoProject.demo_assembly_libresdr_base.hdl.0.libresdr.bitz dated Tue Mar 18 23:05:41 2025
  Instance  2 square (spec local.DemoProject.square) on hdl container 1: 192.168.1.2:12345/PL:0, using square/a/square in ../artifacts//local.DemoProject.demo_assembly_libresdr_base.hdl.0.libresdr.bitz dated Tue Mar 18 23:05:41 2025
  Instance  3 ander (spec local.DemoProject.ander) on hdl container 1: 192.168.1.2:12345/PL:0, using ander/a/ander in ../artifacts//local.DemoProject.demo_assembly_libresdr_base.hdl.0.libresdr.bitz dated Tue Mar 18 23:05:41 2025
  Instance  4 file_write (spec ocpi.core.file_write) on rcc container 2: 192.168.1.2:12345/rcc0, using file_write in ../../core/artifacts/ocpi.core.file_write.rcc.0.xilinx24_1_aarch32.so dated Wed Feb 12 17:55:11 2025
Application XML parsed and deployments (containers and artifacts) chosen [3 s 70 ms]
Application established: containers, workers, connections all created [0 s 472 ms]
Dump of all initial property values:
Property   0: source.value = "128" (cached)
Property   1: source.nsamples = "2000" (cached)
Property  47: file_write.fileName = "output_file.bin"
Property  48: file_write.messagesInFile = "false"
Property  49: file_write.bytesWritten = "0"
Property  50: file_write.messagesWritten = "0"
Property  51: file_write.stopOnEOF = "true"
Property  55: file_write.suppressWrites = "false"
Property  56: file_write.countData = "false"
Property  57: file_write.bytesPerSecond = "0"
Application started/running [0 s 36 ms]
Waiting for application to finish (no time limit)
Application finished [0 s 0 ms]
Dump of all final property values:
Property   0: source.value = "128" (cached)
Property   1: source.nsamples = "2000" (cached)
Property  47: file_write.fileName = "output_file.bin"
Property  48: file_write.messagesInFile = "false"
Property  49: file_write.bytesWritten = "8000"
Property  50: file_write.messagesWritten = "1"
Property  51: file_write.stopOnEOF = "true"
Property  55: file_write.suppressWrites = "false"
Property  56: file_write.countData = "false"
Property  57: file_write.bytesPerSecond = "30968980"

Notice the lines starting with “Actual depoyment is”

The following lines will indicate where the application actually ran. In the log above notice “Instance 1” you can verify it ran on the PL side of the platform in my case PL:0 is libresdr

Take a look at “Instance 4” , this is where the file_write ran. It actually ran on the ARM cpu and not on my host. This means the file was written on the platform and not my host system.

With ocpirun I can now use the -P argument to force it run where I want it. In this example I’m going to force the file_write instance to run on my host instead of the device.

aaron@desktop:~/opencpi-v2.4.8-rc1/projects/DemoProject/applications$ ocpirun -v -d -P file_write=ubuntu22_04 DemoApp.xml
OCPI( 2:547.0195): When searching for PCI device '0000:29:00.0': Can't open /dev/mem, forgot to load the driver? sudo?
OCPI( 2:547.0197): In HDL Container driver, got PCI search error: Can't open /dev/mem, forgot to load the driver? sudo?
Simulation HDL device lsim:xsim for xsim (UUID 600a7a52-0478-11f0-b7a8-5b3f4975857e, dir simulations/xsim.xsim.109403.0, ticks 200000000)
Received server information from "192.168.1.2:12345".  Available containers are:
  192.168.1.2:12345/PL:0               platform libresdr, model hdl, os , version , arch , build 
    Transports: ocpi-dma-pio,00:0a:35:00:1e:53,0,0,0x41,0x101|ocpi-socket-rdma, ,1,0,0x42,0x41|
  192.168.1.2:12345/rcc0               platform xilinx24_1_aarch32, model rcc, os linux, version 24_1, arch aarch32, build 
    Transports: ocpi-dma-pio,00:0a:35:00:1e:53,1,0,0x103,0x103|ocpi-smb-pio,00:0a:35:00:1e:53,0,0,0xb,0xb|ocpi-socket-rdma, ,1,0,0x42,0x43|
Available containers are:  0: lsim:xsim [model: hdl os:  platform: xsim], 1: 192.168.1.2:12345/PL:0 [model: hdl os:  platform: libresdr], 2: 192.168.1.2:12345/rcc0 [model: rcc os: linux platform: xilinx24_1_aarch32], 3: rcc0 [model: rcc os: linux platform: ubuntu22_04]
Actual deployment is:
  Instance  0 source (spec local.DemoProject.source) on rcc container 3: rcc0, using source in ../artifacts//local.DemoProject.source.rcc.0.ubuntu22_04.so dated Tue Mar 18 23:01:32 2025
  Instance  1 ramp (spec local.DemoProject.ramp) on hdl container 1: 192.168.1.2:12345/PL:0, using ramp/a/ramp in ../artifacts//local.DemoProject.demo_assembly_libresdr_base.hdl.0.libresdr.bitz dated Tue Mar 18 23:05:41 2025
  Instance  2 square (spec local.DemoProject.square) on hdl container 1: 192.168.1.2:12345/PL:0, using square/a/square in ../artifacts//local.DemoProject.demo_assembly_libresdr_base.hdl.0.libresdr.bitz dated Tue Mar 18 23:05:41 2025
  Instance  3 ander (spec local.DemoProject.ander) on hdl container 1: 192.168.1.2:12345/PL:0, using ander/a/ander in ../artifacts//local.DemoProject.demo_assembly_libresdr_base.hdl.0.libresdr.bitz dated Tue Mar 18 23:05:41 2025
  Instance  4 file_write (spec ocpi.core.file_write) on rcc container 3: rcc0, using file_write in ../../core/artifacts/ocpi.core.file_write.rcc.0.ubuntu22_04.so dated Wed Feb 12 17:44:47 2025
Application XML parsed and deployments (containers and artifacts) chosen [3 s 57 ms]
Application established: containers, workers, connections all created [0 s 98 ms]
Dump of all initial property values:
Property   0: source.value = "128" (cached)
Property   1: source.nsamples = "2000" (cached)
Property  47: file_write.fileName = "output_file.bin" (cached)
Property  48: file_write.messagesInFile = "false" (cached)
Property  49: file_write.bytesWritten = "0"
Property  50: file_write.messagesWritten = "0"
Property  51: file_write.stopOnEOF = "true" (cached)
Property  55: file_write.suppressWrites = "false"
Property  56: file_write.countData = "false"
Property  57: file_write.bytesPerSecond = "0"
Application started/running [0 s 27 ms]
Waiting for application to finish (no time limit)
Application finished [0 s 0 ms]
Dump of all final property values:
Property   0: source.value = "128" (cached)
Property   1: source.nsamples = "2000" (cached)
Property  47: file_write.fileName = "output_file.bin" (cached)
Property  48: file_write.messagesInFile = "false" (cached)
Property  49: file_write.bytesWritten = "8000"
Property  50: file_write.messagesWritten = "1"
Property  51: file_write.stopOnEOF = "true" (cached)
Property  55: file_write.suppressWrites = "false" (cached)
Property  56: file_write.countData = "false" (cached)
Property  57: file_write.bytesPerSecond = "25710245"

You can have multiple -P arguments if needed. In my DemoProject I only have the hdl assembly built for libresdr if the artifacts directory contained the xsim when running without the -P it might choose the xsim hdl platform over the hardware platform.

Using ocpirun in my opinion gives you a little more control, it’s still possible to do the same with ocpidev run application using the --run-args but this removes a layer from running.

1 Like

Thank you very much, aolivarez, I didn’t expect your reply to be so patient and meticulous.

I am now following your instructions to configure OCPI_LIBRARY_PATH, but when I execute ocpirun -v -d DemoApp.xml, my development board seems to be stuck, it looks like it is completely frozen
The running log is similar to yours

vitis202401@hq:~/han/test/DemoProject1/applications$ export OCPI_LIBRARY_PATH=../artifacts/:/home/vitis202401/han/develop318/opencpi-develop/projects/core/artifacts
vitis202401@hq:~/han/test/DemoProject1/applications$ ocpirun -v -d DemoApp.xml
Received server information from "192.168.137.100:12345".  Available containers are:
  192.168.137.100:12345/PL:0           platform zcu102, model hdl, os , version , arch , build 
    Transports: ocpi-dma-pio,86:a0:9b:f7:cb:b4,0,0,0x41,0x101|ocpi-socket-rdma, ,1,0,0x42,0x41|
  192.168.137.100:12345/rcc0           platform xilinx24_1_aarch64, model rcc, os linux, version 24_1, arch aarch64, build 
    Transports: ocpi-dma-pio,86:a0:9b:f7:cb:b4,1,0,0x103,0x103|ocpi-smb-pio,86:a0:9b:f7:cb:b4,0,0,0xb,0xb|ocpi-socket-rdma, ,1,0,0x42,0x43|
Available containers are:  0: 192.168.137.100:12345/PL:0 [model: hdl os:  platform: zcu102], 1: 192.168.137.100:12345/rcc0 [model: rcc os: linux platform: xilinx24_1_aarch64], 2: rcc0 [model: rcc os: linux platform: ubuntu20_04]
Actual deployment is:
  Instance  0 source (spec local.DemoProject1.source) on rcc container 1: 192.168.137.100:12345/rcc0, using source in ../artifacts//local.DemoProject1.source.rcc.0.xilinx24_1_aarch64.so dated Tue Mar 18 22:24:55 2025
  Instance  1 ramp (spec local.DemoProject1.ramp) on hdl container 0: 192.168.137.100:12345/PL:0, using ramp/a/ramp in ../artifacts//local.DemoProject1.demo_assembly_zcu102_base.hdl.0.zcu102.bitz dated Wed Mar 12 04:13:42 2025
  Instance  2 square (spec local.DemoProject1.square) on hdl container 0: 192.168.137.100:12345/PL:0, using square/a/square in ../artifacts//local.DemoProject1.demo_assembly_zcu102_base.hdl.0.zcu102.bitz dated Wed Mar 12 04:13:42 2025
  Instance  3 ander (spec local.DemoProject1.ander) on hdl container 0: 192.168.137.100:12345/PL:0, using ander/a/ander in ../artifacts//local.DemoProject1.demo_assembly_zcu102_base.hdl.0.zcu102.bitz dated Wed Mar 12 04:13:42 2025
  Instance  4 file_write (spec ocpi.core.file_write) on rcc container 2: rcc0, using file_write in /home/vitis202401/han/develop318/opencpi-develop/projects/core/artifacts/ocpi.core.file_write.rcc.0.ubuntu20_04.so dated Tue Mar 18 03:29:49 2025
Application XML parsed and deployments (containers and artifacts) chosen [0 s 12 ms]

But it didn’t continue to run

The serial port log of the FPGA development board is printed as follows

% [10088.300114] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10088.306034] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=1494
[10088.315250] rcu:     (detected by 0, t=5255 jiffies, g=15717, q=25 ncpus=4)
[10088.321942] Task dump for CPU 1:
[10088.325153] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10088.335058] Call trace:
[10088.337488]  __switch_to+0xe4/0x15c
[10088.340977]  0xffff800081619c48
[10151.360115] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10151.366035] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=4647
[10151.375250] rcu:     (detected by 3, t=21020 jiffies, g=15717, q=1369 ncpus=4)
[10151.382203] Task dump for CPU 1:
[10151.385414] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10151.395327] Call trace:
[10151.397757]  __switch_to+0xe4/0x15c
[10151.401246]  0xffff800081619c48
[10214.420114] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10214.426036] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=7800
[10214.435251] rcu:     (detected by 3, t=36785 jiffies, g=15717, q=2218 ncpus=4)
[10214.442204] Task dump for CPU 1:
[10214.445414] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10214.455328] Call trace:
[10214.457758]  __switch_to+0xe4/0x15c
[10214.461247]  0xffff800081619c48
[10277.480114] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10277.486035] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=8111
[10277.495251] rcu:     (detected by 3, t=52550 jiffies, g=15717, q=2230 ncpus=4)
[10277.502203] Task dump for CPU 1:
[10277.505415] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10277.515319] Call trace:
[10277.517749]  __switch_to+0xe4/0x15c
[10277.521238]  0xffff800081619c48
[10277.524373] rcu: rcu_sched kthread timer wakeup didn't happen for 14209 jiffies! g15717 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
[10277.535664] rcu:     Possible timer handling issue on cpu=2 timer-softirq=116580
[10277.542782] rcu: rcu_sched kthread starved for 14210 jiffies! g15717 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=2
[10277.553120] rcu:     Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior.
[10277.562060] rcu: RCU grace-period kthread stack dump:
[10277.567095] task:rcu_sched       state:I stack:0     pid:14    ppid:2      flags:0x00000008
[10277.575436] Call trace:
[10277.577866]  __switch_to+0xe4/0x15c
[10277.581347]  __schedule+0x2c8/0x834
[10277.584828]  schedule+0x50/0xac
[10277.587961]  schedule_timeout+0x8c/0x100
[10277.591876]  rcu_gp_fqs_loop+0x114/0x3c4
[10277.595791]  rcu_gp_kthread+0xf0/0x104
[10277.599532]  kthread+0xe4/0xe8
[10277.602578]  ret_from_fork+0x10/0x20
[10277.606146] rcu: Stack dump where RCU GP kthread last ran:
[10277.611614] Task dump for CPU 2:
[10277.614826] task:systemd-userwor state:R  running task     stack:0     pid:1174  ppid:841    flags:0x00000800
[10277.624730] Call trace:
[10277.627160]  __switch_to+0xe4/0x15c
[10277.630641]  page_counter_uncharge+0x28/0x44
[10277.634903]  drain_stock+0x7c/0x84
[10277.638296]  __refill_stock+0x44/0xac
[10277.641951]  try_charge_memcg+0x678/0x6e8
[10277.645952]  charge_memcg+0x4c/0xb0
[10277.649433]  do_wp_page+0x3c0/0xbc0
[10277.652914]  __handle_mm_fault+0x778/0xce0
[10277.657002]  handle_mm_fault+0x6c/0x270
[10277.660830]  do_page_fault+0x14c/0x47c
[10277.664571]  do_mem_abort+0x44/0x94
[10277.668052]  el0_da+0x30/0x88
[10277.671011]  el0t_64_sync_handler+0xb8/0x12c
[10277.675273]  el0t_64_sync+0x190/0x194
[10340.512113] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10340.518023] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=8111
[10340.527232] rcu:     (detected by 3, t=68308 jiffies, g=15717, q=2272 ncpus=4)
[10340.534184] Task dump for CPU 1:
[10340.537396] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10340.547300] Call trace:
[10340.549730]  __switch_to+0xe4/0x15c
[10340.553211]  0xffff800081619c48
[10340.556345] rcu: rcu_sched kthread timer wakeup didn't happen for 29967 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200
[10340.567637] rcu:     Possible timer handling issue on cpu=2 timer-softirq=116580
[10340.574754] rcu: rcu_sched kthread starved for 29968 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200 ->cpu=2
[10340.585092] rcu:     Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior.
[10340.594033] rcu: RCU grace-period kthread stack dump:
[10340.599067] task:rcu_sched       state:R stack:0     pid:14    ppid:2      flags:0x00000008
[10340.607409] Call trace:
[10340.609839]  __switch_to+0xe4/0x15c
[10340.613320]  __schedule+0x2c8/0x834
[10340.616800]  schedule+0x50/0xac
[10340.619934]  schedule_timeout+0x8c/0x100
[10340.623848]  rcu_gp_fqs_loop+0x114/0x3c4
[10340.627763]  rcu_gp_kthread+0xf0/0x104
[10340.631504]  kthread+0xe4/0xe8
[10340.634551]  ret_from_fork+0x10/0x20
[10340.638119] rcu: Stack dump where RCU GP kthread last ran:
[10340.643587] Task dump for CPU 2:
[10340.646798] task:systemd-userwor state:R  running task     stack:0     pid:1174  ppid:841    flags:0x00000800
[10340.656702] Call trace:
[10340.659133]  __switch_to+0xe4/0x15c
[10340.662613]  page_counter_uncharge+0x28/0x44
[10340.666875]  drain_stock+0x7c/0x84
[10340.670269]  __refill_stock+0x44/0xac
[10340.673923]  try_charge_memcg+0x678/0x6e8
[10340.677925]  charge_memcg+0x4c/0xb0
[10340.681405]  do_wp_page+0x3c0/0xbc0
[10340.684886]  __handle_mm_fault+0x778/0xce0
[10340.688974]  handle_mm_fault+0x6c/0x270
[10340.692803]  do_page_fault+0x14c/0x47c
[10340.696543]  do_mem_abort+0x44/0x94
[10340.700024]  el0_da+0x30/0x88
[10340.702984]  el0t_64_sync_handler+0xb8/0x12c
[10340.707246]  el0t_64_sync+0x190/0x194
[10403.544113] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10403.550022] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=8111
[10403.559231] rcu:     (detected by 3, t=84066 jiffies, g=15717, q=2316 ncpus=4)
[10403.566183] Task dump for CPU 1:
[10403.569395] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10403.579298] Call trace:
[10403.581729]  __switch_to+0xe4/0x15c
[10403.585210]  0xffff800081619c48
[10403.588344] rcu: rcu_sched kthread timer wakeup didn't happen for 45725 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200
[10403.599635] rcu:     Possible timer handling issue on cpu=2 timer-softirq=116580
[10403.606753] rcu: rcu_sched kthread starved for 45726 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200 ->cpu=2
[10403.617091] rcu:     Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior.
[10403.626031] rcu: RCU grace-period kthread stack dump:
[10403.631066] task:rcu_sched       state:R stack:0     pid:14    ppid:2      flags:0x00000008
[10403.639407] Call trace:
[10403.641838]  __switch_to+0xe4/0x15c
[10403.645318]  __schedule+0x2c8/0x834
[10403.648799]  schedule+0x50/0xac
[10403.651932]  schedule_timeout+0x8c/0x100
[10403.655847]  rcu_gp_fqs_loop+0x114/0x3c4
[10403.659762]  rcu_gp_kthread+0xf0/0x104
[10403.663503]  kthread+0xe4/0xe8
[10403.666550]  ret_from_fork+0x10/0x20
[10403.670117] rcu: Stack dump where RCU GP kthread last ran:
[10403.675585] Task dump for CPU 2:
[10403.678797] task:systemd-userwor state:R  running task     stack:0     pid:1174  ppid:841    flags:0x00000800
[10403.688701] Call trace:
[10403.691132]  __switch_to+0xe4/0x15c
[10403.694612]  page_counter_uncharge+0x28/0x44
[10403.698874]  drain_stock+0x7c/0x84
[10403.702268]  __refill_stock+0x44/0xac
[10403.705922]  try_charge_memcg+0x678/0x6e8
[10403.709923]  charge_memcg+0x4c/0xb0
[10403.713404]  do_wp_page+0x3c0/0xbc0
[10403.716885]  __handle_mm_fault+0x778/0xce0
[10403.720973]  handle_mm_fault+0x6c/0x270
[10403.724801]  do_page_fault+0x14c/0x47c
[10403.728542]  do_mem_abort+0x44/0x94
[10403.732023]  el0_da+0x30/0x88
[10403.734983]  el0t_64_sync_handler+0xb8/0x12c
[10403.739245]  el0t_64_sync+0x190/0x194
[10466.576113] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10466.582020] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=8111
[10466.591230] rcu:     (detected by 3, t=99824 jiffies, g=15717, q=2357 ncpus=4)
[10466.598182] Task dump for CPU 1:
[10466.601393] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10466.611297] Call trace:
[10466.613727]  __switch_to+0xe4/0x15c
[10466.617208]  0xffff800081619c48
[10466.620333] rcu: rcu_sched kthread timer wakeup didn't happen for 61483 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200
[10466.631625] rcu:     Possible timer handling issue on cpu=2 timer-softirq=116580
[10466.638744] rcu: rcu_sched kthread starved for 61484 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200 ->cpu=2
[10466.649081] rcu:     Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior.
[10466.658021] rcu: RCU grace-period kthread stack dump:
[10466.663056] task:rcu_sched       state:R stack:0     pid:14    ppid:2      flags:0x00000008
[10466.671397] Call trace:
[10466.673828]  __switch_to+0xe4/0x15c
[10466.677308]  __schedule+0x2c8/0x834
[10466.680789]  schedule+0x50/0xac
[10466.683923]  schedule_timeout+0x8c/0x100
[10466.687837]  rcu_gp_fqs_loop+0x114/0x3c4
[10466.691752]  rcu_gp_kthread+0xf0/0x104
[10466.695493]  kthread+0xe4/0xe8
[10466.698540]  ret_from_fork+0x10/0x20
[10466.702107] rcu: Stack dump where RCU GP kthread last ran:
[10466.707575] Task dump for CPU 2:
[10466.710787] task:systemd-userwor state:R  running task     stack:0     pid:1174  ppid:841    flags:0x00000800
[10466.720691] Call trace:
[10466.723121]  __switch_to+0xe4/0x15c
[10466.726602]  page_counter_uncharge+0x28/0x44
[10466.730864]  drain_stock+0x7c/0x84
[10466.734258]  __refill_stock+0x44/0xac
[10466.737912]  try_charge_memcg+0x678/0x6e8
[10466.741914]  charge_memcg+0x4c/0xb0
[10466.745394]  do_wp_page+0x3c0/0xbc0
[10466.748875]  __handle_mm_fault+0x778/0xce0
[10466.752963]  handle_mm_fault+0x6c/0x270
[10466.756791]  do_page_fault+0x14c/0x47c
[10466.760532]  do_mem_abort+0x44/0x94
[10466.764013]  el0_da+0x30/0x88
[10466.766973]  el0t_64_sync_handler+0xb8/0x12c
[10466.771235]  el0t_64_sync+0x190/0x194
[10529.608113] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10529.614019] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=8111
[10529.623228] rcu:     (detected by 3, t=115582 jiffies, g=15717, q=2401 ncpus=4)
[10529.630267] Task dump for CPU 1:
[10529.633479] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10529.643383] Call trace:
[10529.645813]  __switch_to+0xe4/0x15c
[10529.649294]  0xffff800081619c48
[10529.652428] rcu: rcu_sched kthread timer wakeup didn't happen for 77241 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200
[10529.663720] rcu:     Possible timer handling issue on cpu=2 timer-softirq=116580
[10529.670837] rcu: rcu_sched kthread starved for 77242 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200 ->cpu=2
[10529.681175] rcu:     Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior.
[10529.690115] rcu: RCU grace-period kthread stack dump:
[10529.695150] task:rcu_sched       state:R stack:0     pid:14    ppid:2      flags:0x00000008
[10529.703491] Call trace:
[10529.705922]  __switch_to+0xe4/0x15c
[10529.709403]  __schedule+0x2c8/0x834
[10529.712883]  schedule+0x50/0xac
[10529.716017]  schedule_timeout+0x8c/0x100
[10529.719931]  rcu_gp_fqs_loop+0x114/0x3c4
[10529.723846]  rcu_gp_kthread+0xf0/0x104
[10529.727587]  kthread+0xe4/0xe8
[10529.730634]  ret_from_fork+0x10/0x20
[10529.734201] rcu: Stack dump where RCU GP kthread last ran:
[10529.739670] Task dump for CPU 2:
[10529.742881] task:systemd-userwor state:R  running task     stack:0     pid:1174  ppid:841    flags:0x00000800
[10529.752785] Call trace:
[10529.755216]  __switch_to+0xe4/0x15c
[10529.758696]  page_counter_uncharge+0x28/0x44
[10529.762958]  drain_stock+0x7c/0x84
[10529.766352]  __refill_stock+0x44/0xac
[10529.770006]  try_charge_memcg+0x678/0x6e8
[10529.774008]  charge_memcg+0x4c/0xb0
[10529.777488]  do_wp_page+0x3c0/0xbc0
[10529.780969]  __handle_mm_fault+0x778/0xce0
[10529.785057]  handle_mm_fault+0x6c/0x270
[10529.788885]  do_page_fault+0x14c/0x47c
[10529.792626]  do_mem_abort+0x44/0x94
[10529.796107]  el0_da+0x30/0x88
[10529.799067]  el0t_64_sync_handler+0xb8/0x12c
[10529.803329]  el0t_64_sync+0x190/0x194
[10592.640113] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[10592.646026] rcu:     1-...0: (3 ticks this GP) idle=2684/1/0x4000000000000000 softirq=9624/9626 fqs=8111
[10592.655235] rcu:     (detected by 3, t=131340 jiffies, g=15717, q=2443 ncpus=4)
[10592.662275] Task dump for CPU 1:
[10592.665486] task:ocpiserve       state:R  running task     stack:0     pid:1038  ppid:1      flags:0x00000002
[10592.675390] Call trace:
[10592.677820]  __switch_to+0xe4/0x15c
[10592.681301]  0xffff800081619c48
[10592.684435] rcu: rcu_sched kthread timer wakeup didn't happen for 92999 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200
[10592.695727] rcu:     Possible timer handling issue on cpu=2 timer-softirq=116580
[10592.702845] rcu: rcu_sched kthread starved for 93000 jiffies! g15717 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x200 ->cpu=2
[10592.713182] rcu:     Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior.
[10592.722123] rcu: RCU grace-period kthread stack dump:
[10592.727157] task:rcu_sched       state:R stack:0     pid:14    ppid:2      flags:0x00000008
[10592.735499] Call trace:
[10592.737929]  __switch_to+0xe4/0x15c
[10592.741410]  __schedule+0x2c8/0x834
[10592.744891]  schedule+0x50/0xac
[10592.748024]  schedule_timeout+0x8c/0x100
[10592.751939]  rcu_gp_fqs_loop+0x114/0x3c4
[10592.755853]  rcu_gp_kthread+0xf0/0x104
[10592.759595]  kthread+0xe4/0xe8
[10592.762641]  ret_from_fork+0x10/0x20
[10592.766209] rcu: Stack dump where RCU GP kthread last ran:
[10592.771677] Task dump for CPU 2:
[10592.774889] task:systemd-userwor state:R  running task     stack:0     pid:1174  ppid:841    flags:0x00000800
[10592.784793] Call trace:
[10592.787223]  __switch_to+0xe4/0x15c
[10592.790704]  page_counter_uncharge+0x28/0x44
[10592.794965]  drain_stock+0x7c/0x84
[10592.798359]  __refill_stock+0x44/0xac
[10592.802014]  try_charge_memcg+0x678/0x6e8
[10592.806015]  charge_memcg+0x4c/0xb0
[10592.809496]  do_wp_page+0x3c0/0xbc0
[10592.812976]  __handle_mm_fault+0x778/0xce0
[10592.817065]  handle_mm_fault+0x6c/0x270
[10592.820893]  do_page_fault+0x14c/0x47c
[10592.824634]  do_mem_abort+0x44/0x94
[10592.828114]  el0_da+0x30/0x88
[10592.831074]  el0t_64_sync_handler+0xb8/0x12c
[10592.835336]  el0t_64_sync+0x190/0x194

I remember the example where I successfully ran on the FPGA board according to your instructions.
So I found the bias.xml file in the cdk/zcu102/sdcard-xilinx24_1_aarch64/opencpi/application folder
I have configured the PATH path.
Able to run successfully

vitis202401@hq:~/han/develop318/opencpi-develop/cdk/zcu102/sdcard-xilinx24_1_aarch64/opencpi/applications$ ocpirun -v -d -m bias=hdl testbias.xml
Received server information from "192.168.137.100:12345".  Available containers are:
  192.168.137.100:12345/PL:0           platform zcu102, model hdl, os , version , arch , build 
    Transports: ocpi-dma-pio,92:56:71:80:f6:84,0,0,0x41,0x101|ocpi-socket-rdma, ,1,0,0x42,0x41|
  192.168.137.100:12345/rcc0           platform xilinx24_1_aarch64, model rcc, os linux, version 24_1, arch aarch64, build 
    Transports: ocpi-dma-pio,92:56:71:80:f6:84,1,0,0x103,0x103|ocpi-smb-pio,92:56:71:80:f6:84,0,0,0xb,0xb|ocpi-socket-rdma, ,1,0,0x42,0x43|
Available containers are:  0: 192.168.137.100:12345/PL:0 [model: hdl os:  platform: zcu102], 1: 192.168.137.100:12345/rcc0 [model: rcc os: linux platform: xilinx24_1_aarch64], 2: rcc0 [model: rcc os: linux platform: ubuntu20_04]
Actual deployment is:
  Instance  0 file_read (spec ocpi.core.file_read) on rcc container 2: rcc0, using file_read in /home/vitis202401/han/develop318/opencpi-develop/projects/core/artifacts/ocpi.core.file_read.rcc.0.ubuntu20_04.so dated Tue Mar 18 03:29:46 2025
  Instance  1 bias (spec ocpi.core.bias) on hdl container 0: 192.168.137.100:12345/PL:0, using bias_vhdl/a/bias_vhdl in ../artifacts//testbias_zcu102_base.bitz dated Tue Mar 18 04:36:38 2025
  Instance  2 file_write (spec ocpi.core.file_write) on rcc container 2: rcc0, using file_write in /home/vitis202401/han/develop318/opencpi-develop/projects/core/artifacts/ocpi.core.file_write.rcc.0.ubuntu20_04.so dated Tue Mar 18 03:29:49 2025
Application XML parsed and deployments (containers and artifacts) chosen [0 s 39 ms]
Application established: containers, workers, connections all created [0 s 51 ms]
Dump of all initial property values:
Property   0: file_read.fileName = "test.input" (cached)
Property   1: file_read.messagesInFile = "false" (cached)
Property   2: file_read.opcode = "0" (cached)
Property   3: file_read.messageSize = "16"
Property   4: file_read.granularity = "4" (cached)
Property   5: file_read.repeat = "false"
Property   6: file_read.bytesRead = "0"
Property   7: file_read.messagesWritten = "0"
Property   8: file_read.suppressEOF = "false"
Property   9: file_read.badMessage = "false"
Property  16: bias.biasValue = "16909060"
Property  20: bias.test64 = "0"
Property  31: file_write.fileName = "test.output" (cached)
Property  32: file_write.messagesInFile = "false" (cached)
Property  33: file_write.bytesWritten = "0"
Property  34: file_write.messagesWritten = "0"
Property  35: file_write.stopOnEOF = "true" (cached)
Property  39: file_write.suppressWrites = "false"
Property  40: file_write.countData = "false"
Property  41: file_write.bytesPerSecond = "0"
Application started/running [0 s 3 ms]
Waiting for application to finish (no time limit)
Application finished [0 s 70 ms]
Dump of all final property values:
Property   0: file_read.fileName = "test.input" (cached)
Property   1: file_read.messagesInFile = "false" (cached)
Property   2: file_read.opcode = "0" (cached)
Property   3: file_read.messageSize = "16"
Property   4: file_read.granularity = "4" (cached)
Property   5: file_read.repeat = "false" (cached)
Property   6: file_read.bytesRead = "4000"
Property   7: file_read.messagesWritten = "250"
Property   8: file_read.suppressEOF = "false" (cached)
Property   9: file_read.badMessage = "false"
Property  16: bias.biasValue = "16909060"
Property  20: bias.test64 = "0"
Property  31: file_write.fileName = "test.output" (cached)
Property  32: file_write.messagesInFile = "false" (cached)
Property  33: file_write.bytesWritten = "4000"
Property  34: file_write.messagesWritten = "250"
Property  35: file_write.stopOnEOF = "true" (cached)
Property  39: file_write.suppressWrites = "false" (cached)
Property  40: file_write.countData = "false" (cached)
Property  41: file_write.bytesPerSecond = "176141"
vitis202401@hq:~/han/develop318/opencpi-develop/cdk/zcu102/sdcard-xilinx24_1_aarch64/opencpi/applications$ ls
bias.xml  hello.xml    proxybias.xml    ptest.xml  testbias2.xml  testbias.xml      test.input     test.output           test_source_to_dev_null.xml
copy.xml  nothing.xml  ptest-delay.xml  run.sh     testbias5.xml  test_capture.xml  test_loop.xml  test_source_sink.xml  test_source_ts_sink.xml

And found the generated test.output

So it seems that the problem is that some parameters were not configured when I created the project or compiled. I will try to recreate the project. Do you just need to replace xsim with zcu102? Do you also need to add any parameters to the xml file?

Yes, that’s all I did differently, replaced xsim with the hdl platform name on all the ocpidev build steps in the tutorial.

After I recreate the project, it can run normally. Thank you,aolivarez, thank you very much for your patience and guidance.

1 Like

Glad to hear you got it running. You’re welcome.

Thanks for sticking with it.

2 Likes