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: 
Adventurer
Adventurer
8,541 Views
Registered: ‎02-14-2014

Device tree generator error - broken between 2015.4 and 2016.

In migrating my project from Vivado and petalinux 2015.4/2015.4 to the 2016 versions I have found that the device tree generator is broken.

 

I now get this error:

 

 

INFO: Checking component...
INFO: Getting hardware description...

****** hsi v2016.2 (64-bit)
  **** SW Build 1577090 on Thu Jun  2 16:32:35 MDT 2016
    ** Copyright 1986-2016 Xilinx, Inc. All Rights Reserved.

source /home/tactical/projects/trp-0040/petalinux/build/linux/hw-description/hw-description.tcl -notrace
INFO: [Common 17-206] Exiting hsi at Mon Jul 18 14:37:54 2016...
INFO: Config linux
[INFO ] oldconfig linux
[INFO ] generate DTS to /home/tactical/projects/trp-0040/petalinux/subsystems/linux/configs/device-tree
INFO: [Hsi 55-1698] elapsed time for repository loading 0 seconds
INFO: [Common 17-206] Exiting hsi at Mon Jul 18 14:38:14 2016...
ERROR: [Hsi 55-1545] Problem running tcl command ::sw_axi_vdma::generate : ERROR: input_video_axi_vdma_0: s2mm_introut port is not connected
    while executing
"error "ERROR: ${drv_handle}: s2mm_introut port is not connected""
    (procedure "::sw_axi_vdma::generate" line 63)
    invoked from within
"::sw_axi_vdma::generate input_video_axi_vdma_0"
ERROR: [Hsi 55-1442] Error(s) while running TCL procedure generate()
make[2]: *** [autogen-dts] Error 1
make[1]: *** [post-config-auto-dts] Error 255
ERROR: Failed to post config linux
ERROR: Failed to config subsystem linux.

Whereas in 2015.4 the device tree generator would finish successfully.  (*1)

 

 

This happens with 2015 and 2016 versions of petalinux if I check out petalinux/components/edk_user_repository/device-tree-generator to the xilinx-v2016.1 revision or later, and not with xilinx-v2015.4 or earlier.

 

The commit which seems to break my project is 6176eeec4246b58f22ce8f4e3d3d35e14d326fcf which affects files axi_dma/data/axi_dma.tcl and axi_vdma/data/axi_vdma.tcl.

 

That change causes the device tree generator to error and fail where before it would succeed.

 

There are two things wrong with this behaviour:

- the device tree generator should be able to find the correct interrupt number, and not go into the error code here at all.  We run an extra AXI interrupt controller as we have exceeded the number of Zynq IRQ_F2P lines but surely this is not unusual?  So perhaps the code for a cascaded controller via a concat IP is broken and has been for a while?

-having an interrupt deliberately not connected (*2) should not be an error but just a warning, so that the rest of the device tree is created correctly instead of having nothing at all to work with.

 

So could someone from Xilinx please advise here: can we get a fixed device tree generator please?

 

 

 

 

(*1) it was however slightly buggy: the interrupt line was created with -1.  At least it created the device tree and I could patch it into something working.

(*2) there are plenty of use cases where the VDMA interrupt is not useful and might be left deliberately unconnected; too many in fact because it's so awkward to use and doesn't work when multi-buffering but that's a different set of issues...

 

0 Kudos
8 Replies
Xilinx Employee
Xilinx Employee
8,343 Views
Registered: ‎07-01-2010

Re: Device tree generator error - broken between 2015.4 and 2016.

@lcameron

 

Will you be able to shared the design or the block design tcl to reproduce the issue/error?

 

Regards,

Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
8,211 Views
Registered: ‎02-14-2014

Re: Device tree generator error - broken between 2015.4 and 2016.

@achutha A very cut-down version of my project tcl is attached.

 

Exporting this project to petalinux triggers the device tree generator bug.

 

 

