strm2oas should issue a warning when reading a lef file twice

Open
#2,294 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #2516 by @jinchuntan — closed without merging

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
cli

Research direction

The report is about strm2oas implicit LEF loading next to the DEF when --lefdef-lefs is also given, which then errors on Duplicate MACRO. Reproduce with the attached test_lefdef.tgz and the two command lines (with and without --lefdef-no-implicit-lef, and with -d=11). Done means a user-visible warning when the same LEF is read twice, or making implicit LEF non-default, without requiring debug level 11.

Written by the indexing model from the issue text.

Description

Once again I got bitten by strm2oas's default behavior of:
"read all lef files where the def is located".
When using --lefdef-lefs, I would expect only the listed lef to be read, especially since there is no other indication.

strm2oas --lefdef-map=sample_tech.map --lefdef-lefs=sample_tech.lef,cell.lef sample_def.def k.oas
ERROR: Duplicate MACRO name: cell (inside MACRO) (line=14, cell=, file=cell.lef)

--lefdef-no-implicit-lef is the magic word here ... And I should have known, I ran into this before.

strm2oas --lefdef-map=sample_tech.map --lefdef-lefs=sample_tech.lef,cell.lef --lefdef-no-implicit-lef sample_def.def k.oas

It would be nice if

a) reading implicit lef's wouldn't be the default behavior or
b) one would be getting a warning when lef files are read twice. Without having to use -d=11

strm2oas -d=11 --lefdef-map=sample_tech.map --lefdef-lefs=sample_tech.lef,cell.lef sample_def.def k.oas
Total: started
Reading LEF/DEF map file test_lefdef/sample_tech.map
Reading sample_tech.lef
Reading LEF/DEF file test_lefdef/sample_tech.lef
Reading cell.lef
Reading LEF/DEF file test_lefdef/cell.lef
Reading test_lefdef/sample_tech.lef
Reading LEF/DEF file test_lefdef/sample_tech.lef
Reading test_lefdef/cell.lef
Reading LEF/DEF file test_lefdef/cell.lef
Total: 0 (user) 0 (sys) 0.000999703 (wall) 54.73M (mem)
ERROR: Duplicate MACRO name: cell (inside MACRO) (line=14, cell=, file=cell.lef)
make: *** [duplicate_debug] Error 1

but even -d=11 wouldn't give a hint that one has to use --lefdef-no-implicit-lef to fix this
test_lefdef.tgz

Dominant language
C++
Stars
1.2k
Forks
305
Avg merge
3d 2h
Merged PRs (30d)
11

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KLayout/klayout

All issues in KLayout/klayout

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.