MCPcopy Create free account
hub / github.com/circuitnet/CircuitNet / get_macro_region

Method get_macro_region

feature_extraction/src/read.py:257–267  ·  view source on GitHub ↗
(self, line, x_y, area)

Source from the content-addressed store, hash-verified

255 read_file.close()
256
257 def get_macro_region(self, line, x_y, area): # function used by read_place_def
258 x_y_lower_left = [int(x_y[0]), int(x_y[1])]
259 x_y_lower_left_gcell = []
260 x_y_upper_right_gcell = []
261 x_y_lower_left_gcell.append(bisect.bisect_left(self.gcell_coordinate_x, x_y_lower_left[0]))
262 x_y_lower_left_gcell.append(bisect.bisect_left(self.gcell_coordinate_y, x_y_lower_left[1]))
263 direction = instance_direction_rect(line)
264 x_y_upper_right = [x_y_lower_left[0] + area[0] * direction[0] + area[1] * direction[1], x_y_lower_left[1] + area[0] * direction[2] + area[1] * direction[3]]
265 x_y_upper_right_gcell.append(bisect.bisect_left(self.gcell_coordinate_x, x_y_upper_right[0]))
266 x_y_upper_right_gcell.append(bisect.bisect_left(self.gcell_coordinate_y, x_y_upper_right[1]))
267 return x_y_lower_left_gcell, x_y_upper_right_gcell, x_y_lower_left, x_y_upper_right
268
269 """
270 Read DEF dumped after global routing (after detailed routing recommended),

Callers 1

read_place_defMethod · 0.95

Calls 1

instance_direction_rectFunction · 0.90

Tested by

no test coverage detected