File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
flow/designs/asap7/mock-array Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 3030ce_margin_x = placement_grid_x * 0.5
3131ce_margin_y = placement_grid_y * 0.5
3232
33+ array_spacing_x = margin_x * 3
34+ array_spacing_y = margin_y * 3
35+
36+ array_offset_x = array_spacing_x + margin_x
37+ array_offset_y = array_spacing_y + margin_y
38+
3339# top level core and die size
34- core_width = ((placement_grid_x * pitch_x ) * (cols + 1 )) + ( ce_width * cols )
35- core_height = ((placement_grid_y * pitch_y ) * (rows + 1 )) + ( ce_height * rows )
40+ core_width = 2 * array_spacing_x + ((placement_grid_x * pitch_x ) * (cols - 1 )) + ce_width
41+ core_height = 2 * array_spacing_y + ((placement_grid_y * pitch_y ) * (rows - 1 )) + ce_height
3642
3743die_width = core_width + (margin_x * 2 )
3844die_height = core_height + (margin_y * 2 )
Original file line number Diff line number Diff line change 11# fish out values from single source of truth: config.py
2- set vals [regexp -all -inline {\S+} [ exec sh -c {cd designs/asap7/mock-array && python3 -c " import config;print(f'{config.rows} {config.cols} {config.pitch_x} {config.pitch_y} {config.margin_x } {config.margin_y } {config.placement_grid_x} {config.placement_grid_y}')" }] ]
3- lassign $vals rows cols pitch_x pitch_y margin_x margin_y placement_grid_x placement_grid_y
2+ set vals [regexp -all -inline {\S+} [ exec sh -c {cd designs/asap7/mock-array && python3 -c " import config;print(f'{config.rows} {config.cols} {config.pitch_x} {config.pitch_y} {config.array_offset_x } {config.array_offset_y } {config.placement_grid_x} {config.placement_grid_y}')" }] ]
3+ lassign $vals rows cols pitch_x pitch_y array_offset_x array_offset_y placement_grid_x placement_grid_y
44
55set block [ord::get_db_block]
66set units [$block getDefUnits]
77
88for {set row 0} {$row < $rows } {incr row} {
99 for {set col 0} {$col < $cols } {incr col} {
1010 set inst [$block findInst [format " ces_%d_%d" $row $col ]]
11- set bbox [$inst getBBox]
1211
13- set w [$bbox getDX]
14- set h [$bbox getDY]
15-
16- set x [expr int((($margin_x + (($placement_grid_x * $pitch_x ) * ($col + 1.0))) * $units ) + ($w * $col ))]
17- set y [expr int((($margin_y + (($placement_grid_y * $pitch_y ) * ($row + 1.0))) * $units ) + ($h * $row ))]
12+ set x [expr int((($array_offset_x + (($placement_grid_x * $pitch_x ) * $col )) * $units ))]
13+ set y [expr int((($array_offset_y + (($placement_grid_y * $pitch_y ) * $row )) * $units ))]
1814
1915 $inst setOrient R0
2016 $inst setOrigin $x $y
You can’t perform that action at this time.
0 commit comments