Commit da1a4bc7 authored by Daniel Krebs's avatar Daniel Krebs

hwdef-parse: count total switch ports and populate property

parent b908bfdb
......@@ -166,10 +166,13 @@ for mrange in mmap:
# find AXI-Stream switch port mapping
switch = root.find('.//MODULE[@MODTYPE="axis_switch"]')
busifs = switch.find('.//BUSINTERFACES')
switch_ports = 0
for busif in busifs:
if busif.get('VLNV') != 'xilinx.com:interface:axis:1.0':
continue
switch_ports += 1
busname = busif.get('BUSNAME')
name = busif.get('NAME')
type = busif.get('TYPE')
......@@ -193,6 +196,9 @@ for busif in busifs:
if busif_ep:
ports[-1]['name'] = sanitize_name(busif_ep.get('NAME'))
# set number of master/slave port pairs for switch
ips[switch.get('INSTANCE')]['num_ports'] = switch_ports / 2
# find Interrupt assignments
intc = root.find('.//MODULE[@MODTYPE="axi_pcie_intc"]')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment