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

Function instance_direction_rect

feature_extraction/src/util.py:5–13  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

3import binascii
4
5def instance_direction_rect(line): # used when we only need bounding box (rect) of the cell.
6
7 if 'N' in line or 'S' in line:
8 m_direction = (1, 0, 0, 1)
9 elif 'W' in line or 'E' in line:
10 m_direction = (0, 1, 1, 0)
11 else:
12 raise ValueError('read_macro_direction_wrong')
13 return m_direction
14
15def instance_direction_bottom_left(direction): # used when we need to get the bottom left corner of the cell.
16 if direction == 'N':

Callers 4

get_macro_regionMethod · 0.90
compute_cell_densityMethod · 0.90
get_power_mapMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected