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: 
Participant itwa-ost
Participant
435 Views
Registered: ‎03-05-2019

DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

Hi,

I am following the DPU integration tutorial (Link), however, I need to adjust it to a custom board with a xczu3eg-sbva484-2-i FPGA in it. I have built my design in Vivado and added the DPU IP provided by the IP repository folder from the tutorial.

I am stuck at the Petalinux part: when I configure the project with

petalinux-config --get-hw-description=<path_to_exported_hdf_file>

 However, when looking at the u-boot target it is automatically set to: xilinx_zynqmp_zcu102_rev1_0_defconfig. I don't suppose this is correct and after looking at https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841973/Build+U-Boot I am still unsure which value to set.

Emulating Petalinux with QEMU (petalinux-boot --qemu --prebuilt 3) I get the following message before successfully booting into Linux:

Checking DPU signature at addr=0x8ff00000
DPU signature NOT found, fallback to device-tree

As stated in the DPU product guide, the address of the DPU IP in the address map is 0x00_8F00_0000. I also have the ZCU102 evaluation board and checked the installation process for DNNDK 2.08 and there the address lookup is also at addr=0x8ff00000.

Consquently, dexplorer -w doesn't return anything.

Any help with this issue would be appreciated.

Thank you very much in advance!

 

PS: setup is Vivado 2018.2 and Petalinux 2018.2

0 Kudos
1 Solution

Accepted Solutions
Participant itwa-ost
Participant
275 Views
Registered: ‎03-05-2019

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

Prerequisites: SD card partitioned with one FAT32 system called BOOT, BOOT flag is set. One partition as EXT4 called ROOTFS.

QEMU does not work with the DPU as stated by 

1st change: the SD card on our board is connected to the SD1 block of the ZYNQ MPSoC and I want to have the root file system on the second partition of the SD card

petalinux-config --get-hw-description=/path/to/hdf
Subsystem Auto Hardware settings -> SD/SDIO settings -> psu_sd_1
Image packaging configuration -> root filesystem type -> dev/mmcblk1p2
-> Save and Exit

U-Boot target can be left as default (xilinx_zynqmp_zcu102_rev1_0_defconfig), it is not a crucial step.

2nd change: modify system-user.dtsi -> change interrupt type according to the Vivado hardware design, which is "Level-High"

/include/ "system-conf.dtsi"
/ {
};

&amba{
                dpu@8f000000 {
                        compatible = "deephi, dpu";
                        interrupt-parent = <&gic>;
                        interrupts = <0x0 0x59 0x4 >;  //change from 0x1 to 0x4 to have the interrupt type according to the Vivado hardware design
                        reg = <0x0 0x8f000000 0x0 0x700>;
                        memory = <0x60000000 0x80000000>;
                        core-num = <0x1>;
                };
 };
// add this, so SD card can be mounted properly and written and read from (maybe depends on SD card)
&sdhci1 {
    disable-wp;
    no-1-8-v;
 
};

3rd change: after building the custom sdk and packaging the sysroot with

petalinux-build --sdk
petalinux-package --sysroot -d /path/where/you/want/to/store/it

Copy the contents of aarch64-xilinx-linux to the SD card ROOTFS directory.

 

At this stage I could successfully boot into Linux. The DPU module however was not loaded automatically.

4th change: load module manually

cd /lib/modules/4.../extra/
insmod dpu.ko

At this point the DPU is successfully integrated and can be used. I have build the resnet50 according to the tutorial and deployed it on the board. After exporting the display and all the following steps of the tutorial, I could run the resnet50 application.

Please keep in mind it's the first time working with ZYNQ MPSoC and Petalinux for me, so apologies for any rookie mistakes.

The one thing that I could not fix so far is automatically loading the DPU module. Like I said, it's present in /etc/modules and should be loaded automatically while booting. As this is just a smal demonstrator project for our custom board, I can live with manually loading the module. So I consider my question answered.

