Skip to content

Commit

Permalink
slack plot: specialize for current MegaBoom floorplan
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Harboe <[email protected]>
  • Loading branch information
oharboe committed Oct 31, 2024
1 parent 216448d commit ec04db4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions plot-3d-slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ def load_data(filename):
for line in file:
parts = line.split()
if len(parts) == 4:
slack.append(float(parts[1]))
x.append(float(parts[2]))
y.append(float(parts[3]))
s = float(parts[1])
slack.append(s)
x.append(float(parts[2])/1000)
y.append(float(parts[3])/1000)

return np.array(x), np.array(y), np.array(slack)


def plot_3d(x, y, slack):
# Create grid data for surface plot
grid_x, grid_y = np.mgrid[min(x) : max(x) : 100j, min(y) : max(y) : 100j]
grid_z = griddata((x, y), slack, (grid_x, grid_y), method="cubic")
grid_x, grid_y = np.mgrid[0: 2000: 100j, 0: 2000: 100j]
grid_z = griddata((x, y), slack, (grid_x, grid_y), method="linear")

fig = plt.figure()
ax = fig.add_subplot(111, projection="3d")
Expand Down
2 changes: 1 addition & 1 deletion slack-positions.tcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source $::env(SCRIPTS_DIR)/load.tcl
load_design 4_cts.odb 4_cts.sdc

set paths [find_timing_paths -path_group reg2reg -sort_by_slack -group_count 1000]
set paths [find_timing_paths -path_group reg2reg -sort_by_slack -group_count 1000000]

set db [::ord::get_db]
set block [[$db getChip] getBlock]
Expand Down

0 comments on commit ec04db4

Please sign in to comment.