INFO: [Common 17-206] Exiting hsi at Wed Jul 27 13:51:05 2016...
INFO: Config linux
[INFO ] oldconfig linux
[INFO ] generate DTS to /home/tactical/projects/trp-0043-workspace/petalinux/subsystems/linux/configs/device-tree
INFO: [Hsi 55-1698] elapsed time for repository loading 0 seconds
INFO: [Common 17-206] Exiting hsi at Wed Jul 27 13:51:21 2016...
ERROR: [Hsi 55-1545] Problem running tcl command ::sw_axi_vdma::generate : ERROR: axi_vdma_0: mm2s_introut port is not connected
    while executing
"error "ERROR: ${drv_handle}: mm2s_introut port is not connected""
    (procedure "::sw_axi_vdma::generate" line 50)
    invoked from within
"::sw_axi_vdma::generate axi_vdma_0"
ERROR: [Hsi 55-1442] Error(s) while running TCL procedure generate()
make[2]: *** [autogen-dts] Error 1
make[1]: *** [post-config-auto-dts] Error 255
ERROR: Failed to post config linux
ERROR: Failed to config subsystem linux.

 

0 Kudos
Participant rankeney
Participant
7,963 Views
Registered: ‎11-26-2014

Re: Device tree generator error - broken between 2015.4 and 2016.

This sounds a bit like a problem I saw. See:

https://forums.xilinx.com/t5/Embedded-Linux/2016-1-Device-Tree-error/m-p/705736

 

I haven't had a chance to check to see if it solved the problem, but it may be worth a look.

0 Kudos
Adventurer
Adventurer
7,948 Views
Registered: ‎02-14-2014

Re: Device tree generator error - broken between 2015.4 and 2016.

@rankeney yes that does look extremely similar, it looks like you had the same issue in the axi_cdma tcl as I had in  axi_vdma.

 

I'm now using my own patch:

 

--------------------------- axi_dma/data/axi_dma.tcl ---------------------------
index a5aee30..87584b0 100644
@@ -65,7 +65,7 @@ proc generate {drv_handle} {
             if { [llength $intr_info] && ![string match -nocase $intr_info "-1"] } {
 		    hsi::utils::add_new_dts_param $tx_chan_node "interrupts" $intr_info intlist
             } else {
-		    error "ERROR: ${drv_handle}: mm2s_introut port is not connected"
+		    puts "WARNING: ${drv_handle}: mm2s_introut port is not connected"
             }
             add_dma_coherent_prop $drv_handle "M_AXI_MM2S"
         }
@@ -79,7 +79,7 @@ proc generate {drv_handle} {
             if { [llength $intr_info] && ![string match -nocase $intr_info "-1"] } {
 		    hsi::utils::add_new_dts_param $rx_chan_node "interrupts" $intr_info intlist
             } else {
-		    error "ERROR: ${drv_handle}: s2mm_introut port is not connected"
+		    puts "WARNING: ${drv_handle}: s2mm_introut port is not connected"
             }
             add_dma_coherent_prop $drv_handle "M_AXI_S2MM"
         }

-------------------------- axi_vdma/data/axi_vdma.tcl --------------------------
index b46514c..b5f53c2 100644
@@ -66,7 +66,7 @@ proc generate {drv_handle} {
 	        if { [llength $intr_info] && ![string match -nocase $intr_info "-1"] } {
 			hsi::utils::add_new_dts_param $tx_chan_node "interrupts" $intr_info intlist
 	        } else {
-			error "ERROR: ${drv_handle}: mm2s_introut port is not connected"
+			puts "WARNING: ${drv_handle}: mm2s_introut port is not connected"
 		}
 	}
 	set rx_chan [hsi::utils::get_ip_param_value $dma_ip C_INCLUDE_S2MM]
@@ -79,7 +79,7 @@ proc generate {drv_handle} {
 	        if { [llength $intr_info] && ![string match -nocase $intr_info "-1"] } {
 			hsi::utils::add_new_dts_param $rx_chan_node "interrupts" $intr_info intlist
 	        } else {
-			error "ERROR: ${drv_handle}: s2mm_introut port is not connected"
+			puts "WARNING: ${drv_handle}: s2mm_introut port is not connected"
 		}
 	}
 	incr vdma_count

