diff --git a/gds21/src/tests.rs b/gds21/src/tests.rs index b780c6d..2365548 100644 --- a/gds21/src/tests.rs +++ b/gds21/src/tests.rs @@ -9,6 +9,7 @@ use chrono::NaiveDate; // Local Imports use crate::data::*; use crate::read::*; +use layout21utils::SerializationFormat::{Json, Yaml, Toml}; /// Specified creation date for test cases fn test_dates() -> GdsDateTimes { @@ -177,19 +178,44 @@ fn record_too_long() -> GdsResult<()> { } } -#[test] -fn empty_lib() -> GdsResult<()> { - // Test round-tripping an empty library +/// Create an empty library with known dates +fn empty_lib() -> GdsLibrary { + // Create an empty library let mut lib = GdsLibrary::new("empty"); - // Set its dates to some known value, so we can check it round-trips lib.dates = test_dates(); + // And return it for other test + lib +} +#[test] +fn empty_lib_roundtrip() -> GdsResult<()> { + // Create an empty, testable library + let lib = empty_lib(); // OK now the actual test roundtrip(&lib)?; check(&lib, &resource("empty.gds.json")); Ok(()) } +#[test] +fn empty_lib_to_json() -> GdsResult<()> { + let lib = empty_lib(); + Json.save(&lib, &resource("empty.gds.json")).expect("save failed"); + Ok(()) +} +#[test] +fn empty_lib_to_yaml() -> GdsResult<()> { + let lib = empty_lib(); + Yaml.save(&lib, &resource("empty.gds.yaml")).expect("save failed"); + Ok(()) +} +#[test] +#[ignore] // https://github.com/dan-fritchman/Layout21/issues/33 +fn empty_lib_to_toml() -> GdsResult<()> { + let lib = empty_lib(); + Toml.save(&lib, &resource("empty.gds.toml")).expect("save failed"); + Ok(()) +} #[test] fn test_invalid_dates() -> GdsResult<()> { @@ -207,7 +233,6 @@ fn test_invalid_dates() -> GdsResult<()> { /// Compare `lib` to "golden" data loaded from JSON at path `golden`. fn check(lib: &GdsLibrary, fname: &impl AsRef) { - use layout21utils::SerializationFormat::Json; // Uncomment this bit to over-write the golden data // Json.save(lib, fname).unwrap(); diff --git a/layout21converters/Cargo.toml b/layout21converters/Cargo.toml index db847c5..5b63ad9 100644 --- a/layout21converters/Cargo.toml +++ b/layout21converters/Cargo.toml @@ -10,6 +10,7 @@ version = "0.2.1" workspace = "../" exclude = ["resources",] +# Converts GDS files to protocol buffer descriptions, using Layout21, and Gds21. [[bin]] name = "gds2proto" path = "src/gds2proto.rs" @@ -22,13 +23,18 @@ path = "src/proto2gds.rs" test = true bench = false -# Converts GDS files to protocol buffer descriptions, using Layout21, and Gds21. [[bin]] name = "lef2yaml" path = "src/lef2yaml.rs" test = true bench = false +[[bin]] +name = "gds2ser" +path = "src/gds2ser.rs" +test = true +bench = false + [dependencies] gds21 = {path = "../gds21"} lef21 = {path = "../lef21"} diff --git a/layout21converters/resources/sky130_fd_sc_hd__dfxtp_1.golden.json b/layout21converters/resources/sky130_fd_sc_hd__dfxtp_1.golden.json new file mode 100644 index 0000000..6fe24bd --- /dev/null +++ b/layout21converters/resources/sky130_fd_sc_hd__dfxtp_1.golden.json @@ -0,0 +1 @@ +{"name":"sky130_fd_sc_hd__dfxtp_1","version":3,"dates":{"modified":{"DateTime":"1970-01-01T00:00:01"},"accessed":{"DateTime":"1970-01-01T00:00:01"}},"units":[0.001,1e-9],"structs":[{"name":"sky130_fd_sc_hd__dfxtp_1","dates":{"modified":{"DateTime":"1970-01-01T00:00:01"},"accessed":{"DateTime":"1970-01-01T00:00:01"}},"elems":[{"GdsBoundary":{"layer":236,"datatype":0,"xy":[{"x":0,"y":0},{"x":7360,"y":0},{"x":7360,"y":2720},{"x":0,"y":2720},{"x":0,"y":0}]}},{"GdsTextElem":{"string":"dfxtp_1","layer":83,"texttype":44,"xy":{"x":0,"y":0},"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.1,"angle":90.0}}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":2905,"y":-85},{"x":3075,"y":-85},{"x":3075,"y":85},{"x":2905,"y":85},{"x":2905,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":3825,"y":-85},{"x":3995,"y":-85},{"x":3995,"y":85},{"x":3825,"y":85},{"x":3825,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":3365,"y":-85},{"x":3535,"y":-85},{"x":3535,"y":85},{"x":3365,"y":85},{"x":3365,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":4285,"y":2635},{"x":4455,"y":2635},{"x":4455,"y":2805},{"x":4285,"y":2805},{"x":4285,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":4285,"y":-85},{"x":4455,"y":-85},{"x":4455,"y":85},{"x":4285,"y":85},{"x":4285,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":4300,"y":1785},{"x":4470,"y":1785},{"x":4470,"y":1955},{"x":4300,"y":1955},{"x":4300,"y":1785}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":4735,"y":1445},{"x":4905,"y":1445},{"x":4905,"y":1615},{"x":4735,"y":1615},{"x":4735,"y":1445}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":4745,"y":2635},{"x":4915,"y":2635},{"x":4915,"y":2805},{"x":4745,"y":2805},{"x":4745,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":4745,"y":-85},{"x":4915,"y":-85},{"x":4915,"y":85},{"x":4745,"y":85},{"x":4745,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":5205,"y":2635},{"x":5375,"y":2635},{"x":5375,"y":2805},{"x":5205,"y":2805},{"x":5205,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":5205,"y":-85},{"x":5375,"y":-85},{"x":5375,"y":85},{"x":5205,"y":85},{"x":5205,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":5665,"y":2635},{"x":5835,"y":2635},{"x":5835,"y":2805},{"x":5665,"y":2805},{"x":5665,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":5665,"y":-85},{"x":5835,"y":-85},{"x":5835,"y":85},{"x":5665,"y":85},{"x":5665,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":6125,"y":2635},{"x":6295,"y":2635},{"x":6295,"y":2805},{"x":6125,"y":2805},{"x":6125,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":6125,"y":-85},{"x":6295,"y":-85},{"x":6295,"y":85},{"x":6125,"y":85},{"x":6125,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":6585,"y":2635},{"x":6755,"y":2635},{"x":6755,"y":2805},{"x":6585,"y":2805},{"x":6585,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":6585,"y":-85},{"x":6755,"y":-85},{"x":6755,"y":85},{"x":6585,"y":85},{"x":6585,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":7045,"y":2635},{"x":7215,"y":2635},{"x":7215,"y":2805},{"x":7045,"y":2805},{"x":7045,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":7045,"y":-85},{"x":7215,"y":-85},{"x":7215,"y":85},{"x":7045,"y":85},{"x":7045,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":145,"y":2635},{"x":315,"y":2635},{"x":315,"y":2805},{"x":145,"y":2805},{"x":145,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":145,"y":-85},{"x":315,"y":-85},{"x":315,"y":85},{"x":145,"y":85},{"x":145,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":605,"y":2635},{"x":775,"y":2635},{"x":775,"y":2805},{"x":605,"y":2805},{"x":605,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":605,"y":-85},{"x":775,"y":-85},{"x":775,"y":85},{"x":605,"y":85},{"x":605,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":630,"y":1785},{"x":800,"y":1785},{"x":800,"y":1955},{"x":630,"y":1955},{"x":630,"y":1785}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":1025,"y":1445},{"x":1195,"y":1445},{"x":1195,"y":1615},{"x":1025,"y":1615},{"x":1025,"y":1445}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":1065,"y":-85},{"x":1235,"y":-85},{"x":1235,"y":85},{"x":1065,"y":85},{"x":1065,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":1525,"y":2635},{"x":1695,"y":2635},{"x":1695,"y":2805},{"x":1525,"y":2805},{"x":1525,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":1985,"y":2635},{"x":2155,"y":2635},{"x":2155,"y":2805},{"x":1985,"y":2805},{"x":1985,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":1985,"y":-85},{"x":2155,"y":-85},{"x":2155,"y":85},{"x":1985,"y":85},{"x":1985,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":2445,"y":2635},{"x":2615,"y":2635},{"x":2615,"y":2805},{"x":2445,"y":2805},{"x":2445,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":2730,"y":1785},{"x":2900,"y":1785},{"x":2900,"y":1955},{"x":2730,"y":1955},{"x":2730,"y":1785}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":1065,"y":2635},{"x":1235,"y":2635},{"x":1235,"y":2805},{"x":1065,"y":2805},{"x":1065,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":1525,"y":-85},{"x":1695,"y":-85},{"x":1695,"y":85},{"x":1525,"y":85},{"x":1525,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":2215,"y":1445},{"x":2385,"y":1445},{"x":2385,"y":1615},{"x":2215,"y":1615},{"x":2215,"y":1445}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":2445,"y":-85},{"x":2615,"y":-85},{"x":2615,"y":85},{"x":2445,"y":85},{"x":2445,"y":-85}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":2905,"y":2635},{"x":3075,"y":2635},{"x":3075,"y":2805},{"x":2905,"y":2805},{"x":2905,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":3825,"y":2635},{"x":3995,"y":2635},{"x":3995,"y":2805},{"x":3825,"y":2805},{"x":3825,"y":2635}]}},{"GdsBoundary":{"layer":67,"datatype":44,"xy":[{"x":3365,"y":2635},{"x":3535,"y":2635},{"x":3535,"y":2805},{"x":3365,"y":2805},{"x":3365,"y":2635}]}},{"GdsBoundary":{"layer":68,"datatype":20,"xy":[{"x":4530,"y":1985},{"x":4240,"y":1985},{"x":4240,"y":1940},{"x":2960,"y":1940},{"x":2960,"y":1985},{"x":2670,"y":1985},{"x":2670,"y":1940},{"x":860,"y":1940},{"x":860,"y":1985},{"x":570,"y":1985},{"x":570,"y":1755},{"x":860,"y":1755},{"x":860,"y":1800},{"x":2670,"y":1800},{"x":2670,"y":1755},{"x":2960,"y":1755},{"x":2960,"y":1800},{"x":4240,"y":1800},{"x":4240,"y":1755},{"x":4530,"y":1755},{"x":4530,"y":1985}]}},{"GdsBoundary":{"layer":68,"datatype":20,"xy":[{"x":4965,"y":1645},{"x":4675,"y":1645},{"x":4675,"y":1600},{"x":2445,"y":1600},{"x":2445,"y":1645},{"x":2155,"y":1645},{"x":2155,"y":1600},{"x":1255,"y":1600},{"x":1255,"y":1645},{"x":965,"y":1645},{"x":965,"y":1415},{"x":1255,"y":1415},{"x":1255,"y":1460},{"x":2155,"y":1460},{"x":2155,"y":1415},{"x":2445,"y":1415},{"x":2445,"y":1460},{"x":4675,"y":1460},{"x":4675,"y":1415},{"x":4965,"y":1415},{"x":4965,"y":1645}]}},{"GdsBoundary":{"layer":68,"datatype":20,"xy":[{"x":0,"y":2480},{"x":7360,"y":2480},{"x":7360,"y":2960},{"x":0,"y":2960},{"x":0,"y":2480}]}},{"GdsBoundary":{"layer":68,"datatype":20,"xy":[{"x":0,"y":-240},{"x":7360,"y":-240},{"x":7360,"y":240},{"x":0,"y":240},{"x":0,"y":-240}]}},{"GdsBoundary":{"layer":65,"datatype":20,"xy":[{"x":6075,"y":1485},{"x":7175,"y":1485},{"x":7175,"y":2485},{"x":6075,"y":2485},{"x":6075,"y":1485}]}},{"GdsBoundary":{"layer":65,"datatype":20,"xy":[{"x":135,"y":1815},{"x":1225,"y":1815},{"x":1225,"y":2455},{"x":135,"y":2455},{"x":135,"y":1815}]}},{"GdsBoundary":{"layer":65,"datatype":20,"xy":[{"x":135,"y":235},{"x":1225,"y":235},{"x":1225,"y":655},{"x":135,"y":655},{"x":135,"y":235}]}},{"GdsBoundary":{"layer":65,"datatype":20,"xy":[{"x":5710,"y":2485},{"x":1495,"y":2485},{"x":1495,"y":2065},{"x":3395,"y":2065},{"x":3395,"y":1735},{"x":4230,"y":1735},{"x":4230,"y":2065},{"x":5710,"y":2065},{"x":5710,"y":2485}]}},{"GdsBoundary":{"layer":65,"datatype":20,"xy":[{"x":5820,"y":655},{"x":5160,"y":655},{"x":5160,"y":595},{"x":4300,"y":595},{"x":4300,"y":875},{"x":3650,"y":875},{"x":3650,"y":655},{"x":3055,"y":655},{"x":3055,"y":595},{"x":2155,"y":595},{"x":2155,"y":655},{"x":1495,"y":655},{"x":1495,"y":235},{"x":5820,"y":235},{"x":5820,"y":655}]}},{"GdsBoundary":{"layer":65,"datatype":20,"xy":[{"x":6095,"y":235},{"x":7185,"y":235},{"x":7185,"y":885},{"x":6095,"y":885},{"x":6095,"y":235}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":160,"y":1075},{"x":330,"y":1075},{"x":330,"y":1245},{"x":160,"y":1245},{"x":160,"y":1075}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":1960,"y":365},{"x":2130,"y":365},{"x":2130,"y":535},{"x":1960,"y":535},{"x":1960,"y":365}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":2195,"y":1265},{"x":2365,"y":1265},{"x":2365,"y":1435},{"x":2195,"y":1435},{"x":2195,"y":1265}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":2295,"y":785},{"x":2465,"y":785},{"x":2465,"y":955},{"x":2295,"y":955},{"x":2295,"y":785}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":2415,"y":2190},{"x":2585,"y":2190},{"x":2585,"y":2360},{"x":2415,"y":2360},{"x":2415,"y":2190}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":2515,"y":365},{"x":2685,"y":365},{"x":2685,"y":535},{"x":2515,"y":535},{"x":2515,"y":365}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":2740,"y":1655},{"x":2910,"y":1655},{"x":2910,"y":1825},{"x":2740,"y":1825},{"x":2740,"y":1655}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":3290,"y":845},{"x":3460,"y":845},{"x":3460,"y":1015},{"x":3290,"y":1015},{"x":3290,"y":845}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":3510,"y":335},{"x":3680,"y":335},{"x":3680,"y":505},{"x":3510,"y":505},{"x":3510,"y":335}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":3610,"y":2255},{"x":3780,"y":2255},{"x":3780,"y":2425},{"x":3610,"y":2425},{"x":3610,"y":2255}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":3610,"y":1915},{"x":3780,"y":1915},{"x":3780,"y":2085},{"x":3610,"y":2085},{"x":3610,"y":1915}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":3610,"y":1325},{"x":3780,"y":1325},{"x":3780,"y":1495},{"x":3610,"y":1495},{"x":3610,"y":1325}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":4030,"y":2215},{"x":4200,"y":2215},{"x":4200,"y":2385},{"x":4030,"y":2385},{"x":4030,"y":2215}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6555,"y":445},{"x":6725,"y":445},{"x":6725,"y":615},{"x":6555,"y":615},{"x":6555,"y":445}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6765,"y":1075},{"x":6935,"y":1075},{"x":6935,"y":1245},{"x":6765,"y":1245},{"x":6765,"y":1075}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6115,"y":1545},{"x":6285,"y":1545},{"x":6285,"y":1715},{"x":6115,"y":1715},{"x":6115,"y":1545}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6965,"y":2225},{"x":7135,"y":2225},{"x":7135,"y":2395},{"x":6965,"y":2395},{"x":6965,"y":2225}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6135,"y":640},{"x":6305,"y":640},{"x":6305,"y":810},{"x":6135,"y":810},{"x":6135,"y":640}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6135,"y":300},{"x":6305,"y":300},{"x":6305,"y":470},{"x":6135,"y":470},{"x":6135,"y":300}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6545,"y":2105},{"x":6715,"y":2105},{"x":6715,"y":2275},{"x":6545,"y":2275},{"x":6545,"y":2105}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6965,"y":1885},{"x":7135,"y":1885},{"x":7135,"y":2055},{"x":6965,"y":2055},{"x":6965,"y":1885}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6965,"y":1545},{"x":7135,"y":1545},{"x":7135,"y":1715},{"x":6965,"y":1715},{"x":6965,"y":1545}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6975,"y":650},{"x":7145,"y":650},{"x":7145,"y":820},{"x":6975,"y":820},{"x":6975,"y":650}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":4105,"y":365},{"x":4275,"y":365},{"x":4275,"y":535},{"x":4105,"y":535},{"x":4105,"y":365}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":4290,"y":1325},{"x":4460,"y":1325},{"x":4460,"y":1495},{"x":4290,"y":1495},{"x":4290,"y":1325}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":4505,"y":2165},{"x":4675,"y":2165},{"x":4675,"y":2335},{"x":4505,"y":2335},{"x":4505,"y":2165}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":4505,"y":785},{"x":4675,"y":785},{"x":4675,"y":955},{"x":4505,"y":955},{"x":4505,"y":785}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":4620,"y":365},{"x":4790,"y":365},{"x":4790,"y":535},{"x":4620,"y":535},{"x":4620,"y":365}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":4800,"y":1655},{"x":4970,"y":1655},{"x":4970,"y":1825},{"x":4800,"y":1825},{"x":4800,"y":1655}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":5480,"y":1655},{"x":5650,"y":1655},{"x":5650,"y":1825},{"x":5480,"y":1825},{"x":5480,"y":1655}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6975,"y":310},{"x":7145,"y":310},{"x":7145,"y":480},{"x":6975,"y":480},{"x":6975,"y":310}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":5500,"y":2215},{"x":5670,"y":2215},{"x":5670,"y":2385},{"x":5500,"y":2385},{"x":5500,"y":2215}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6115,"y":1900},{"x":6285,"y":1900},{"x":6285,"y":2070},{"x":6115,"y":2070},{"x":6115,"y":1900}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":175,"y":2215},{"x":345,"y":2215},{"x":345,"y":2385},{"x":175,"y":2385},{"x":175,"y":2215}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6545,"y":1705},{"x":6715,"y":1705},{"x":6715,"y":1875},{"x":6545,"y":1875},{"x":6545,"y":1705}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":1015,"y":425},{"x":1185,"y":425},{"x":1185,"y":595},{"x":1015,"y":595},{"x":1015,"y":425}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":1535,"y":295},{"x":1705,"y":295},{"x":1705,"y":465},{"x":1535,"y":465},{"x":1535,"y":295}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":595,"y":2135},{"x":765,"y":2135},{"x":765,"y":2305},{"x":595,"y":2305},{"x":595,"y":2135}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":175,"y":425},{"x":345,"y":425},{"x":345,"y":595},{"x":175,"y":595},{"x":175,"y":425}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":5610,"y":365},{"x":5780,"y":365},{"x":5780,"y":535},{"x":5610,"y":535},{"x":5610,"y":365}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":1480,"y":1415},{"x":1650,"y":1415},{"x":1650,"y":1585},{"x":1480,"y":1585},{"x":1480,"y":1415}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":670,"y":1150},{"x":840,"y":1150},{"x":840,"y":1320},{"x":670,"y":1320},{"x":670,"y":1150}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":5845,"y":1075},{"x":6015,"y":1075},{"x":6015,"y":1245},{"x":5845,"y":1245},{"x":5845,"y":1075}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":1015,"y":2215},{"x":1185,"y":2215},{"x":1185,"y":2385},{"x":1015,"y":2385},{"x":1015,"y":2215}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":595,"y":295},{"x":765,"y":295},{"x":765,"y":465},{"x":595,"y":465},{"x":595,"y":295}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":1955,"y":2215},{"x":2125,"y":2215},{"x":2125,"y":2385},{"x":1955,"y":2385},{"x":1955,"y":2215}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":6115,"y":2255},{"x":6285,"y":2255},{"x":6285,"y":2425},{"x":6115,"y":2425},{"x":6115,"y":2255}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":1015,"y":1875},{"x":1185,"y":1875},{"x":1185,"y":2045},{"x":1015,"y":2045},{"x":1015,"y":1875}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":1535,"y":2255},{"x":1705,"y":2255},{"x":1705,"y":2425},{"x":1535,"y":2425},{"x":1535,"y":2255}]}},{"GdsBoundary":{"layer":66,"datatype":44,"xy":[{"x":175,"y":1875},{"x":345,"y":1875},{"x":345,"y":2045},{"x":175,"y":2045},{"x":175,"y":1875}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":1015,"y":345},{"x":1200,"y":345},{"x":1200,"y":2465},{"x":1015,"y":2465},{"x":1015,"y":345}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":6015,"y":1325},{"x":5310,"y":1325},{"x":5310,"y":2335},{"x":4425,"y":2335},{"x":4425,"y":2165},{"x":5140,"y":2165},{"x":5140,"y":535},{"x":4525,"y":535},{"x":4525,"y":365},{"x":5310,"y":365},{"x":5310,"y":995},{"x":6015,"y":995},{"x":6015,"y":1325}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":6935,"y":1325},{"x":6375,"y":1325},{"x":6375,"y":2465},{"x":6035,"y":2465},{"x":6035,"y":1905},{"x":5480,"y":1905},{"x":5480,"y":1530},{"x":6185,"y":1530},{"x":6185,"y":825},{"x":6055,"y":825},{"x":6055,"y":300},{"x":6385,"y":300},{"x":6385,"y":995},{"x":6935,"y":995},{"x":6935,"y":1325}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":7275,"y":1575},{"x":7215,"y":1575},{"x":7215,"y":2420},{"x":6885,"y":2420},{"x":6885,"y":1495},{"x":7060,"y":1495},{"x":7060,"y":1445},{"x":7105,"y":1445},{"x":7105,"y":865},{"x":7050,"y":865},{"x":7050,"y":825},{"x":6895,"y":825},{"x":6895,"y":305},{"x":7225,"y":305},{"x":7225,"y":740},{"x":7275,"y":740},{"x":7275,"y":1575}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":4970,"y":1995},{"x":4650,"y":1995},{"x":4650,"y":1035},{"x":4505,"y":1035},{"x":4505,"y":705},{"x":4970,"y":705},{"x":4970,"y":1995}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":1370,"y":715},{"x":1650,"y":715},{"x":1650,"y":1665},{"x":1370,"y":1665},{"x":1370,"y":715}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":90,"y":975},{"x":440,"y":975},{"x":440,"y":1625},{"x":90,"y":1625},{"x":90,"y":975}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":840,"y":1965},{"x":345,"y":1965},{"x":345,"y":2465},{"x":175,"y":2465},{"x":175,"y":1795},{"x":610,"y":1795},{"x":610,"y":805},{"x":175,"y":805},{"x":175,"y":345},{"x":345,"y":345},{"x":345,"y":635},{"x":840,"y":635},{"x":840,"y":1965}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":7360,"y":2805},{"x":0,"y":2805},{"x":0,"y":2635},{"x":515,"y":2635},{"x":515,"y":2135},{"x":845,"y":2135},{"x":845,"y":2635},{"x":1440,"y":2635},{"x":1440,"y":2175},{"x":1705,"y":2175},{"x":1705,"y":2635},{"x":3610,"y":2635},{"x":3610,"y":1835},{"x":3780,"y":1835},{"x":3780,"y":2635},{"x":5490,"y":2635},{"x":5490,"y":2135},{"x":5805,"y":2135},{"x":5805,"y":2635},{"x":6545,"y":2635},{"x":6545,"y":1625},{"x":6715,"y":1625},{"x":6715,"y":2635},{"x":7360,"y":2635},{"x":7360,"y":2805}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":7360,"y":85},{"x":6725,"y":85},{"x":6725,"y":695},{"x":6555,"y":695},{"x":6555,"y":85},{"x":5795,"y":85},{"x":5795,"y":615},{"x":5585,"y":615},{"x":5585,"y":85},{"x":3770,"y":85},{"x":3770,"y":585},{"x":3400,"y":585},{"x":3400,"y":85},{"x":1705,"y":85},{"x":1705,"y":545},{"x":1455,"y":545},{"x":1455,"y":85},{"x":845,"y":85},{"x":845,"y":465},{"x":515,"y":465},{"x":515,"y":85},{"x":0,"y":85},{"x":0,"y":-85},{"x":7360,"y":-85},{"x":7360,"y":85}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":2210,"y":535},{"x":2045,"y":535},{"x":2045,"y":805},{"x":1990,"y":805},{"x":1990,"y":1910},{"x":2125,"y":1910},{"x":2125,"y":2465},{"x":1875,"y":2465},{"x":1875,"y":2040},{"x":1820,"y":2040},{"x":1820,"y":675},{"x":1875,"y":675},{"x":1875,"y":365},{"x":2210,"y":365},{"x":2210,"y":535}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":2160,"y":1125},{"x":2400,"y":1125},{"x":2400,"y":1720},{"x":2160,"y":1720},{"x":2160,"y":1125}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":3100,"y":2020},{"x":2570,"y":2020},{"x":2570,"y":955},{"x":2215,"y":955},{"x":2215,"y":735},{"x":2740,"y":735},{"x":2740,"y":1655},{"x":3100,"y":1655},{"x":3100,"y":2020}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":4290,"y":1245},{"x":4480,"y":1245},{"x":4480,"y":1965},{"x":4290,"y":1965},{"x":4290,"y":1245}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":3780,"y":1575},{"x":3440,"y":1575},{"x":3440,"y":2360},{"x":2335,"y":2360},{"x":2335,"y":2190},{"x":3270,"y":2190},{"x":3270,"y":1485},{"x":2910,"y":1485},{"x":2910,"y":535},{"x":2405,"y":535},{"x":2405,"y":365},{"x":3080,"y":365},{"x":3080,"y":1315},{"x":3610,"y":1315},{"x":3610,"y":1245},{"x":3780,"y":1245},{"x":3780,"y":1575}]}},{"GdsBoundary":{"layer":67,"datatype":20,"xy":[{"x":4355,"y":535},{"x":4120,"y":535},{"x":4120,"y":2135},{"x":4200,"y":2135},{"x":4200,"y":2465},{"x":3950,"y":2465},{"x":3950,"y":1065},{"x":3490,"y":1065},{"x":3490,"y":1095},{"x":3290,"y":1095},{"x":3290,"y":765},{"x":3950,"y":765},{"x":3950,"y":365},{"x":4355,"y":365},{"x":4355,"y":535}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":3540,"y":1065},{"x":3320,"y":1065},{"x":3320,"y":2615},{"x":3170,"y":2615},{"x":3170,"y":795},{"x":3305,"y":795},{"x":3305,"y":105},{"x":3455,"y":105},{"x":3455,"y":795},{"x":3540,"y":795},{"x":3540,"y":1065}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":2545,"y":1005},{"x":2215,"y":1005},{"x":2215,"y":735},{"x":2315,"y":735},{"x":2315,"y":105},{"x":2465,"y":105},{"x":2465,"y":735},{"x":2545,"y":735},{"x":2545,"y":1005}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":1905,"y":2615},{"x":1755,"y":2615},{"x":1755,"y":1665},{"x":1430,"y":1665},{"x":1430,"y":1335},{"x":1755,"y":1335},{"x":1755,"y":105},{"x":1905,"y":105},{"x":1905,"y":2615}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":2960,"y":1365},{"x":2445,"y":1365},{"x":2445,"y":1485},{"x":2330,"y":1485},{"x":2330,"y":2615},{"x":2180,"y":2615},{"x":2180,"y":1485},{"x":2115,"y":1485},{"x":2115,"y":1215},{"x":2810,"y":1215},{"x":2810,"y":105},{"x":2960,"y":105},{"x":2960,"y":1365}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":2960,"y":1905},{"x":2805,"y":1905},{"x":2805,"y":2615},{"x":2655,"y":2615},{"x":2655,"y":1575},{"x":2960,"y":1575},{"x":2960,"y":1905}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":5700,"y":1905},{"x":5445,"y":1905},{"x":5445,"y":2615},{"x":5295,"y":2615},{"x":5295,"y":1575},{"x":5410,"y":1575},{"x":5410,"y":105},{"x":5560,"y":105},{"x":5560,"y":1575},{"x":5700,"y":1575},{"x":5700,"y":1905}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":5050,"y":1875},{"x":4875,"y":1875},{"x":4875,"y":2615},{"x":4725,"y":2615},{"x":4725,"y":1875},{"x":4720,"y":1875},{"x":4720,"y":1605},{"x":5050,"y":1605},{"x":5050,"y":1875}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":965,"y":2585},{"x":815,"y":2585},{"x":815,"y":1370},{"x":590,"y":1370},{"x":590,"y":1100},{"x":815,"y":1100},{"x":815,"y":105},{"x":965,"y":105},{"x":965,"y":2585}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":5085,"y":1395},{"x":4510,"y":1395},{"x":4510,"y":1575},{"x":4455,"y":1575},{"x":4455,"y":2615},{"x":4305,"y":2615},{"x":4305,"y":1575},{"x":4240,"y":1575},{"x":4240,"y":1245},{"x":4935,"y":1245},{"x":4935,"y":105},{"x":5085,"y":105},{"x":5085,"y":1395}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":545,"y":880},{"x":380,"y":880},{"x":380,"y":1590},{"x":545,"y":1590},{"x":545,"y":2585},{"x":395,"y":2585},{"x":395,"y":1740},{"x":230,"y":1740},{"x":230,"y":1325},{"x":110,"y":1325},{"x":110,"y":995},{"x":230,"y":995},{"x":230,"y":730},{"x":395,"y":730},{"x":395,"y":105},{"x":545,"y":105},{"x":545,"y":880}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":6985,"y":1325},{"x":6915,"y":1325},{"x":6915,"y":2615},{"x":6765,"y":2615},{"x":6765,"y":1325},{"x":6715,"y":1325},{"x":6715,"y":995},{"x":6775,"y":995},{"x":6775,"y":105},{"x":6925,"y":105},{"x":6925,"y":995},{"x":6985,"y":995},{"x":6985,"y":1325}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":6505,"y":1325},{"x":6495,"y":1325},{"x":6495,"y":2615},{"x":6345,"y":2615},{"x":6345,"y":1325},{"x":5795,"y":1325},{"x":5795,"y":995},{"x":6355,"y":995},{"x":6355,"y":105},{"x":6505,"y":105},{"x":6505,"y":1325}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":4725,"y":1035},{"x":4405,"y":1035},{"x":4405,"y":105},{"x":4555,"y":105},{"x":4555,"y":705},{"x":4725,"y":705},{"x":4725,"y":1035}]}},{"GdsBoundary":{"layer":66,"datatype":20,"xy":[{"x":4050,"y":1100},{"x":3980,"y":1100},{"x":3980,"y":2615},{"x":3830,"y":2615},{"x":3830,"y":1545},{"x":3530,"y":1545},{"x":3530,"y":1275},{"x":3830,"y":1275},{"x":3830,"y":950},{"x":3900,"y":950},{"x":3900,"y":105},{"x":4050,"y":105},{"x":4050,"y":1100}]}},{"GdsBoundary":{"layer":64,"datatype":20,"xy":[{"x":-190,"y":1305},{"x":7550,"y":1305},{"x":7550,"y":2910},{"x":-190,"y":2910},{"x":-190,"y":1305}]}},{"GdsBoundary":{"layer":95,"datatype":20,"xy":[{"x":7360,"y":1345},{"x":5910,"y":1345},{"x":5910,"y":1925},{"x":4675,"y":1925},{"x":4675,"y":1595},{"x":3085,"y":1595},{"x":3085,"y":1925},{"x":2095,"y":1925},{"x":2095,"y":1685},{"x":1380,"y":1685},{"x":1380,"y":1420},{"x":565,"y":1420},{"x":565,"y":1345},{"x":0,"y":1345},{"x":0,"y":975},{"x":2195,"y":975},{"x":2195,"y":685},{"x":2905,"y":685},{"x":2905,"y":745},{"x":3590,"y":745},{"x":3590,"y":975},{"x":4320,"y":975},{"x":4320,"y":685},{"x":4775,"y":685},{"x":4775,"y":795},{"x":5675,"y":795},{"x":5675,"y":975},{"x":7360,"y":975},{"x":7360,"y":1345}]}},{"GdsBoundary":{"layer":93,"datatype":44,"xy":[{"x":0,"y":-190},{"x":7360,"y":-190},{"x":7360,"y":1015},{"x":0,"y":1015},{"x":0,"y":-190}]}},{"GdsBoundary":{"layer":78,"datatype":44,"xy":[{"x":0,"y":1250},{"x":7360,"y":1250},{"x":7360,"y":2720},{"x":0,"y":2720},{"x":0,"y":1250}]}},{"GdsBoundary":{"layer":81,"datatype":4,"xy":[{"x":0,"y":0},{"x":7360,"y":0},{"x":7360,"y":2720},{"x":0,"y":2720},{"x":0,"y":0}]}},{"GdsBoundary":{"layer":94,"datatype":20,"xy":[{"x":7360,"y":2910},{"x":0,"y":2910},{"x":0,"y":1685},{"x":1350,"y":1685},{"x":1350,"y":1935},{"x":3240,"y":1935},{"x":3240,"y":1605},{"x":4665,"y":1605},{"x":4665,"y":1935},{"x":5930,"y":1935},{"x":5930,"y":1355},{"x":7360,"y":1355},{"x":7360,"y":2910}]}},{"GdsBoundary":{"layer":67,"datatype":16,"xy":[{"x":145,"y":1105},{"x":315,"y":1105},{"x":315,"y":1275},{"x":145,"y":1275},{"x":145,"y":1105}]}},{"GdsBoundary":{"layer":67,"datatype":16,"xy":[{"x":1445,"y":1105},{"x":1615,"y":1105},{"x":1615,"y":1275},{"x":1445,"y":1275},{"x":1445,"y":1105}]}},{"GdsBoundary":{"layer":67,"datatype":16,"xy":[{"x":6950,"y":425},{"x":7120,"y":425},{"x":7120,"y":595},{"x":6950,"y":595},{"x":6950,"y":425}]}},{"GdsTextElem":{"string":"VPB","layer":64,"texttype":5,"xy":{"x":230,"y":2720},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.1}}},{"GdsTextElem":{"string":"VPB","layer":64,"texttype":5,"xy":{"x":230,"y":2720},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.1}}},{"GdsTextElem":{"string":"VNB","layer":64,"texttype":59,"xy":{"x":230,"y":0},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.1}}},{"GdsTextElem":{"string":"VNB","layer":64,"texttype":59,"xy":{"x":230,"y":0},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.1}}},{"GdsTextElem":{"string":"Q","layer":67,"texttype":5,"xy":{"x":7035,"y":510},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.2}}},{"GdsTextElem":{"string":"CLK","layer":67,"texttype":5,"xy":{"x":230,"y":1190},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.2}}},{"GdsTextElem":{"string":"D","layer":67,"texttype":5,"xy":{"x":1535,"y":1190},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.1}}},{"GdsTextElem":{"string":"VPWR","layer":68,"texttype":5,"xy":{"x":230,"y":2720},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.1}}},{"GdsTextElem":{"string":"VGND","layer":68,"texttype":5,"xy":{"x":230,"y":0},"presentation":[0,5],"strans":{"reflected":false,"abs_mag":false,"abs_angle":false,"mag":0.1}}},{"GdsBoundary":{"layer":64,"datatype":16,"xy":[{"x":145,"y":2635},{"x":315,"y":2635},{"x":315,"y":2805},{"x":145,"y":2805},{"x":145,"y":2635}]}},{"GdsBoundary":{"layer":64,"datatype":16,"xy":[{"x":145,"y":2635},{"x":315,"y":2635},{"x":315,"y":2805},{"x":145,"y":2805},{"x":145,"y":2635}]}},{"GdsBoundary":{"layer":122,"datatype":16,"xy":[{"x":145,"y":-85},{"x":315,"y":-85},{"x":315,"y":85},{"x":145,"y":85},{"x":145,"y":-85}]}},{"GdsBoundary":{"layer":122,"datatype":16,"xy":[{"x":145,"y":-85},{"x":315,"y":-85},{"x":315,"y":85},{"x":145,"y":85},{"x":145,"y":-85}]}},{"GdsBoundary":{"layer":68,"datatype":16,"xy":[{"x":145,"y":2635},{"x":315,"y":2635},{"x":315,"y":2805},{"x":145,"y":2805},{"x":145,"y":2635}]}},{"GdsBoundary":{"layer":68,"datatype":16,"xy":[{"x":145,"y":-85},{"x":315,"y":-85},{"x":315,"y":85},{"x":145,"y":85},{"x":145,"y":-85}]}}]}]} \ No newline at end of file diff --git a/layout21converters/resources/sky130_fd_sc_hd__dfxtp_1.golden.yaml b/layout21converters/resources/sky130_fd_sc_hd__dfxtp_1.golden.yaml new file mode 100644 index 0000000..ccd812e --- /dev/null +++ b/layout21converters/resources/sky130_fd_sc_hd__dfxtp_1.golden.yaml @@ -0,0 +1,2735 @@ +--- +name: sky130_fd_sc_hd__dfxtp_1 +version: 3 +dates: + modified: + DateTime: "1970-01-01T00:00:01" + accessed: + DateTime: "1970-01-01T00:00:01" +units: + - 0.001 + - 1e-9 +structs: + - name: sky130_fd_sc_hd__dfxtp_1 + dates: + modified: + DateTime: "1970-01-01T00:00:01" + accessed: + DateTime: "1970-01-01T00:00:01" + elems: + - GdsBoundary: + layer: 236 + datatype: 0 + xy: + - x: 0 + y: 0 + - x: 7360 + y: 0 + - x: 7360 + y: 2720 + - x: 0 + y: 2720 + - x: 0 + y: 0 + - GdsTextElem: + string: dfxtp_1 + layer: 83 + texttype: 44 + xy: + x: 0 + y: 0 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.1 + angle: 90.0 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 2905 + y: -85 + - x: 3075 + y: -85 + - x: 3075 + y: 85 + - x: 2905 + y: 85 + - x: 2905 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 3825 + y: -85 + - x: 3995 + y: -85 + - x: 3995 + y: 85 + - x: 3825 + y: 85 + - x: 3825 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 3365 + y: -85 + - x: 3535 + y: -85 + - x: 3535 + y: 85 + - x: 3365 + y: 85 + - x: 3365 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 4285 + y: 2635 + - x: 4455 + y: 2635 + - x: 4455 + y: 2805 + - x: 4285 + y: 2805 + - x: 4285 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 4285 + y: -85 + - x: 4455 + y: -85 + - x: 4455 + y: 85 + - x: 4285 + y: 85 + - x: 4285 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 4300 + y: 1785 + - x: 4470 + y: 1785 + - x: 4470 + y: 1955 + - x: 4300 + y: 1955 + - x: 4300 + y: 1785 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 4735 + y: 1445 + - x: 4905 + y: 1445 + - x: 4905 + y: 1615 + - x: 4735 + y: 1615 + - x: 4735 + y: 1445 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 4745 + y: 2635 + - x: 4915 + y: 2635 + - x: 4915 + y: 2805 + - x: 4745 + y: 2805 + - x: 4745 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 4745 + y: -85 + - x: 4915 + y: -85 + - x: 4915 + y: 85 + - x: 4745 + y: 85 + - x: 4745 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 5205 + y: 2635 + - x: 5375 + y: 2635 + - x: 5375 + y: 2805 + - x: 5205 + y: 2805 + - x: 5205 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 5205 + y: -85 + - x: 5375 + y: -85 + - x: 5375 + y: 85 + - x: 5205 + y: 85 + - x: 5205 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 5665 + y: 2635 + - x: 5835 + y: 2635 + - x: 5835 + y: 2805 + - x: 5665 + y: 2805 + - x: 5665 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 5665 + y: -85 + - x: 5835 + y: -85 + - x: 5835 + y: 85 + - x: 5665 + y: 85 + - x: 5665 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 6125 + y: 2635 + - x: 6295 + y: 2635 + - x: 6295 + y: 2805 + - x: 6125 + y: 2805 + - x: 6125 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 6125 + y: -85 + - x: 6295 + y: -85 + - x: 6295 + y: 85 + - x: 6125 + y: 85 + - x: 6125 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 6585 + y: 2635 + - x: 6755 + y: 2635 + - x: 6755 + y: 2805 + - x: 6585 + y: 2805 + - x: 6585 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 6585 + y: -85 + - x: 6755 + y: -85 + - x: 6755 + y: 85 + - x: 6585 + y: 85 + - x: 6585 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 7045 + y: 2635 + - x: 7215 + y: 2635 + - x: 7215 + y: 2805 + - x: 7045 + y: 2805 + - x: 7045 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 7045 + y: -85 + - x: 7215 + y: -85 + - x: 7215 + y: 85 + - x: 7045 + y: 85 + - x: 7045 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 145 + y: 2635 + - x: 315 + y: 2635 + - x: 315 + y: 2805 + - x: 145 + y: 2805 + - x: 145 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 145 + y: -85 + - x: 315 + y: -85 + - x: 315 + y: 85 + - x: 145 + y: 85 + - x: 145 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 605 + y: 2635 + - x: 775 + y: 2635 + - x: 775 + y: 2805 + - x: 605 + y: 2805 + - x: 605 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 605 + y: -85 + - x: 775 + y: -85 + - x: 775 + y: 85 + - x: 605 + y: 85 + - x: 605 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 630 + y: 1785 + - x: 800 + y: 1785 + - x: 800 + y: 1955 + - x: 630 + y: 1955 + - x: 630 + y: 1785 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 1025 + y: 1445 + - x: 1195 + y: 1445 + - x: 1195 + y: 1615 + - x: 1025 + y: 1615 + - x: 1025 + y: 1445 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 1065 + y: -85 + - x: 1235 + y: -85 + - x: 1235 + y: 85 + - x: 1065 + y: 85 + - x: 1065 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 1525 + y: 2635 + - x: 1695 + y: 2635 + - x: 1695 + y: 2805 + - x: 1525 + y: 2805 + - x: 1525 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 1985 + y: 2635 + - x: 2155 + y: 2635 + - x: 2155 + y: 2805 + - x: 1985 + y: 2805 + - x: 1985 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 1985 + y: -85 + - x: 2155 + y: -85 + - x: 2155 + y: 85 + - x: 1985 + y: 85 + - x: 1985 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 2445 + y: 2635 + - x: 2615 + y: 2635 + - x: 2615 + y: 2805 + - x: 2445 + y: 2805 + - x: 2445 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 2730 + y: 1785 + - x: 2900 + y: 1785 + - x: 2900 + y: 1955 + - x: 2730 + y: 1955 + - x: 2730 + y: 1785 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 1065 + y: 2635 + - x: 1235 + y: 2635 + - x: 1235 + y: 2805 + - x: 1065 + y: 2805 + - x: 1065 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 1525 + y: -85 + - x: 1695 + y: -85 + - x: 1695 + y: 85 + - x: 1525 + y: 85 + - x: 1525 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 2215 + y: 1445 + - x: 2385 + y: 1445 + - x: 2385 + y: 1615 + - x: 2215 + y: 1615 + - x: 2215 + y: 1445 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 2445 + y: -85 + - x: 2615 + y: -85 + - x: 2615 + y: 85 + - x: 2445 + y: 85 + - x: 2445 + y: -85 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 2905 + y: 2635 + - x: 3075 + y: 2635 + - x: 3075 + y: 2805 + - x: 2905 + y: 2805 + - x: 2905 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 3825 + y: 2635 + - x: 3995 + y: 2635 + - x: 3995 + y: 2805 + - x: 3825 + y: 2805 + - x: 3825 + y: 2635 + - GdsBoundary: + layer: 67 + datatype: 44 + xy: + - x: 3365 + y: 2635 + - x: 3535 + y: 2635 + - x: 3535 + y: 2805 + - x: 3365 + y: 2805 + - x: 3365 + y: 2635 + - GdsBoundary: + layer: 68 + datatype: 20 + xy: + - x: 4530 + y: 1985 + - x: 4240 + y: 1985 + - x: 4240 + y: 1940 + - x: 2960 + y: 1940 + - x: 2960 + y: 1985 + - x: 2670 + y: 1985 + - x: 2670 + y: 1940 + - x: 860 + y: 1940 + - x: 860 + y: 1985 + - x: 570 + y: 1985 + - x: 570 + y: 1755 + - x: 860 + y: 1755 + - x: 860 + y: 1800 + - x: 2670 + y: 1800 + - x: 2670 + y: 1755 + - x: 2960 + y: 1755 + - x: 2960 + y: 1800 + - x: 4240 + y: 1800 + - x: 4240 + y: 1755 + - x: 4530 + y: 1755 + - x: 4530 + y: 1985 + - GdsBoundary: + layer: 68 + datatype: 20 + xy: + - x: 4965 + y: 1645 + - x: 4675 + y: 1645 + - x: 4675 + y: 1600 + - x: 2445 + y: 1600 + - x: 2445 + y: 1645 + - x: 2155 + y: 1645 + - x: 2155 + y: 1600 + - x: 1255 + y: 1600 + - x: 1255 + y: 1645 + - x: 965 + y: 1645 + - x: 965 + y: 1415 + - x: 1255 + y: 1415 + - x: 1255 + y: 1460 + - x: 2155 + y: 1460 + - x: 2155 + y: 1415 + - x: 2445 + y: 1415 + - x: 2445 + y: 1460 + - x: 4675 + y: 1460 + - x: 4675 + y: 1415 + - x: 4965 + y: 1415 + - x: 4965 + y: 1645 + - GdsBoundary: + layer: 68 + datatype: 20 + xy: + - x: 0 + y: 2480 + - x: 7360 + y: 2480 + - x: 7360 + y: 2960 + - x: 0 + y: 2960 + - x: 0 + y: 2480 + - GdsBoundary: + layer: 68 + datatype: 20 + xy: + - x: 0 + y: -240 + - x: 7360 + y: -240 + - x: 7360 + y: 240 + - x: 0 + y: 240 + - x: 0 + y: -240 + - GdsBoundary: + layer: 65 + datatype: 20 + xy: + - x: 6075 + y: 1485 + - x: 7175 + y: 1485 + - x: 7175 + y: 2485 + - x: 6075 + y: 2485 + - x: 6075 + y: 1485 + - GdsBoundary: + layer: 65 + datatype: 20 + xy: + - x: 135 + y: 1815 + - x: 1225 + y: 1815 + - x: 1225 + y: 2455 + - x: 135 + y: 2455 + - x: 135 + y: 1815 + - GdsBoundary: + layer: 65 + datatype: 20 + xy: + - x: 135 + y: 235 + - x: 1225 + y: 235 + - x: 1225 + y: 655 + - x: 135 + y: 655 + - x: 135 + y: 235 + - GdsBoundary: + layer: 65 + datatype: 20 + xy: + - x: 5710 + y: 2485 + - x: 1495 + y: 2485 + - x: 1495 + y: 2065 + - x: 3395 + y: 2065 + - x: 3395 + y: 1735 + - x: 4230 + y: 1735 + - x: 4230 + y: 2065 + - x: 5710 + y: 2065 + - x: 5710 + y: 2485 + - GdsBoundary: + layer: 65 + datatype: 20 + xy: + - x: 5820 + y: 655 + - x: 5160 + y: 655 + - x: 5160 + y: 595 + - x: 4300 + y: 595 + - x: 4300 + y: 875 + - x: 3650 + y: 875 + - x: 3650 + y: 655 + - x: 3055 + y: 655 + - x: 3055 + y: 595 + - x: 2155 + y: 595 + - x: 2155 + y: 655 + - x: 1495 + y: 655 + - x: 1495 + y: 235 + - x: 5820 + y: 235 + - x: 5820 + y: 655 + - GdsBoundary: + layer: 65 + datatype: 20 + xy: + - x: 6095 + y: 235 + - x: 7185 + y: 235 + - x: 7185 + y: 885 + - x: 6095 + y: 885 + - x: 6095 + y: 235 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 160 + y: 1075 + - x: 330 + y: 1075 + - x: 330 + y: 1245 + - x: 160 + y: 1245 + - x: 160 + y: 1075 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 1960 + y: 365 + - x: 2130 + y: 365 + - x: 2130 + y: 535 + - x: 1960 + y: 535 + - x: 1960 + y: 365 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 2195 + y: 1265 + - x: 2365 + y: 1265 + - x: 2365 + y: 1435 + - x: 2195 + y: 1435 + - x: 2195 + y: 1265 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 2295 + y: 785 + - x: 2465 + y: 785 + - x: 2465 + y: 955 + - x: 2295 + y: 955 + - x: 2295 + y: 785 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 2415 + y: 2190 + - x: 2585 + y: 2190 + - x: 2585 + y: 2360 + - x: 2415 + y: 2360 + - x: 2415 + y: 2190 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 2515 + y: 365 + - x: 2685 + y: 365 + - x: 2685 + y: 535 + - x: 2515 + y: 535 + - x: 2515 + y: 365 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 2740 + y: 1655 + - x: 2910 + y: 1655 + - x: 2910 + y: 1825 + - x: 2740 + y: 1825 + - x: 2740 + y: 1655 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 3290 + y: 845 + - x: 3460 + y: 845 + - x: 3460 + y: 1015 + - x: 3290 + y: 1015 + - x: 3290 + y: 845 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 3510 + y: 335 + - x: 3680 + y: 335 + - x: 3680 + y: 505 + - x: 3510 + y: 505 + - x: 3510 + y: 335 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 3610 + y: 2255 + - x: 3780 + y: 2255 + - x: 3780 + y: 2425 + - x: 3610 + y: 2425 + - x: 3610 + y: 2255 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 3610 + y: 1915 + - x: 3780 + y: 1915 + - x: 3780 + y: 2085 + - x: 3610 + y: 2085 + - x: 3610 + y: 1915 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 3610 + y: 1325 + - x: 3780 + y: 1325 + - x: 3780 + y: 1495 + - x: 3610 + y: 1495 + - x: 3610 + y: 1325 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 4030 + y: 2215 + - x: 4200 + y: 2215 + - x: 4200 + y: 2385 + - x: 4030 + y: 2385 + - x: 4030 + y: 2215 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6555 + y: 445 + - x: 6725 + y: 445 + - x: 6725 + y: 615 + - x: 6555 + y: 615 + - x: 6555 + y: 445 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6765 + y: 1075 + - x: 6935 + y: 1075 + - x: 6935 + y: 1245 + - x: 6765 + y: 1245 + - x: 6765 + y: 1075 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6115 + y: 1545 + - x: 6285 + y: 1545 + - x: 6285 + y: 1715 + - x: 6115 + y: 1715 + - x: 6115 + y: 1545 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6965 + y: 2225 + - x: 7135 + y: 2225 + - x: 7135 + y: 2395 + - x: 6965 + y: 2395 + - x: 6965 + y: 2225 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6135 + y: 640 + - x: 6305 + y: 640 + - x: 6305 + y: 810 + - x: 6135 + y: 810 + - x: 6135 + y: 640 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6135 + y: 300 + - x: 6305 + y: 300 + - x: 6305 + y: 470 + - x: 6135 + y: 470 + - x: 6135 + y: 300 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6545 + y: 2105 + - x: 6715 + y: 2105 + - x: 6715 + y: 2275 + - x: 6545 + y: 2275 + - x: 6545 + y: 2105 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6965 + y: 1885 + - x: 7135 + y: 1885 + - x: 7135 + y: 2055 + - x: 6965 + y: 2055 + - x: 6965 + y: 1885 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6965 + y: 1545 + - x: 7135 + y: 1545 + - x: 7135 + y: 1715 + - x: 6965 + y: 1715 + - x: 6965 + y: 1545 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6975 + y: 650 + - x: 7145 + y: 650 + - x: 7145 + y: 820 + - x: 6975 + y: 820 + - x: 6975 + y: 650 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 4105 + y: 365 + - x: 4275 + y: 365 + - x: 4275 + y: 535 + - x: 4105 + y: 535 + - x: 4105 + y: 365 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 4290 + y: 1325 + - x: 4460 + y: 1325 + - x: 4460 + y: 1495 + - x: 4290 + y: 1495 + - x: 4290 + y: 1325 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 4505 + y: 2165 + - x: 4675 + y: 2165 + - x: 4675 + y: 2335 + - x: 4505 + y: 2335 + - x: 4505 + y: 2165 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 4505 + y: 785 + - x: 4675 + y: 785 + - x: 4675 + y: 955 + - x: 4505 + y: 955 + - x: 4505 + y: 785 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 4620 + y: 365 + - x: 4790 + y: 365 + - x: 4790 + y: 535 + - x: 4620 + y: 535 + - x: 4620 + y: 365 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 4800 + y: 1655 + - x: 4970 + y: 1655 + - x: 4970 + y: 1825 + - x: 4800 + y: 1825 + - x: 4800 + y: 1655 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 5480 + y: 1655 + - x: 5650 + y: 1655 + - x: 5650 + y: 1825 + - x: 5480 + y: 1825 + - x: 5480 + y: 1655 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6975 + y: 310 + - x: 7145 + y: 310 + - x: 7145 + y: 480 + - x: 6975 + y: 480 + - x: 6975 + y: 310 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 5500 + y: 2215 + - x: 5670 + y: 2215 + - x: 5670 + y: 2385 + - x: 5500 + y: 2385 + - x: 5500 + y: 2215 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6115 + y: 1900 + - x: 6285 + y: 1900 + - x: 6285 + y: 2070 + - x: 6115 + y: 2070 + - x: 6115 + y: 1900 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 175 + y: 2215 + - x: 345 + y: 2215 + - x: 345 + y: 2385 + - x: 175 + y: 2385 + - x: 175 + y: 2215 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6545 + y: 1705 + - x: 6715 + y: 1705 + - x: 6715 + y: 1875 + - x: 6545 + y: 1875 + - x: 6545 + y: 1705 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 1015 + y: 425 + - x: 1185 + y: 425 + - x: 1185 + y: 595 + - x: 1015 + y: 595 + - x: 1015 + y: 425 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 1535 + y: 295 + - x: 1705 + y: 295 + - x: 1705 + y: 465 + - x: 1535 + y: 465 + - x: 1535 + y: 295 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 595 + y: 2135 + - x: 765 + y: 2135 + - x: 765 + y: 2305 + - x: 595 + y: 2305 + - x: 595 + y: 2135 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 175 + y: 425 + - x: 345 + y: 425 + - x: 345 + y: 595 + - x: 175 + y: 595 + - x: 175 + y: 425 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 5610 + y: 365 + - x: 5780 + y: 365 + - x: 5780 + y: 535 + - x: 5610 + y: 535 + - x: 5610 + y: 365 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 1480 + y: 1415 + - x: 1650 + y: 1415 + - x: 1650 + y: 1585 + - x: 1480 + y: 1585 + - x: 1480 + y: 1415 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 670 + y: 1150 + - x: 840 + y: 1150 + - x: 840 + y: 1320 + - x: 670 + y: 1320 + - x: 670 + y: 1150 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 5845 + y: 1075 + - x: 6015 + y: 1075 + - x: 6015 + y: 1245 + - x: 5845 + y: 1245 + - x: 5845 + y: 1075 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 1015 + y: 2215 + - x: 1185 + y: 2215 + - x: 1185 + y: 2385 + - x: 1015 + y: 2385 + - x: 1015 + y: 2215 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 595 + y: 295 + - x: 765 + y: 295 + - x: 765 + y: 465 + - x: 595 + y: 465 + - x: 595 + y: 295 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 1955 + y: 2215 + - x: 2125 + y: 2215 + - x: 2125 + y: 2385 + - x: 1955 + y: 2385 + - x: 1955 + y: 2215 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 6115 + y: 2255 + - x: 6285 + y: 2255 + - x: 6285 + y: 2425 + - x: 6115 + y: 2425 + - x: 6115 + y: 2255 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 1015 + y: 1875 + - x: 1185 + y: 1875 + - x: 1185 + y: 2045 + - x: 1015 + y: 2045 + - x: 1015 + y: 1875 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 1535 + y: 2255 + - x: 1705 + y: 2255 + - x: 1705 + y: 2425 + - x: 1535 + y: 2425 + - x: 1535 + y: 2255 + - GdsBoundary: + layer: 66 + datatype: 44 + xy: + - x: 175 + y: 1875 + - x: 345 + y: 1875 + - x: 345 + y: 2045 + - x: 175 + y: 2045 + - x: 175 + y: 1875 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 1015 + y: 345 + - x: 1200 + y: 345 + - x: 1200 + y: 2465 + - x: 1015 + y: 2465 + - x: 1015 + y: 345 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 6015 + y: 1325 + - x: 5310 + y: 1325 + - x: 5310 + y: 2335 + - x: 4425 + y: 2335 + - x: 4425 + y: 2165 + - x: 5140 + y: 2165 + - x: 5140 + y: 535 + - x: 4525 + y: 535 + - x: 4525 + y: 365 + - x: 5310 + y: 365 + - x: 5310 + y: 995 + - x: 6015 + y: 995 + - x: 6015 + y: 1325 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 6935 + y: 1325 + - x: 6375 + y: 1325 + - x: 6375 + y: 2465 + - x: 6035 + y: 2465 + - x: 6035 + y: 1905 + - x: 5480 + y: 1905 + - x: 5480 + y: 1530 + - x: 6185 + y: 1530 + - x: 6185 + y: 825 + - x: 6055 + y: 825 + - x: 6055 + y: 300 + - x: 6385 + y: 300 + - x: 6385 + y: 995 + - x: 6935 + y: 995 + - x: 6935 + y: 1325 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 7275 + y: 1575 + - x: 7215 + y: 1575 + - x: 7215 + y: 2420 + - x: 6885 + y: 2420 + - x: 6885 + y: 1495 + - x: 7060 + y: 1495 + - x: 7060 + y: 1445 + - x: 7105 + y: 1445 + - x: 7105 + y: 865 + - x: 7050 + y: 865 + - x: 7050 + y: 825 + - x: 6895 + y: 825 + - x: 6895 + y: 305 + - x: 7225 + y: 305 + - x: 7225 + y: 740 + - x: 7275 + y: 740 + - x: 7275 + y: 1575 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 4970 + y: 1995 + - x: 4650 + y: 1995 + - x: 4650 + y: 1035 + - x: 4505 + y: 1035 + - x: 4505 + y: 705 + - x: 4970 + y: 705 + - x: 4970 + y: 1995 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 1370 + y: 715 + - x: 1650 + y: 715 + - x: 1650 + y: 1665 + - x: 1370 + y: 1665 + - x: 1370 + y: 715 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 90 + y: 975 + - x: 440 + y: 975 + - x: 440 + y: 1625 + - x: 90 + y: 1625 + - x: 90 + y: 975 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 840 + y: 1965 + - x: 345 + y: 1965 + - x: 345 + y: 2465 + - x: 175 + y: 2465 + - x: 175 + y: 1795 + - x: 610 + y: 1795 + - x: 610 + y: 805 + - x: 175 + y: 805 + - x: 175 + y: 345 + - x: 345 + y: 345 + - x: 345 + y: 635 + - x: 840 + y: 635 + - x: 840 + y: 1965 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 7360 + y: 2805 + - x: 0 + y: 2805 + - x: 0 + y: 2635 + - x: 515 + y: 2635 + - x: 515 + y: 2135 + - x: 845 + y: 2135 + - x: 845 + y: 2635 + - x: 1440 + y: 2635 + - x: 1440 + y: 2175 + - x: 1705 + y: 2175 + - x: 1705 + y: 2635 + - x: 3610 + y: 2635 + - x: 3610 + y: 1835 + - x: 3780 + y: 1835 + - x: 3780 + y: 2635 + - x: 5490 + y: 2635 + - x: 5490 + y: 2135 + - x: 5805 + y: 2135 + - x: 5805 + y: 2635 + - x: 6545 + y: 2635 + - x: 6545 + y: 1625 + - x: 6715 + y: 1625 + - x: 6715 + y: 2635 + - x: 7360 + y: 2635 + - x: 7360 + y: 2805 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 7360 + y: 85 + - x: 6725 + y: 85 + - x: 6725 + y: 695 + - x: 6555 + y: 695 + - x: 6555 + y: 85 + - x: 5795 + y: 85 + - x: 5795 + y: 615 + - x: 5585 + y: 615 + - x: 5585 + y: 85 + - x: 3770 + y: 85 + - x: 3770 + y: 585 + - x: 3400 + y: 585 + - x: 3400 + y: 85 + - x: 1705 + y: 85 + - x: 1705 + y: 545 + - x: 1455 + y: 545 + - x: 1455 + y: 85 + - x: 845 + y: 85 + - x: 845 + y: 465 + - x: 515 + y: 465 + - x: 515 + y: 85 + - x: 0 + y: 85 + - x: 0 + y: -85 + - x: 7360 + y: -85 + - x: 7360 + y: 85 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 2210 + y: 535 + - x: 2045 + y: 535 + - x: 2045 + y: 805 + - x: 1990 + y: 805 + - x: 1990 + y: 1910 + - x: 2125 + y: 1910 + - x: 2125 + y: 2465 + - x: 1875 + y: 2465 + - x: 1875 + y: 2040 + - x: 1820 + y: 2040 + - x: 1820 + y: 675 + - x: 1875 + y: 675 + - x: 1875 + y: 365 + - x: 2210 + y: 365 + - x: 2210 + y: 535 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 2160 + y: 1125 + - x: 2400 + y: 1125 + - x: 2400 + y: 1720 + - x: 2160 + y: 1720 + - x: 2160 + y: 1125 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 3100 + y: 2020 + - x: 2570 + y: 2020 + - x: 2570 + y: 955 + - x: 2215 + y: 955 + - x: 2215 + y: 735 + - x: 2740 + y: 735 + - x: 2740 + y: 1655 + - x: 3100 + y: 1655 + - x: 3100 + y: 2020 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 4290 + y: 1245 + - x: 4480 + y: 1245 + - x: 4480 + y: 1965 + - x: 4290 + y: 1965 + - x: 4290 + y: 1245 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 3780 + y: 1575 + - x: 3440 + y: 1575 + - x: 3440 + y: 2360 + - x: 2335 + y: 2360 + - x: 2335 + y: 2190 + - x: 3270 + y: 2190 + - x: 3270 + y: 1485 + - x: 2910 + y: 1485 + - x: 2910 + y: 535 + - x: 2405 + y: 535 + - x: 2405 + y: 365 + - x: 3080 + y: 365 + - x: 3080 + y: 1315 + - x: 3610 + y: 1315 + - x: 3610 + y: 1245 + - x: 3780 + y: 1245 + - x: 3780 + y: 1575 + - GdsBoundary: + layer: 67 + datatype: 20 + xy: + - x: 4355 + y: 535 + - x: 4120 + y: 535 + - x: 4120 + y: 2135 + - x: 4200 + y: 2135 + - x: 4200 + y: 2465 + - x: 3950 + y: 2465 + - x: 3950 + y: 1065 + - x: 3490 + y: 1065 + - x: 3490 + y: 1095 + - x: 3290 + y: 1095 + - x: 3290 + y: 765 + - x: 3950 + y: 765 + - x: 3950 + y: 365 + - x: 4355 + y: 365 + - x: 4355 + y: 535 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 3540 + y: 1065 + - x: 3320 + y: 1065 + - x: 3320 + y: 2615 + - x: 3170 + y: 2615 + - x: 3170 + y: 795 + - x: 3305 + y: 795 + - x: 3305 + y: 105 + - x: 3455 + y: 105 + - x: 3455 + y: 795 + - x: 3540 + y: 795 + - x: 3540 + y: 1065 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 2545 + y: 1005 + - x: 2215 + y: 1005 + - x: 2215 + y: 735 + - x: 2315 + y: 735 + - x: 2315 + y: 105 + - x: 2465 + y: 105 + - x: 2465 + y: 735 + - x: 2545 + y: 735 + - x: 2545 + y: 1005 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 1905 + y: 2615 + - x: 1755 + y: 2615 + - x: 1755 + y: 1665 + - x: 1430 + y: 1665 + - x: 1430 + y: 1335 + - x: 1755 + y: 1335 + - x: 1755 + y: 105 + - x: 1905 + y: 105 + - x: 1905 + y: 2615 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 2960 + y: 1365 + - x: 2445 + y: 1365 + - x: 2445 + y: 1485 + - x: 2330 + y: 1485 + - x: 2330 + y: 2615 + - x: 2180 + y: 2615 + - x: 2180 + y: 1485 + - x: 2115 + y: 1485 + - x: 2115 + y: 1215 + - x: 2810 + y: 1215 + - x: 2810 + y: 105 + - x: 2960 + y: 105 + - x: 2960 + y: 1365 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 2960 + y: 1905 + - x: 2805 + y: 1905 + - x: 2805 + y: 2615 + - x: 2655 + y: 2615 + - x: 2655 + y: 1575 + - x: 2960 + y: 1575 + - x: 2960 + y: 1905 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 5700 + y: 1905 + - x: 5445 + y: 1905 + - x: 5445 + y: 2615 + - x: 5295 + y: 2615 + - x: 5295 + y: 1575 + - x: 5410 + y: 1575 + - x: 5410 + y: 105 + - x: 5560 + y: 105 + - x: 5560 + y: 1575 + - x: 5700 + y: 1575 + - x: 5700 + y: 1905 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 5050 + y: 1875 + - x: 4875 + y: 1875 + - x: 4875 + y: 2615 + - x: 4725 + y: 2615 + - x: 4725 + y: 1875 + - x: 4720 + y: 1875 + - x: 4720 + y: 1605 + - x: 5050 + y: 1605 + - x: 5050 + y: 1875 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 965 + y: 2585 + - x: 815 + y: 2585 + - x: 815 + y: 1370 + - x: 590 + y: 1370 + - x: 590 + y: 1100 + - x: 815 + y: 1100 + - x: 815 + y: 105 + - x: 965 + y: 105 + - x: 965 + y: 2585 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 5085 + y: 1395 + - x: 4510 + y: 1395 + - x: 4510 + y: 1575 + - x: 4455 + y: 1575 + - x: 4455 + y: 2615 + - x: 4305 + y: 2615 + - x: 4305 + y: 1575 + - x: 4240 + y: 1575 + - x: 4240 + y: 1245 + - x: 4935 + y: 1245 + - x: 4935 + y: 105 + - x: 5085 + y: 105 + - x: 5085 + y: 1395 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 545 + y: 880 + - x: 380 + y: 880 + - x: 380 + y: 1590 + - x: 545 + y: 1590 + - x: 545 + y: 2585 + - x: 395 + y: 2585 + - x: 395 + y: 1740 + - x: 230 + y: 1740 + - x: 230 + y: 1325 + - x: 110 + y: 1325 + - x: 110 + y: 995 + - x: 230 + y: 995 + - x: 230 + y: 730 + - x: 395 + y: 730 + - x: 395 + y: 105 + - x: 545 + y: 105 + - x: 545 + y: 880 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 6985 + y: 1325 + - x: 6915 + y: 1325 + - x: 6915 + y: 2615 + - x: 6765 + y: 2615 + - x: 6765 + y: 1325 + - x: 6715 + y: 1325 + - x: 6715 + y: 995 + - x: 6775 + y: 995 + - x: 6775 + y: 105 + - x: 6925 + y: 105 + - x: 6925 + y: 995 + - x: 6985 + y: 995 + - x: 6985 + y: 1325 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 6505 + y: 1325 + - x: 6495 + y: 1325 + - x: 6495 + y: 2615 + - x: 6345 + y: 2615 + - x: 6345 + y: 1325 + - x: 5795 + y: 1325 + - x: 5795 + y: 995 + - x: 6355 + y: 995 + - x: 6355 + y: 105 + - x: 6505 + y: 105 + - x: 6505 + y: 1325 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 4725 + y: 1035 + - x: 4405 + y: 1035 + - x: 4405 + y: 105 + - x: 4555 + y: 105 + - x: 4555 + y: 705 + - x: 4725 + y: 705 + - x: 4725 + y: 1035 + - GdsBoundary: + layer: 66 + datatype: 20 + xy: + - x: 4050 + y: 1100 + - x: 3980 + y: 1100 + - x: 3980 + y: 2615 + - x: 3830 + y: 2615 + - x: 3830 + y: 1545 + - x: 3530 + y: 1545 + - x: 3530 + y: 1275 + - x: 3830 + y: 1275 + - x: 3830 + y: 950 + - x: 3900 + y: 950 + - x: 3900 + y: 105 + - x: 4050 + y: 105 + - x: 4050 + y: 1100 + - GdsBoundary: + layer: 64 + datatype: 20 + xy: + - x: -190 + y: 1305 + - x: 7550 + y: 1305 + - x: 7550 + y: 2910 + - x: -190 + y: 2910 + - x: -190 + y: 1305 + - GdsBoundary: + layer: 95 + datatype: 20 + xy: + - x: 7360 + y: 1345 + - x: 5910 + y: 1345 + - x: 5910 + y: 1925 + - x: 4675 + y: 1925 + - x: 4675 + y: 1595 + - x: 3085 + y: 1595 + - x: 3085 + y: 1925 + - x: 2095 + y: 1925 + - x: 2095 + y: 1685 + - x: 1380 + y: 1685 + - x: 1380 + y: 1420 + - x: 565 + y: 1420 + - x: 565 + y: 1345 + - x: 0 + y: 1345 + - x: 0 + y: 975 + - x: 2195 + y: 975 + - x: 2195 + y: 685 + - x: 2905 + y: 685 + - x: 2905 + y: 745 + - x: 3590 + y: 745 + - x: 3590 + y: 975 + - x: 4320 + y: 975 + - x: 4320 + y: 685 + - x: 4775 + y: 685 + - x: 4775 + y: 795 + - x: 5675 + y: 795 + - x: 5675 + y: 975 + - x: 7360 + y: 975 + - x: 7360 + y: 1345 + - GdsBoundary: + layer: 93 + datatype: 44 + xy: + - x: 0 + y: -190 + - x: 7360 + y: -190 + - x: 7360 + y: 1015 + - x: 0 + y: 1015 + - x: 0 + y: -190 + - GdsBoundary: + layer: 78 + datatype: 44 + xy: + - x: 0 + y: 1250 + - x: 7360 + y: 1250 + - x: 7360 + y: 2720 + - x: 0 + y: 2720 + - x: 0 + y: 1250 + - GdsBoundary: + layer: 81 + datatype: 4 + xy: + - x: 0 + y: 0 + - x: 7360 + y: 0 + - x: 7360 + y: 2720 + - x: 0 + y: 2720 + - x: 0 + y: 0 + - GdsBoundary: + layer: 94 + datatype: 20 + xy: + - x: 7360 + y: 2910 + - x: 0 + y: 2910 + - x: 0 + y: 1685 + - x: 1350 + y: 1685 + - x: 1350 + y: 1935 + - x: 3240 + y: 1935 + - x: 3240 + y: 1605 + - x: 4665 + y: 1605 + - x: 4665 + y: 1935 + - x: 5930 + y: 1935 + - x: 5930 + y: 1355 + - x: 7360 + y: 1355 + - x: 7360 + y: 2910 + - GdsBoundary: + layer: 67 + datatype: 16 + xy: + - x: 145 + y: 1105 + - x: 315 + y: 1105 + - x: 315 + y: 1275 + - x: 145 + y: 1275 + - x: 145 + y: 1105 + - GdsBoundary: + layer: 67 + datatype: 16 + xy: + - x: 1445 + y: 1105 + - x: 1615 + y: 1105 + - x: 1615 + y: 1275 + - x: 1445 + y: 1275 + - x: 1445 + y: 1105 + - GdsBoundary: + layer: 67 + datatype: 16 + xy: + - x: 6950 + y: 425 + - x: 7120 + y: 425 + - x: 7120 + y: 595 + - x: 6950 + y: 595 + - x: 6950 + y: 425 + - GdsTextElem: + string: VPB + layer: 64 + texttype: 5 + xy: + x: 230 + y: 2720 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.1 + - GdsTextElem: + string: VPB + layer: 64 + texttype: 5 + xy: + x: 230 + y: 2720 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.1 + - GdsTextElem: + string: VNB + layer: 64 + texttype: 59 + xy: + x: 230 + y: 0 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.1 + - GdsTextElem: + string: VNB + layer: 64 + texttype: 59 + xy: + x: 230 + y: 0 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.1 + - GdsTextElem: + string: Q + layer: 67 + texttype: 5 + xy: + x: 7035 + y: 510 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.2 + - GdsTextElem: + string: CLK + layer: 67 + texttype: 5 + xy: + x: 230 + y: 1190 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.2 + - GdsTextElem: + string: D + layer: 67 + texttype: 5 + xy: + x: 1535 + y: 1190 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.1 + - GdsTextElem: + string: VPWR + layer: 68 + texttype: 5 + xy: + x: 230 + y: 2720 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.1 + - GdsTextElem: + string: VGND + layer: 68 + texttype: 5 + xy: + x: 230 + y: 0 + presentation: + - 0 + - 5 + strans: + reflected: false + abs_mag: false + abs_angle: false + mag: 0.1 + - GdsBoundary: + layer: 64 + datatype: 16 + xy: + - x: 145 + y: 2635 + - x: 315 + y: 2635 + - x: 315 + y: 2805 + - x: 145 + y: 2805 + - x: 145 + y: 2635 + - GdsBoundary: + layer: 64 + datatype: 16 + xy: + - x: 145 + y: 2635 + - x: 315 + y: 2635 + - x: 315 + y: 2805 + - x: 145 + y: 2805 + - x: 145 + y: 2635 + - GdsBoundary: + layer: 122 + datatype: 16 + xy: + - x: 145 + y: -85 + - x: 315 + y: -85 + - x: 315 + y: 85 + - x: 145 + y: 85 + - x: 145 + y: -85 + - GdsBoundary: + layer: 122 + datatype: 16 + xy: + - x: 145 + y: -85 + - x: 315 + y: -85 + - x: 315 + y: 85 + - x: 145 + y: 85 + - x: 145 + y: -85 + - GdsBoundary: + layer: 68 + datatype: 16 + xy: + - x: 145 + y: 2635 + - x: 315 + y: 2635 + - x: 315 + y: 2805 + - x: 145 + y: 2805 + - x: 145 + y: 2635 + - GdsBoundary: + layer: 68 + datatype: 16 + xy: + - x: 145 + y: -85 + - x: 315 + y: -85 + - x: 315 + y: 85 + - x: 145 + y: 85 + - x: 145 + y: -85 diff --git a/layout21converters/src/gds2ser.rs b/layout21converters/src/gds2ser.rs new file mode 100644 index 0000000..37180f5 --- /dev/null +++ b/layout21converters/src/gds2ser.rs @@ -0,0 +1,194 @@ +//! +//! # GDSII to Alternate Serialization Conversion CLI +//! +//! Converts a [`gds21::GdsLibrary`] to any of the supported alternate serialization formats. +//! + +use clap::Parser; +use layout21utils::SerializationFormat; +use std::error::Error; + +// => The doc-comment on `ProgramOptions` here is displayed by the `clap`-generated help docs => + +/// GDSII to Alternate Serializer Converter +#[derive(Parser)] +pub struct ProgramOptions { + /// GDS Input File + #[clap(short = 'i', long, default_value = "")] + gds: String, + /// Output Format. One of ("json", "yaml", "toml") + #[clap(short = 'f', long, default_value = "")] + fmt: String, + /// Output File + #[clap(short = 'o', long, default_value = "")] + out: String, + /// Verbose Output Mode + #[clap(short, long)] + verbose: bool, +} + +pub fn main() -> Result<(), Box> { + let options = ProgramOptions::parse(); + _main(&options) +} + +/// Parse the `fmt` string into a [`SerializationFormat`]. +/// FIXME: make this a [`FromStr`] impl for [`SerializationFormat`] instead. +fn parse_format(format: &str) -> Result> { + match format { + "json" => Ok(SerializationFormat::Json), + "yaml" => Ok(SerializationFormat::Yaml), + "toml" => Err(format!("TOML is not yet supported, see https://github.com/dan-fritchman/Layout21/issues/33").into()), + _ => Err(format!("Invalid format: {}. Must be one of (json, yaml, toml).", format).into()), + } +} + +pub fn _main(options: &ProgramOptions) -> Result<(), Box> { + // Load GDS to [GdsLibrary] + let gds_library = match gds21::GdsLibrary::load(&options.gds) { + Err(err) => panic!("Couldn't interpret GDS data: {}", err), + Ok(lib) => lib, + }; + + if options.verbose { + let gds_stats = gds_library.stats(); + println!("{:?}", gds_stats); + } + + // Save to the target format + let fmt: SerializationFormat = parse_format(&options.fmt)?; + match fmt.save(&gds_library, &options.out){ + Err(err) => panic!("Could not save output file: {}", err), + Ok(_) => {}, + }; + + if options.verbose { + println!("wrote {:?}", &options.out); + } + + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + // Run the golden-file test for format (string) `fmtstr` + fn test_fmt(fmtstr: &str) { + // The golden file was created by running the program: + // $ cargo run --bin gds2ser -- \ + // -i resources/sky130_fd_sc_hd__dfxtp_1.gds \ + // -o resources/sky130_fd_sc_hd__dfxtp_1.golden.json \ + // -f json + let golden_input_path = resource("sky130_fd_sc_hd__dfxtp_1.gds"); + let golden_output_path = resource(&format!("sky130_fd_sc_hd__dfxtp_1.golden.{}", fmtstr)); + let golden_bytes = match std::fs::read(&golden_output_path) { + Ok(bytes) => bytes, + Err(_err) => panic!("Could not read golden output file"), + }; + let output_path = resource(&format!("sky130_fd_sc_hd__dfxtp_1.test_output.{}", fmtstr)); + + let options = ProgramOptions { + gds: golden_input_path, + out: output_path.clone(), + fmt: fmtstr.to_string(), + verbose: true, + }; + + // Run the main function, producing file `output_path` + let result = _main(&options); + + // Closure to over-write the golden content. Un-comment to update the golden file. + // let write_golden = || { + // // Read back the newly-written data + // use layout21protos::ProtoFile; + // let conv_lib = layout21protos::Library::open(&output_path).unwrap(); + + // // Save it to disk in proto-binary format + // conv_lib.save(&golden_output_path).unwrap(); + + // // And store a YAML version of it for a bit easier reading & comparison + // use layout21utils::SerializationFormat::Yaml; + // Yaml.save(&conv_lib, &resource("sky130_fd_sc_hd__dfxtp_1.pb.yaml")) + // .unwrap(); + // }; + // write_golden(); + + // Check that `_main` succeeded, and compare the binary data it wrote to disk. + assert!(result.is_ok()); + let bytes = match std::fs::read(&output_path) { + Ok(bytes) => bytes, + Err(_err) => panic!("Could not read test output file"), + }; + assert_eq!(golden_bytes, bytes); + } + + #[test] + fn golden_json(){ + test_fmt("json"); + } + #[test] + fn golden_yaml(){ + test_fmt("yaml"); + } + #[test] + #[ignore] // https://github.com/dan-fritchman/Layout21/issues/33 + fn golden_toml(){ + test_fmt("toml"); + } + + #[test] + fn roundtrip_to_golden_file() { + // The golden file was created by running the program: + // $ cargo run --bin gds2ser -- \ + // -i resources/sky130_fd_sc_hd__dfxtp_1.gds \ + // -o resources/sky130_fd_sc_hd__dfxtp_1.golden.json \ + // -f json + let golden_input_path = resource("sky130_fd_sc_hd__dfxtp_1.gds"); + let golden_output_path = resource("sky130_fd_sc_hd__dfxtp_1.golden.json"); + let golden_bytes = match std::fs::read(&golden_output_path) { + Ok(bytes) => bytes, + Err(_err) => panic!("Could not read golden output file"), + }; + let output_path = resource("sky130_fd_sc_hd__dfxtp_1.test_output.json"); + + let options = ProgramOptions { + gds: golden_input_path, + out: output_path.clone(), + fmt: "json".to_string(), + verbose: true, + }; + + // Run the main function, producing file `output_path` + let result = _main(&options); + + // Closure to over-write the golden content. Un-comment to update the golden file. + // let write_golden = || { + // // Read back the newly-written data + // use layout21protos::ProtoFile; + // let conv_lib = layout21protos::Library::open(&output_path).unwrap(); + + // // Save it to disk in proto-binary format + // conv_lib.save(&golden_output_path).unwrap(); + + // // And store a YAML version of it for a bit easier reading & comparison + // use layout21utils::SerializationFormat::Yaml; + // Yaml.save(&conv_lib, &resource("sky130_fd_sc_hd__dfxtp_1.pb.yaml")) + // .unwrap(); + // }; + // write_golden(); + + // Check that `_main` succeeded, and compare the binary data it wrote to disk. + assert!(result.is_ok()); + let bytes = match std::fs::read(&output_path) { + Ok(bytes) => bytes, + Err(_err) => panic!("Could not read test output file"), + }; + assert_eq!(golden_bytes, bytes); + } + + /// Grab the full path of resource-file `fname` + fn resource(rname: &str) -> String { + format!("{}/resources/{}", env!("CARGO_MANIFEST_DIR"), rname) + } +} diff --git a/layout21converters/src/gds_serialization.rs b/layout21converters/src/gds_serialization.rs new file mode 100644 index 0000000..c73bf58 --- /dev/null +++ b/layout21converters/src/gds_serialization.rs @@ -0,0 +1,2 @@ + +// FIXME: make this the shared part of Gds21 (De)Serialization CLIs diff --git a/layout21converters/src/lib.rs b/layout21converters/src/lib.rs new file mode 100644 index 0000000..efcaf42 --- /dev/null +++ b/layout21converters/src/lib.rs @@ -0,0 +1 @@ +mod gds_serialization; \ No newline at end of file diff --git a/lef21/src/tests.rs b/lef21/src/tests.rs index 9d63db3..a326cf5 100644 --- a/lef21/src/tests.rs +++ b/lef21/src/tests.rs @@ -1,6 +1,8 @@ -use super::read::{parse_str, LefLexer, LefParser, Token}; use super::*; +use super::read::{parse_str, LefLexer, LefParser, Token}; use std::path::Path; +use crate::utils::SerializationFormat::{Yaml, Json, Toml}; + #[test] fn test_points() -> LefResult<()> { @@ -93,12 +95,24 @@ fn it_parses_lib2() -> LefResult<()> { Ok(()) } +#[test] +fn empty_lib_to_yaml() { + Yaml.save(&LefLibrary::new(), &resource("empty_lib.lef.yaml")).unwrap(); +} +#[test] +fn empty_lib_to_json() { + Json.save(&LefLibrary::new(), &resource("empty_lib.lef.json")).unwrap(); +} +#[test] +fn empty_lib_to_toml() { + Toml.save(&LefLibrary::new(), &resource("empty_lib.lef.toml")).unwrap(); +} + /// Helper function: Assert that `data` equals the content in YAML file `fname` fn check_yaml(data: &T, fname: impl AsRef) where T: Eq + std::fmt::Debug + serde::de::DeserializeOwned, { - use crate::utils::SerializationFormat::Yaml; let golden: T = Yaml.open(fname).unwrap(); assert_eq!(*data, golden); }