02-14-2020 02:31 AM
Hi,
Is anyone know who to get all pins from an ip from an ip catalog ?
I know that definition of interfaces are in a component.xml but can we get it by tcl command ?
Regards,
02-14-2020 06:45 AM
Hi @syedz
Seem like you're right.
However it is possible to parse component.xml of the ip.
I use this post to install tDOM (XML parser for TCL) : XML-parser-for-TCL
For example if i have a bd cell named dma0 in my design, i can get all pins of the ip (even if there is disabled pins)
set ip_name dma0 package require tdom set vlnv_name [get_property vlnv [get_bd_cells $ip_name]] set filename [get_property XML_FILE_NAME [get_ipdefs $vlnv_name]] set f [open $filename] set doc [dom parse [read $f]] set root [$doc documentElement] set se [$root selectNodes "spirit:busInterfaces/spirit:busInterface/spirit:portMaps/spirit:portMap/spirit:physicalPort/spirit:name"] foreach i $se { puts [$i text] }
Regards,
02-14-2020 04:25 AM
The pins will change based on the customization parameters selected. So i dont think there is a way to get the pins directly from IP catalog. You need to finish the IP customization first to see the IP pins. You can find that from IP GUI. If you want to know all the pins then select show disabled ports as shown below:
There is no TCL command to show the disabled pins or all the pins from IP catalog.
--Syed
02-14-2020 06:45 AM
Hi @syedz
Seem like you're right.
However it is possible to parse component.xml of the ip.
I use this post to install tDOM (XML parser for TCL) : XML-parser-for-TCL
For example if i have a bd cell named dma0 in my design, i can get all pins of the ip (even if there is disabled pins)
set ip_name dma0 package require tdom set vlnv_name [get_property vlnv [get_bd_cells $ip_name]] set filename [get_property XML_FILE_NAME [get_ipdefs $vlnv_name]] set f [open $filename] set doc [dom parse [read $f]] set root [$doc documentElement] set se [$root selectNodes "spirit:busInterfaces/spirit:busInterface/spirit:portMaps/spirit:portMap/spirit:physicalPort/spirit:name"] foreach i $se { puts [$i text] }
Regards,