Skip to content

Commit

Permalink
[xilinx] Logic for parsing AXI memory ports from kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungSeok Na authored and sampsyo committed Apr 8, 2022
1 parent 67abb59 commit f1149c1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions fud/fud/stages/xilinx/xclbin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import re
import logging as log
import xml.etree.ElementTree as ET
from pathlib import Path

from fud.stages import Source, SourceType, Stage
Expand Down Expand Up @@ -52,6 +54,23 @@ def _define_steps(self, input_data, builder, config):
/ "gen_xo.tcl"
)




# Locate generated kernel XML file
xmlfile = 'kernel.xml'
tree = ET.parse(xmlfile)
root = tree.getroot()
axi_str = ""
for port in root.iter('port'):
if re.search("_axi$", port.attrib['name']):
#print(port.attrib['name'])
axi_str += port.attrib['name'] + " "

# Remove any trailing spaces
axi_str.strip()


package_cmd = (
"cd {tmpdir} && "
"mkdir -p xclbin && "
Expand Down

0 comments on commit f1149c1

Please sign in to comment.