Commit 92930c85 by ZhiangWang033

change Nparts

parent 6948ed0a
......@@ -91,8 +91,6 @@ class Clustering:
# for innovus command
self.cluster_file = cadence_result_dir + "/" + self.design
self.cluster_file += "_cluster_" + str(self.Nparts) + ".tcl"
self.solution_file = self.hypergraph_file + ".part." + str(self.Nparts) # defined by hemtis automatically
self.cluster_lef_file = openroad_result_dir + "/clusters.lef"
self.cluster_def_file = openroad_result_dir + "/clustered_netlist.def"
self.blob_def_file = openroad_result_dir + "/blob.def"
......@@ -116,13 +114,19 @@ class Clustering:
self.GenerateHypergraph() # Extract netlist information from lef/def/v
self.RemoveLargetNet() # Remove large nets
self.ConvertFixFile() # Convert fixed file
self.cluster_file += "_cluster_" + str(self.Nparts) + ".tcl"
self.solution_file = self.hypergraph_file + ".part." + str(self.Nparts)
# defined by hemtis automatically
self.hMetisPartitioner() # Partition the hypergraph
self.BreakClusters() # Break clusters spreading apart
print("[INFO] After finishing BreakClusters(), ", end = "")
print("num_clusters = ", len(self.vertices_in_cluster))
print("\n\n")
self.MergeSmallClusters() # Merge small clusters with its neighbors
print("[INFO] After finishing MergeSmallClusters(), ", end = "")
print("num_clusters = ", len(self.vertices_in_cluster))
print("\n\n")
self.GenerateSoftMacros()
ProBufFormat(self.io_name_file, self.macro_pin_file, \
......@@ -229,6 +233,7 @@ class Clustering:
with open(self.fixed_file) as f:
content = f.read().splitlines()
f.close()
self.Nparts += len(content)
# read the grouping information
for i in range(len(content)):
......@@ -237,6 +242,8 @@ class Clustering:
for vertex in vertices:
fixed_part[self.vertex_map[vertex]] = i
f = open(self.hypergraph_fix_file, "w")
for part in fixed_part:
f.write(str(part) + "\n")
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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