A Qemu+SystemC Cosim enviornment for a cnn accelerator processor model based on distributed statically timed descriptor based address generators
This project needs the enviornment built from: https://github.com/Sparkles-Qemu/qemu_vp_builder
-
Add debugdev to top level device tree so that linux kernel can see it
- /home/peta/xilinx-zcu102-2019.2/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
- add the new device directly under the amba bus
- &amba{ your_device: device0 { .... ... }; };
- this device tree gets compiled by petalinux-build cli
-
Add uio support to kernel -petalinux-config -c kernel
-
Device Drivers -> Userspace I/O drivers
- Userspace I/O platform driver with generic IRQ handling
- Userspace platform driver with generic irq and dynamic memory
- Xilinx AI Engine driver
-
Make sure that you use M instead of *
-
-
Use uio module to probe our device -debugdevice should contain compability string that uio is looking for
- added directly in device tree with chosen { bootargs = "earlycon clk_ignore_unused uio_pdrv_genirq.of_id=generic-uio"; stdout-path = "serial0:115200n8"; };
- or through petalinux-config and changing the boot args there
- **use petalinux-config tool instead. I have found that adding bootargs directly on device tree does not work b/c. It gets over written **
-
debugdev entry is in /proc/device-tree
- /proc/device-tree/debugdev@0xa0000000
- catting interrupts prints Y
- catting /proc/interrupts shows debugdev which contains a GIC V2 interrupt number of +32 from what is specified on the device tree
-
Created a seperate .dtsi file
- this file contains the debugdev information
-
This file in included on system-user.dtsi
-
Visually confirm that the debugdevice has been added to the compiled device tree that QEMU uses.
- decompiled commmand: dtc -I dtb -O dts -o decompiled.dts system.dtb
-
Added bootargs through petalinux-config
- uio_pdrv_genirq.of_id=debuginc,generic-uio,ui_pdrv
-
Debugdev still not visible from QEMU side
-
Debugdev is not visible and recieving irqs from the PL side
- the main problem I was having was the bootargs were getting overwritten when I directly changed it on the system-user.dtsi file
- use the petalinux-config tool for this to work correctly
-
- could be a problem with petalinux 2019.1
-
- how the uio framework works
-
https://harmoninstruments.com/posts/uio.html
- uio user level example