This allows the rest of the tree to generate correctly, it's just missing the problem interrupts - but as you mention in your thread they can be manually added via an override in system-top.dts.  Still not as good as having them automatically found correctly through the combinatorial logic but a whole lot better than no device tree at all.

 

Just thinking about it now: perhaps the generator should also leave comments to this effect in place of the missing interrupt lines like:

/* Interrupt cannot be automatically determined. If it is connected then manually override this node's <interrupt> property with an entry in system-top.dts. */

 

Leigh

0 Kudos
Visitor msteveb0
Visitor
7,449 Views
Registered: ‎05-07-2014

Re: Device tree generator error - broken between 2015.4 and 2016.

The underlying problem here is that on Zynq-based design, axi_intc fails to be identified as an interrupt controller.

See here in SDK/2016.2/scripts/hsm/xillib_hw.tcl at ::hsi::utils::is_intr_cntrl

 

 

        set special [common::get_property CONFIG.EDK_SPECIAL $periph]
        set ip_type [common::get_property IP_TYPE $periph]
        if {[string compare -nocase $special "interrupt_controller"] == 0  ||
            [string compare -nocase $special "INTR_CTRL"] == 0 ||
            [string compare -nocase $ip_type "INTERRUPT_CNTLR"] == 0 } {
                set ret 1
        }

 

For a microblaze design, axi_intc has IP_TYPE=INTERRUPT_CNTLR and CONFIG.EDK_SPECIAL=INTR_CTRL

whereas for a zynq design it has IP_TYPE=PERIPHERAL and CONFIG.EDK_SPECIAL is not set.

 

If you modify the above as follows, it will now work:

diff -u scripts/hsm/xillib_hw.tcl~ scripts/hsm/xillib_hw.tcl
--- scripts/hsm/xillib_hw.tcl~	2016-08-18 10:23:50.910137633 +1000
+++ scripts/hsm/xillib_hw.tcl	2016-08-18 10:46:14.354134795 +1000
@@ -433,6 +433,11 @@
     if { [llength $periph] == 1 } {
         set special [common::get_property CONFIG.EDK_SPECIAL $periph]
         set ip_type [common::get_property IP_TYPE $periph]
+        # Added by Steve Bennett <steveb@workware.net.au> to recognize axi_intc as an interrupt controller
+        if {[common::get_property IP_NAME $periph] eq "axi_intc"} {
+            puts stderr "for $periph: ip_type=$ip_type, special=$special"
+            set special interrupt_controller
+        }
         if {[string compare -nocase $special "interrupt_controller"] == 0  ||
             [string compare -nocase $special "INTR_CTRL"] == 0 ||
             [string compare -nocase $ip_type "INTERRUPT_CNTLR"] == 0 } {

However a correct fix from Xilinx would be to set the IP_TYPE appropriately for zynq designs.

0 Kudos
3,551 Views
Registered: ‎03-25-2014

Re: Device tree generator error - broken between 2015.4 and 2016.

I'm having the same problem. With axi_dma is their already a solution for this?

0 Kudos
Observer he2304
Observer
2,584 Views
Registered: ‎07-06-2015

Re: Device tree generator error - broken between 2015.4 and 2016.

I've tried that with petalinux/SDK 2016.4 but axi_intc is still not recognized as an interrupt controller.

What am I missing?

0 Kudos
Highlighted
Visitor msteveb0
Visitor
2,433 Views
Registered: ‎05-07-2014

Re: Device tree generator error - broken between 2015.4 and 2016.

I'm not sure. I haven't looked into it on 2016.4. I found the original fix by just tracing through the Tcl code. You could do the same. Although it would be nice if Xilinx fixed this. I submitted a ticket for it a long time ago.

0 Kudos