KLayout / klayout

KLayout Main Sources
http://www.klayout.org
GNU General Public License v3.0
799 stars 205 forks source link

Feature request: strm2oas should report input unit differences #1701

Closed stefanottili closed 5 months ago

stefanottili commented 6 months ago

strm2oas does the right thing to scale all the input files to the default input dbu of 1000. It would be nice to get feedback when the units of input files differ and thus coordinates get scaled.

       strm2oas \
        --debug-level=21 \
        --lefdef-lef-layouts=\
        ../../OpenROAD-flow-scripts/flow/platforms/nangate45/gds/NangateOpenCellLibrary.gds,\
        lef_rams.oas \
        --lefdef-lefs=lef/Nangate.lef  \
        --lefdef-map=test.map \
        bsg_chip.def.gz \
        bsg_chip.strm2oas.oas

lef/def 2000dbu/um, gds 0.1nm/dbu (10000dbu/um), lef_rams.oas 2000dbu. default input 1000dbu, default output 1000dbu.

klayoutmatthias commented 5 months ago

I added some warnings, specifically:

Warning: DEF UNITS is not matching reader DBU (DEF UNITS is 1000 and corresponds to a DBU of 0.001, but reader unit is 0.002) (line=6, cell=, file=in.def)

if --dbu-in is not matching UNITS from DEF, and

Warning: DBU of macro layout file 'testdata/lefdef/foreigncell/foreign.gds' is not compatible with reader DBU (layout DBU is 0.001, reader DBU is 0.002) (file=in.def)

if --dbu-in is not matching DBU of LEF GDS.

As a side effect, the --lefdef-lef-layouts files are read using other, format-specific options from the command line such as --box-mode or --layer-map (for GDS layer mapping).