Skip to content

klayout throws an ERROR reading a magic file with "tri ... sw" #2263

@stefanottili

Description

@stefanottili

It seems that something goes wrong reading "tri ... sw".

https://github.com/RTimothyEdwards/gf180mcu_ocd_sram_test/blob/main/magic/wafer_space/gf180mcu_ws_ip__id.mag

klayout magic/wafer_space/gf180mcu_ws_ip__id.mag
ERROR: Expected end of text here: w (line=8, file=magic/wafer_space/gf180mcu_ws_ip__id.mag)

   1 magic
   2 tech gf180mcuD
   3 magscale 1 5
   4 timestamp 1765407047
   5 << metal1 >>
   6 tri 0 14144 136 14280 se
   7 rect 136 14144 544 14280
   8 tri 544 14144 680 14280 sw
   9 tri 680 14144 816 14280 se
  10 rect 816 14144 1224 14280
....

src/plugins/streamers/magic/db_plugin/dbMAGReader.cc

483 void  
484 MAGReader::read_tri (tl::Extractor &ex, Layout &layout, cell_index_type cell_index, unsigned int layer)
485 {     
486   double l, b, r, t;
487   ex.read (l);
488   ex.read (b);
489   ex.read (r);
490   ex.read (t);
491       
492   bool s = false, e = false; 
493   while (! ex.at_end ()) {
494     if (ex.test ("s")) { 
495       s = true;
496     } else if (ex.test ("e")) {
497       e = true;
498     } else {
499       break;
500     }
501   } 
502   ex.expect_end ();

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions