image_snapshot
暂无简介
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-26
- Stars
- ★ 2
- Forks
- 0
03 SKILL.md 正文
Skill: Whole-die-with-pins image snapshot
Render a PNG that shows the entire die plus the top-level IO pins, so a checker (or human) can see the macro placement and which die edges the pins sit on. This is exactly what the agent flow saves at every stage; use the standalone tool to capture it on demand from any checkpoint.
What "whole die with pins" means
The saved area is the die box, expanded outward by a small margin so the
boundary pins are not clipped, and (if enabled) the pin boxes are redrawn on top
because OpenROAD rasterizes thin pins to near-invisibility at the die zoom.
Settings live in config_macro.yaml:
image:
save_width: 1024 # save_image -width (px); height keeps the layout aspect
margin: 0.03 # fractional pad around die/pins (0.03 = 3% of the larger side)
pin_overlay: true # redraw bterm boxes over the PNG so pins stay visible
The code path (flow)
macroflow/recipes.pyDIE_CORE+PIN_COORDSquery the die box and every bterm pin box from OpenROAD.macroflow/context.pyFlowState.image_area(margin)unions the die (+ any out-of-die pin boxes) and pads bymargin.macroflow/openroad.pyORSession.save_image()emitssave_image -area {x0 y0 x1 y1} -width 1024 image.png.- If
pin_overlay: true,macroflow/context.pydraw_pin_overlay()draws the pin boxes on top of the OpenROAD PNG.
For bp_fe (DIE_AREA 0 0 800 600, margin 0.03) the area becomes
-24 -24 824 624, so the manual OpenROAD command is:
save_image -area {-24 -24 824 624} -width 1024 whole_die_with_pins.png
margin is a fraction of the larger die side: pad = max(w, h) * margin,
so 800 * 0.03 = 24.
Standalone tool: save_die_image.py
Reuses the same pipeline (load_image_settings, DIE_CORE/PIN_COORDS,
FlowState.image_area, draw_pin_overlay), so a manual capture is identical to
the flow's snapshots. Defaults read from config_macro.yaml.
conda activate coder
# From a checkpoint ODB (read_db restores tech + LEF + placement):
python save_die_image.py \
--odb work/<run>/saves_db/floorplan.odb \
-o whole_die_with_pins.png
# From a DEF (reads the dataset's lef/*.lef, tech LEF first, then the DEF):
python save_die_image.py \
--data-dir Benchmark/PlaceReasoner-Bench/bp_fe \
--def def/pre_place.def \
-o whole_die_with_pins.png
Useful overrides: --width 2048, --margin 0.05, --no-pins (skip the
overlay), --pins (force it on). The tool prints the die/core/pin counts and
the exact save_image command it emits.
Notes
- ODB mode is preferred: a single
read_dbrestores tech + LEF + placement. - DEF mode needs the LEFs; it globs
lef/*.lefand loads any file whose name containstechfirst. - The session runs headless (
QT_QPA_PLATFORM=minimal); no X server needed.
04 同仓库更多 Skills
openroad-image-snapshot
Whole-die layout snapshot for any checkpoint: the executable template reads an ODB, expands the die box by a margin so boundary pins stay visible, and saves a PNG. The Worker runs it after every stage; it can also be run standalone on any saved checkpoint.
macro_pin_side
暂无简介
get_macro_current_location
暂无简介
get_die_core_info
暂无简介
5.optimizer
暂无简介
post-route-timing-check
Check post-route static timing (TNS/WNS) in OpenROAD to decide whether a macro placement exploration iteration is done. Use this skill whenever the user is running macro placement exploration, sweeping floorplans, or asking whether a placement run is "good enough to stop" — anytime post-route timing in OpenROAD needs to be read and compared against a goal, even if the user doesn't explicitly say "TNS" or "WNS".