-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathannealing_visualizer.py
More file actions
36 lines (27 loc) · 991 Bytes
/
annealing_visualizer.py
File metadata and controls
36 lines (27 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
##################################################################################################
# This is a tool for visualizing placement from a simulated annealing placer
##################################################################################################
import numpy
import matplotlib.pyplot
from scipy.sparse import coo_matrix
from scipy.sparse.linalg import spsolve
##################################################################################################
def main():
x = []
y = []
# Read in placement
f = open("place-tiny.out", "r")
for line in f:
line = line.replace('\n','').split(' ')
x.append(int(line[2]))
y.append(int(line[3]))
print(x)
print(y)
# TODO: Visualize placement. Plot (x[i], y[i])
matplotlib.pyplot.scatter(x, y)
matplotlib.pyplot.xlim([0, 61])
matplotlib.pyplot.ylim([0, 61])
matplotlib.pyplot.show()
return
if __name__ == "__main__":
main()