klayoutmatthias / dump_oas_gds2

An OASIS and GDS2 (chip layout format) binary dump tool for debugging
GNU General Public License v2.0
38 stars 10 forks source link

dump_gds2 ERROR when faced with 2k zero padding at the end #1

Open stefanottili opened 1 year ago

stefanottili commented 1 year ago

dump_gds2 issues an ERROR for gds with zero padding at the end to get to multiple of 2k file sizes. it should just ignore everything past ENDLIB

dump_gds2 test.gds.gz

000002452   00 04 07 00              ENDSTR
000002456   00 04 04 00              ENDLIB
*** ERROR: Invalid record length less than 4 (position=2462, cell=UNKNOWN_CELL)

gunzip -c test.gds.gz | xxd

00000980: 0000 0708 0000 0190 0000 06a4 0000 012c  ...............,
00000990: 0004 1100 0004 0700 0004 0400 0000 0000  ................
000009a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000009b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
...
00000fe0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000ff0: 0000 0000 0000 0000 0000 0000 0000 0000  ................

test.gds.gz