10 Replies
Xilinx Employee
Xilinx Employee
416 Views
Registered: ‎01-21-2014

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

You're right, it makes sense to go update the uboot defconfig to xilinx_zynqmp_zcu100_revC_defconfig.  It will boot fine with the ZCU102 defconfig as well. I'll update that in the next version. 

You say you're "stuck"  at the petalinux-config - what exactly isn't working?

In your custom vivado design, did you put the DPU at 0x8f000000 as required?

QEMU is not going to work with the DPU in the PL since there is not support for the DPU peripheral in QEMU. 

Have you tried booting the real hardware?

 

Terry

 

0 Kudos
Participant itwa-ost
Participant
390 Views
Registered: ‎03-05-2019

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

Yes, the DPU is at address 0x8f000000. With stuck I meant that I can follow the tutorial to the end, just that the QEMU simulation doesn't work as intended. I can boot into the system, but the DPU module is not laoded correctly. I don't have the hardware yet, as it is a newly designed board and I am building a reference design for it, so I can not test it on real hardware as of yet, but hopefully this week.

Thanks for the quick reply and I will post an update as soon as I have tested it with the real hardware.

0 Kudos
Highlighted
Participant itwa-ost
Participant
378 Views
Registered: ‎03-05-2019

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

So I did get a new board fresh out of production testing and tried to boot my built Petalinux system. However, the booting process get's stuck at this point and doesn't continue:

[ 8.457351] [drm] Cannot find any crtc or sizes

I have attached the full log as there are some more problematic messages, namely

[    0.286745] irq: type mismatch, failed to map hwirq-137 for /amba_apu@0/interrupt-controller@f9010000!
...
[ 4.634254] mmc1: error -110 whilst initialising SD card

I am assuming that hwirq-137 is the GIC IRQ and consequently, the Linux IRQ = 105, which is 0x69 in hexadecimal. I have adjusted the system-user.dtsi file accordingly (see attachment).

Here is a picture of the block design in Vivado as specified by pg338:

block_diagram.pngBlock diagramAddress_Map.pngAddress Map

Where the error with mmc1 is coming from I don't know. I assume the SD card is configured correctly in the Vivado project and is at SD1, which is the correct configuration for our custom board.

Thank you very much for any help that can be provided!

 

0 Kudos
Xilinx Employee
Xilinx Employee
371 Views
Registered: ‎01-21-2014

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

At this point, I think you should probably take a step back and work thorugh bringing your system up outside of the context of this tutorial and the DPU.  Start with bare-metal, confirm all the interfaces work, then move through the process of booting Linux.  Please work with your Xilinx or Avnet FAE and/or utilize the embedded linux forum. Once you have linux booting, then come back here and we can try and help you out with DPU-specific issues. 

Terry

 

0 Kudos
Participant itwa-ost
Participant
348 Views
Registered: ‎03-05-2019

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

I already did basic interface tests, like GPIOs, I2C, etc. 

I also build Petalinux successfully for a barebones design just with ZYNQMP and AXI GPIOs.

The only thing I added is the DPU and trying to adjust the Petalinux build according to the tutorial. Maybe you could help figuring out this issue, as this clearly has something to do with DPU integration?

[    0.286745] irq: type mismatch, failed to map hwirq-137 for /amba_apu@0/interrupt-controller@f9010000!

As posted in the screenshots, the DPU interrupt is connected to pl_ps_irq1[1] which is as suggested by the DPU documentation. The system-user.dtsi is also adjusted accordingly, so I don't know where that error might be coming from.

Thank you very much, any help is appreciated. 

0 Kudos
Participant itwa-ost
Participant
303 Views
Registered: ‎03-05-2019

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

I have solved all of the problems mentioned in my first post. Within system-user.dtsi the tutorial has the interrupt type as rising edge (0x1), whereas the Vivado interrupt type is auto configured to Level-High (0x4). Changing this solved the irq type mismatch error.

 

