mirror of https://github.com/KLayout/klayout.git
Implemented LEF DENSITY statement properly
This commit is contained in:
parent
6a9a024d64
commit
85311d414c
|
|
@ -937,6 +937,24 @@ LEFImporter::read_macro (Layout &layout)
|
|||
|
||||
expect ("END");
|
||||
|
||||
} else if (test ("DENSITY")) {
|
||||
|
||||
// read over DENSITY statements
|
||||
while (! test ("END")) {
|
||||
if (test ("LAYER")) {
|
||||
get ();
|
||||
expect (";");
|
||||
} else {
|
||||
expect ("RECT");
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
get_double ();
|
||||
}
|
||||
expect (";");
|
||||
}
|
||||
}
|
||||
|
||||
expect ("END");
|
||||
|
||||
} else if (test ("FIXEDMASK")) {
|
||||
|
||||
mg->set_fixedmask (true);
|
||||
|
|
|
|||
|
|
@ -719,6 +719,11 @@ TEST(117_mapfile_all)
|
|||
)
|
||||
}
|
||||
|
||||
TEST(118_density)
|
||||
{
|
||||
run_test (_this, "density", "read:in.lef", "au.oas.gz", default_options (), false);
|
||||
}
|
||||
|
||||
TEST(200_lefdef_plugin)
|
||||
{
|
||||
db::Layout ly;
|
||||
|
|
@ -764,3 +769,4 @@ TEST(201_lefdef_plugin_explicit_lef)
|
|||
|
||||
db::compare_layouts (_this, ly, fn_path + "au_plugin_alt_lef.oas.gz", db::WriteOAS);
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,27 @@
|
|||
LAYER M1
|
||||
TYPE ROUTING ;
|
||||
END M1
|
||||
LAYER VIA1
|
||||
TYPE CUT ;
|
||||
END VIA1
|
||||
|
||||
MACRO dense
|
||||
CLASS CORE ;
|
||||
ORIGIN 0.0 0.0 ;
|
||||
SIZE 0.7 BY 0.9 ;
|
||||
OBS
|
||||
LAYER M1 DESIGNRULEWIDTH 0.05 ;
|
||||
RECT 0.04 0.095 0.66 0.685 ;
|
||||
LAYER VIA1 ;
|
||||
RECT 0.285 0.31 0.415 0.36 ;
|
||||
RECT 0.285 0.18 0.415 0.23 ;
|
||||
END
|
||||
DENSITY
|
||||
LAYER M1 ;
|
||||
RECT 0.04 0.09 0.66 0.685 100.0 ;
|
||||
LAYER VIA1 ;
|
||||
RECT 0 0 100 100 45.5 ; #rect from (0,0) to (100,100), density of 45.5%
|
||||
RECT 100 0 200 100 42.2 ; #rect from (100,0) to (200, 100), density of 42.2%
|
||||
END
|
||||
END dense
|
||||
END LIBRARY
|
||||
Loading…
Reference in New Issue