Repository navigation
Yap support - #4672
Yap support#4672openroad-ci wants to merge 13 commits into
Conversation
Signed-off-by: Osama <osama@precisioninno.com>
Signed-off-by: Osama <osama@precisioninno.com>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
There was a problem hiding this comment.
Code Review
This pull request introduces a new 3D Hybrid Bonding Yield Flow (FLOW_TYPE=3d) that integrates the YAP (Yield Analysis Platform) tool as a submodule. It adds documentation, scripts, makefiles, and a sample design (design_2) to support wafer-to-wafer (W2W) and die-to-wafer (D2W) hybrid bonding yield simulations. The review feedback highlights several opportunities to improve robustness: ensuring absolute paths are used for YAP requirements in the build script, handling empty glob matches in the Makefile, defensively converting configuration parameters to float in generate_risk_map.py, and using os.path.dirname for robust path extraction in visualize_design.py.
| local venv="${DIR}/tools/install/yap-venv" | ||
| echo "[INFO FLW-0032] Installing YAP Python requirements for the 3D flow into ${venv}." | ||
| ${PYTHON_EXE:-python3} -m venv "${venv}" | ||
| "${venv}/bin/python" -m pip install -r tools/YAP/requirements.txt |
There was a problem hiding this comment.
Using a relative path for tools/YAP/requirements.txt can fail if the script is executed from a directory other than the repository root. Since venv is defined using ${DIR}, the requirements file path should also use ${DIR} to ensure robustness.
| "${venv}/bin/python" -m pip install -r tools/YAP/requirements.txt | |
| "${venv}/bin/python" -m pip install -r "${DIR}/tools/YAP/requirements.txt" |
| crit="$${bmap%.bmap}$(CRITICALITY_SUFFIX)"; \ | ||
| if [ -f "$$crit" ]; then \ | ||
| echo "Exists: $$crit"; \ | ||
| else \ |
There was a problem hiding this comment.
If no files match the glob pattern *_From_*.bmap, the shell loop will execute once with the literal pattern string containing *, causing subsequent commands like [ -f "$crit" ] and generate_criticality.py to fail. Adding a check to ensure the file exists before proceeding avoids this failure.
bash -c 'set -e; for bmap in $(abspath $(OBJECTS_DIR))/*_From_*.bmap; do if [ ! -f "$$bmap" ]; then continue; fi; \'
| continue | ||
|
|
||
| itf_cfg = OmegaConf.load(itf_cfg_path) | ||
| pad_r = float(itf_cfg.PAD_TOP_R_um) |
There was a problem hiding this comment.
If PAD_TOP_R_um is None or missing in the configuration (which is the default in design_2.yaml), calling float() directly will raise a TypeError. Enforce defensive programming by checking for None or string "None" before converting to float.
| pad_r = float(itf_cfg.PAD_TOP_R_um) | |
| pad_r_val = itf_cfg.get("PAD_TOP_R_um") | |
| pad_r = float(pad_r_val) if pad_r_val not in (None, "None") else 0.0 |
| cfg_skeleton = OmegaConf.load(args.config)[args.mode] | ||
|
|
||
| cfg_dict = get_config_dict( | ||
| cfg_folder=args.config.rsplit('/', 1)[0], |
There was a problem hiding this comment.
Using rsplit('/', 1)[0] to extract the directory path will fail or return the filename itself if args.config is a relative path with no slashes (e.g., just design_2.yaml). Use os.path.dirname(args.config) instead, which is robust and cross-platform.
| cfg_folder=args.config.rsplit('/', 1)[0], | |
| cfg_folder=os.path.dirname(args.config), |
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 11 with regression(s), 0 without a comparable baseline. ❌ asap7/riscv32i base — 1 failing metric(s)
❌ asap7/swerv_wrapper base — 1 failing metric(s)
❌ gf180/jpeg base — 1 failing metric(s)
❌ ihp-sg13g2/jpeg base — 1 failing metric(s)
❌ nangate45/ariane133 base — 3 failing metric(s)
❌ nangate45/bp_be_top base — 1 failing metric(s)
❌ nangate45/ibex base — 1 failing metric(s)
❌ sky130hd/aes base — 1 failing metric(s)
❌ sky130hd/chameleon base — 3 failing metric(s)
❌ sky130hd/microwatt base — 3 failing metric(s)
❌ sky130hs/aes base — 1 failing metric(s)
|
|
The metrics failure are coming from updating OR to master |
|
Nice to see this behind To make the 3D flow consistent with how ORFS works today, please make the following changes:
Why ORFS works this way
|
|
I checked this against bazel-orfs and it has no effect there: the 2D flow is untouched, and nothing bazel-orfs builds or analyses sees the 3D files. Not urgent, and I see the value in having this on master to collaborate on. Going forward, the 3D flow could be made more congruent with the rest of ORFS, and simpler, as a first-class flow rather than one that's Shared with the rest of ORFS (checked):
3D-specific (plausible, worth a look):
|
Summary
FLOW_TYPE=3dinconfig.mk.flow/Makefileincludesscripts/3d.mkinstead of the RTL-to-GDS setup, so 2D designs are untouched.tools/YAPsubmodule (yap-stackbranch)../build_openroad.sh --3dinstalls its Python requirements intotools/install/yap-venv.makeruns 1-5):check_3dblox: read the.3dbxinto OpenROAD, check it and write an odbprepare: stage design files and the YAP config intoobjects/generate_criticality: default criticality for any.bmapmissing oneyap_simulate: YAP W2W or D2W Monte Carlo bonding simulationgenerate_risk_map: YAP per-pad fail maps -> per-mechanism risk CSVs (failure %)view_heatmaps: open the web viewer with the risk maps as chiplet heatmaps (web_load_chiplet_heatmap)designs/3d/design_2: fourCompute_Largechiplets on an organic substrate, D2W. Taken from https://doi.org/10.5061/dryad.76hdr7tb6docs/user/ThreeDFlow.mdType of Change
Impact
FLOW_TYPE=3d.--3d.Verification