Some things that are still left: the dpu module is not loaded successfully by default, although it is present in etc/module. Manually loading it is successful and I have successfully run the resnet50 application on my custom hardware.

0 Kudos
Xilinx Employee
Xilinx Employee
292 Views
Registered: ‎01-21-2014

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

Can you please elaborate on what specifically you changed?

 

Terry

 

 

0 Kudos
Participant itwa-ost
Participant
276 Views
Registered: ‎03-05-2019

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

Prerequisites: SD card partitioned with one FAT32 system called BOOT, BOOT flag is set. One partition as EXT4 called ROOTFS.

QEMU does not work with the DPU as stated by 

1st change: the SD card on our board is connected to the SD1 block of the ZYNQ MPSoC and I want to have the root file system on the second partition of the SD card

petalinux-config --get-hw-description=/path/to/hdf
Subsystem Auto Hardware settings -> SD/SDIO settings -> psu_sd_1
Image packaging configuration -> root filesystem type -> dev/mmcblk1p2
-> Save and Exit

U-Boot target can be left as default (xilinx_zynqmp_zcu102_rev1_0_defconfig), it is not a crucial step.

2nd change: modify system-user.dtsi -> change interrupt type according to the Vivado hardware design, which is "Level-High"

/include/ "system-conf.dtsi"
/ {
};

&amba{
                dpu@8f000000 {
                        compatible = "deephi, dpu";
                        interrupt-parent = <&gic>;
                        interrupts = <0x0 0x59 0x4 >;  //change from 0x1 to 0x4 to have the interrupt type according to the Vivado hardware design
                        reg = <0x0 0x8f000000 0x0 0x700>;
                        memory = <0x60000000 0x80000000>;
                        core-num = <0x1>;
                };
 };
// add this, so SD card can be mounted properly and written and read from (maybe depends on SD card)
&sdhci1 {
    disable-wp;
    no-1-8-v;
 
};

3rd change: after building the custom sdk and packaging the sysroot with

petalinux-build --sdk
petalinux-package --sysroot -d /path/where/you/want/to/store/it

Copy the contents of aarch64-xilinx-linux to the SD card ROOTFS directory.

 

At this stage I could successfully boot into Linux. The DPU module however was not loaded automatically.

4th change: load module manually

cd /lib/modules/4.../extra/
insmod dpu.ko

At this point the DPU is successfully integrated and can be used. I have build the resnet50 according to the tutorial and deployed it on the board. After exporting the display and all the following steps of the tutorial, I could run the resnet50 application.

Please keep in mind it's the first time working with ZYNQ MPSoC and Petalinux for me, so apologies for any rookie mistakes.

The one thing that I could not fix so far is automatically loading the DPU module. Like I said, it's present in /etc/modules and should be loaded automatically while booting. As this is just a smal demonstrator project for our custom board, I can live with manually loading the module. So I consider my question answered.

Observer marron
Observer
257 Views
Registered: ‎10-27-2008

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

Regarding auto-loading the DPU kernel driver, refer to Terry's excellent tutorial:

https://github.com/Xilinx/Edge-AI-Platform-Tutorials/tree/master/docs/DPU-Integration#build-machine-learning-applications-using-xilinx-sdk

Take a look at the "autostart" recipe, which does what you are looking for ... 

Regards,

Mario.

0 Kudos
Xilinx Employee
Xilinx Employee
250 Views
Registered: ‎01-21-2014

Re: DPU integration for custom board DPU signature NOT found, fallback to device-tree

Jump to solution

There is a line in  the base-files recipe that adds dpu to the /etc/modules file - that's all I know that is done to get the dpu module to load automatically. 

 

echo "dpu" >> ${D}${sysconfdir}/modules

 

Is there any indication in the boot log showing that it fails the first time?

Terry

 

0 Kudos