01-22-2021 06:35 AM
Is there any general guide to build petalinux for Zynq Us+ with interrupts from PL?
I followed this: Testing UIO with Interrupt on Zynq Ultrascale but didn't work me (error at build).
I think the reason is I don't have an AXI block to generate the interrupt but a counter from a clock. I suppose that is a valid interrupt source.
01-22-2021 07:00 AM - edited 01-22-2021 07:02 AM
Does your interrupt driver pin from the PL to the PS have the appropriate properties attached?
If you have multiple interrupts, you will want to use the "concat" block to concatenate these and this IP will pass the properties appropriately on the output.
01-22-2021 07:07 AM
I expected these properties to affect the interrupt input, not the source.
Anyways, my source is a Verilog file dragged to a block diagram, the pin property is 'undef' and not editable in the Properties tab, is that something to set in the verilog file?
01-22-2021 07:48 AM
Here is a quick example I put together when you drive an interrupt (not defined as interrupt in block diagram) and the output applies the CONFIG:SENSITIVITY and TYPE properly.
`timescale 1ns / 1ps
module myIntr (
input INTR_IN,
(* X_INTERFACE_INFO = "XIL_INTERFACENAME INTR_OUT, SENSITIVITY LEVEL_HIGH, PortWidth 1" *)
(* X_INTERFACE_INFO = "xilinx.com:signal:interrupt:1.0 INTR_OUT INTERRUPT" *)
output INTR_OUT
);
assign INTR_OUT = INTR_IN;
endmodule
01-22-2021 08:11 AM - edited 01-22-2021 08:25 AM
I was having a look at the AXI interrupt controller that seems to do that 'conversion' but that looks simpler. I'll give it a go.
First time I see these "directives", I noticed there is a lot in the templates window, good to know.
01-25-2021 02:43 AM
That seems to, at least, allow petalinux to build. Next step is the device tree, because I'm not using any AXI peripheral, I added a node (int0) in system-user.dtsi:
/include/ "system-conf.dtsi"
/ {
chosen {
bootargs = "earlycon clk_ignore_unused uio_pdrv_genirq.of_id=generic-uio";
stdout-path = "serial0:115200n8";
};
plinterrupt@0{
interrupt-parent = <&gic>;
interrupts = <0 112 1>;
};
};
After build and boot, I expected to see the interrupt listed by cat /proc/interrupts, but that doesn't happen.