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: 
Observer ekigwana
Observer
9,761 Views
Registered: ‎07-15-2015

Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution
1) Clone git://github.com/Xilinx/device-tree-xlnx.git to device-tree-xlnx
 
2) Export Hardware from vivado 2015.2
 
3) Launch SDK 2015.2
 
4) Add cloned device-tree-xlnx folder to repositories in SDK 2015.2
 
5) From SDK, File->New->Board Suppor Package. Select device_tree from Board Support Package OS options. Click Finish
 
6) The following error is displayed in the SDK log:
 
****** hsi v2015.2 (64-bit)
 **** SW Build 1266856 on Fri Jun 26 16:35:25 MDT 2015
   ** Copyright 1986-2015 Xilinx, Inc. All Rights Reserved.
...
 
INFO: [Hsi 55-1698] elapsed time for repository loading 0 seconds
ERROR: [Common 17-161] Invalid option value '' specified for 'object'.
ERROR: [Hsi 55-1545] Problem running tcl command ::sw_device_tree::generate : ERROR: [Common 17-161] Invalid option value '' specified for 'object
'.

   while executing
"get_property BASE_VALUE $ip_mem_handle"
   (procedure "get_baseaddr" line 4)
   invoked from within
"get_baseaddr ${ip} no_prefix"
   (procedure "gen_peripheral_nodes" line 5)
   invoked from within
"gen_peripheral_nodes $drv_handle "create_node_only""
   ("foreach" body line 3)
   invoked from within
"foreach drv_handle [get_drivers] {
       # generate the default properties
       gen_peripheral_nodes $drv_handle "create_node_only"
       gen_r..."
   (procedure "::sw_device_tree::generate" line 3)
   invoked from within
"::sw_device_tree::generate device_tree"
ERROR: [Hsi 55-1442] Error(s) while running TCL procedure generate()
ERROR: [Common 17-39] 'hsi::generate_target' failed due to earlier errors.
...
 
----------------------
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Observer ekigwana
Observer
17,056 Views
Registered: ‎07-15-2015

Re: Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution

Whew, 
 
This is the best best forum! You get to talk to yourself.
 
The issue as it turns out is that using a Xilinx IIC interface definition (for the fancy bus routing) causes the device tree generator to get confused I am not sure if the issue is with the generated  system_wrapper.hdf I dare not visit thos annals.
 
Here is a patch for the device tree generator for those that don't want to connect bus wires one at a time to custom IP with IIC for now. Other IPs could be affected. This does not occur with gpio or spi interface definitions in custom IP. So parts seem okay.

0 Kudos
7 Replies
Observer ekigwana
Observer
9,724 Views
Registered: ‎07-15-2015

Re: Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution

So I found the problem ...

 

1) I have a custom IP for the Trenz TE0720 system controller. For some reason vivado 2015.1 and upwards try to generate and address etc for asimple hw interface.

 

2) I hacked up the generator to find the issue and after that i got the following entry in the pl.dtsi:

 

PS_SC0720_0: SC0720@-1 {
              compatible = "xlnx,SC0720-1.0";
};

 

3) The IP handle is SC0720_0 and it is put in a hieracy named PS containing the processing system and friends.

 

4) Somehow the device tree thinks the IP has an address.

 

5) I'll try rebuilding the IP

 

0 Kudos
Observer ekigwana
Observer
17,057 Views
Registered: ‎07-15-2015

Re: Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution

Whew, 
 
This is the best best forum! You get to talk to yourself.
 
The issue as it turns out is that using a Xilinx IIC interface definition (for the fancy bus routing) causes the device tree generator to get confused I am not sure if the issue is with the generated  system_wrapper.hdf I dare not visit thos annals.
 
Here is a patch for the device tree generator for those that don't want to connect bus wires one at a time to custom IP with IIC for now. Other IPs could be affected. This does not occur with gpio or spi interface definitions in custom IP. So parts seem okay.

0 Kudos
Visitor timbaptcore
Visitor
9,565 Views
Registered: ‎02-01-2013

Re: Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution
Hi, I have the same issue, can you attach your patch as I can't see it, thanks
0 Kudos
Observer ekigwana
Observer
9,555 Views
Registered: ‎07-15-2015

Re: Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution

Hi,

 

After lookming at my work in the morning, I am afraid the solution requires alot more work than I am willing to delve into. At the very list I can help you with a work around.

 

In the IP packager

 

1) Remove IIC interface or other broken interface.

 

2) Select all ports that used to be grouped in 1) above, right click and select "Create Interface Definition"

 

3) If the selected ports are part of an input interface (left side of IP) select Slave Mode, and set location to be where your ip is. NOTE! after clicking ok, at the next prompt to create the Interface select NO unless it is one of kind IE you dont need an inteface opposite of the one being created due to selection of pins.

 

4) Select each port and hopefully your IP follows some of Xilinx's naming conventions e.g one of my IIC ports is int_sda_i and rename it to sda_i. Basically all other data is entered for you, you just have to fix the names of all the ports. This is import for the Auto Infer ports function.

 

5) save the interface. Do not close it yet. I don't know how to open it again if you need to adjust anything.

 

6) Now go back to Ports and Interfaces on the Package IP tab and slect the ports you previously selected. Right click and select "Auto Infer Interface"

 

7) Now go to the User tree and select your Interface definition. It is named what you set it to be in 3) above. Click OK

 

8) Give your IP a name and set interface presence as desired. As a side note, the example "$my_num_var > 0" does not make it clear that the variable my_num_var is created in "Customization Parameters"

 

9) If applicable, select the port for the other interface eg output iface and repeat 6), 7), 8)

 

10) The bad new is that on the side that interfaces with Xilinx IP block e,g IIC_1 on a processing system block you have to wire it up manually but at least you can gropu that mess into a hierachy. The good news is that the other end can be made "external" on the BD so you don't have wires all over the place.

 

 

 

 

 

0 Kudos
Highlighted
Observer ekigwana
Observer
9,424 Views
Registered: ‎07-15-2015

Re: Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution

I had to fix this so here you go. Don't know how to notify the devicetree devs.

Tags (2)
0 Kudos
Visitor timbaptcore
Visitor
9,399 Views
Registered: ‎02-01-2013

Re: Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution

Thanks for that, if you un-mark this thread as `Solved' then it is possible that someone from Xilinx might show some interest..?

0 Kudos
Observer ekigwana
Observer
9,384 Views
Registered: ‎07-15-2015

Re: Generate device tree Vivado/SDK/HSI 2015.2

Jump to solution

I don't have the ability to unmark

0 Kudos