cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lkdi15
Visitor
Visitor
514 Views
Registered: ‎11-18-2020

latency measurement using libmetal amp demo

I am trying to meausre latency values of packet transfer between R5 and A53 on zcu102 board using libmetal amp demo template . 

my dtsi changes are as follows - 

amba {
/* Shared memory */
shm0: shm@0 {
compatible = "shm_uio";
reg = <0x0 0x3ed80000 0x0 0x1000000>;
};
/* IPI device */
ipi_amp: ipi@ff340000 {
compatible = "ipi_uio";
reg = <0x0 0xff340000 0x0 0x1000>;
interrupt-parent = <&gic>;
interrupts = <0 29 4>;
};
};
};&ttc0 {
compatible = "ttc0";
status = "okay";
};

 

 

when i load the .elf generated from libmetal amp demo using vitis using remote proc and then run libmetal_amp_demo exisiting in /usr/bin i get this error

 

metal: info: Registered shmem provider linux_shm.
metal: info:
SERVER> Demo has started.

SERVER> Shared memory test finished

SERVER> ====== libmetal demo: atomic operation over shared memory ======

SERVER> Starting atomic add on shared memory demo.
Registered shmem provider ion.reserved.
metal: info: Registered shmem provider ion.ion_system_contig_heap.
metal: info: Registered shmem provider ion.ion_system_heap.
CLIENT> ****** libmetal demo: shared memory ******
metal: info: metal_uio_dev_open: No IRQ for device 3ed80000.shm.
CLIENT> Setting up shared memory demo.
CLIENT> Starting shared memory demo.
CLIENT> Sending message: Hello World - libmetal shared memory demo
CLIENT> Message Received: Hello World - libmetal shared memory demo
CLIENT> Shared memory demo: Passed.
CLIENT> ****** libmetal demo: atomic operation over shared memory ******
metal: info: metal_uio_dev_open: No IRQ for device 3ed80000.shm.
metal: info: device ff340000.ipi in use by driver uio_dmem_genirq
metal: error: failed to scan class path /sys/devices/platform/amba/ff340000.ipi/uio
CLIENT> ERROR: Failed to open device ff340000.ipi.
CLIENT> ERROR: shared memory atomic demo failed.

 

looks like interrupt ff340000.ipi is already being used by other driver and is not a shared interrupt .

Has anyone seen this error and know the solution for this ?

0 Kudos
3 Replies
talvlad29
Observer
Observer
360 Views
Registered: ‎05-28-2019

Hi,

I had the same issue. I did not find who used this IPI channel. I just switched it to another IPI channel (i.e. Channel 9, 0xFF360000) and it works.

BTW, You need to set interrupts and IPI mask correctly as well (2 steps below). 

1. In system-user.dtsi file change IPI channel

....

reg = <0x0 0xff360000 0x0 0x1000>;
interrupt-parent = <&gic>;
interrupts = <0 31 4>; 

...

2. In common.h file for Cortex_R5_0 core change IPI mask to accept interrupts from correct IPI channel:

//#define IPI_MASK 0x1000000 /* IPI mask for kick from APU. We use PL0 IPI in this demo. */
#define IPI_MASK 0x4000000 /* IPI mask for kick from APU. We use PL2 IPI in this demo. */

Regards,

Vladimir

 

0 Kudos
talvlad29
Observer
Observer
326 Views
Registered: ‎05-28-2019

One more think,

3. In common.h file for Linux application change IPI_DEV_NAME:

//#define IPI_DEV_NAME  "ff340000.ipi"

#define IPI_DEV_NAME  "ff360000.ipi"

0 Kudos
mrbietola
Scholar
Scholar
195 Views
Registered: ‎05-31-2012

@talvlad29  did you measure the latency? with openamp seems pretty slow

0 Kudos