Skip to content
Snippets Groups Projects
Commit 9ab34fc5 authored by Lucian Petrica's avatar Lucian Petrica
Browse files

Fixes to floorplan and vitis link

parent 3f502735
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ gecho () {
# checkout the correct dependency repo commits
# the repos themselves are cloned in the Dockerfile
FINN_BASE_COMMIT=8908c6a3f6674c4fa790954bd41c23ee5bf053df
FINN_EXP_COMMIT=6e64238bc13c493f4454893c635b4c13ed59e158
FINN_EXP_COMMIT=e9f97dcdb4db2f889b0f36af079a6a1792b7d4de
BREVITAS_COMMIT=aff49758ec445d77c75721c7de3091a2a1797ca8
CNPY_COMMIT=4e8810b1a8637695171ed346ce68f6984e585ef4
HLSLIB_COMMIT=2e49322d1bbc4969ca293843bda1f3f9c05456fc
......
......@@ -58,16 +58,21 @@ class Floorplan(Transformation):
# read in a user-specified floorplan or generate a default one
if self.user_floorplan is None:
floorplan = model.analysis(floorplan_params)
self.user_floorplan = model.analysis(floorplan_params)
json_dir = make_build_dir(prefix="vitis_floorplan_")
json_file = json_dir + "/floorplan.json"
model.set_metadata_prop("floorplan_json", json_file)
with open(json_file, "w") as f:
json.dump(floorplan, f, indent=4)
json.dump(self.user_floorplan, f, indent=4)
else:
model.set_metadata_prop("floorplan_json", self.user_floorplan)
model = model.transform(ApplyConfig(self.user_floorplan))
try:
default_slr = self.user_floorplan["Defaults"]["slr"][0]
except:
default_slr = -1
# perform DWC and FIFO specific adjustments
unassigned_nodes = 0
for node in model.graph.node:
......@@ -75,6 +80,7 @@ class Floorplan(Transformation):
node_slr = node_inst.get_nodeattr("slr")
if node_slr == -1:
unassigned_nodes += 1
node_inst.set_nodeattr("slr", default_slr)
if node.op_type == "StreamingDataWidthConverter_Batch":
# if we have SLR assignment already. use that
if node_slr != -1:
......@@ -100,8 +106,8 @@ class Floorplan(Transformation):
if unassigned_nodes > 0:
warnings.warn(
str(unassigned_nodes)
+ " nodes have no entry in the provided floorplan "
+ "and no default value was set"
+ " nodes have no entry in the provided floorplan,"
+ " SLR was set to " + str(default_slr)
)
# partition id generation
......
......@@ -251,7 +251,7 @@ class VitisLink(Transformation):
mem_type = "DDR"
mem_idx = 1
node_mem_port = "%s[%d]" % (mem_type, mem_idx)
config.append("sp=%s.m_axi_gmem0:%s" % node_mem_port)
config.append("sp=%s.m_axi_gmem0:%s" % (instance_names[node.name], node_mem_port))
# connect streams
if producer is not None:
for i in range(len(node.input)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment