Skip to content

Commit

Permalink
mock area: scale die area, keep die to core margin
Browse files Browse the repository at this point in the history
fixes problems with not enough space for PDN

Signed-off-by: Øyvind Harboe <[email protected]>
  • Loading branch information
oharboe committed Jan 30, 2025
1 parent d30e198 commit 37a45e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ LB_VERILOG_FILES = ["test/mock/lb_32x128.sv"]
orfs_flow(
name = "lb_32x128",
arguments = LB_ARGS,
mock_area = 0.90,
mock_area = 0.7,
stage_sources = LB_STAGE_SOURCES,
verilog_files = LB_VERILOG_FILES,
)
Expand Down
16 changes: 13 additions & 3 deletions mock_area.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@ set die_bbox [$block getDieArea]
set core_bbox [$block getCoreArea]
set scale [expr $::env(MOCK_AREA) / $dbu_per_uu]

proc area_um {bbox} {
global dbu_per_uu
return "[expr [$bbox xMin] / $dbu_per_uu] [expr [$bbox yMin] / $dbu_per_uu] [expr [$bbox xMax] / $dbu_per_uu] [expr [$bbox yMax] / $dbu_per_uu]"
}

puts "DIE_AREA: [area_um $die_bbox]"
puts "CORE_AREA: [area_um $core_bbox]"

set file [open $out_file w]
tee $file "export DIE_AREA=0 0 [expr $scale*[$die_bbox xMax]] [expr $scale*[$die_bbox yMax]]"
tee $file "export CORE_AREA=[expr $scale*[$core_bbox xMin]] [expr $scale*[$core_bbox yMin]]\
[expr $scale*([$die_bbox xMax] - ([$die_bbox xMax] - [$core_bbox xMax]))]\
[expr $scale*([$die_bbox yMax] - ([$die_bbox yMax] - [$core_bbox yMax]))]"
# keep same margin between DIE_ARE and CORE_AREA
tee $file "export CORE_AREA=[expr ([$core_bbox xMin] - [$die_bbox xMin]) / $dbu_per_uu] \
[expr ([$core_bbox yMin] - [$die_bbox yMin]) / $dbu_per_uu] \
[expr $scale*[$die_bbox xMax] - ([$die_bbox xMax] - [$core_bbox xMax]) / $dbu_per_uu ] \
[expr $scale*[$die_bbox yMax] - ([$die_bbox yMax] - [$core_bbox yMax]) / $dbu_per_uu]"
tee $file "export CORE_UTILIZATION="
close $file

0 comments on commit 37a45e5

Please sign in to comment.