From 57975802732e69b51adf6fd2c1f16ac28b6cd736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Aguil=C3=B3=20Dom=C3=ADnguez?= Date: Wed, 26 Jun 2024 11:25:35 +0200 Subject: [PATCH 1/4] Solved compilation issues due to changes in lef21, modified reference files so that tests pass --- .../resources/macro.golden.yaml | 1 + layout21converters/resources/macro.yaml | 1 + layout21raw/src/lef.rs | 4 +- lef21/resources/geoms1.yaml | 16 +++- lef21/resources/lef21.schema.json | 85 ++++++++++++------- lef21/resources/lib2.yaml | 1 + 6 files changed, 75 insertions(+), 33 deletions(-) diff --git a/layout21converters/resources/macro.golden.yaml b/layout21converters/resources/macro.golden.yaml index 51acae8..ae6a905 100644 --- a/layout21converters/resources/macro.golden.yaml +++ b/layout21converters/resources/macro.golden.yaml @@ -9,6 +9,7 @@ macros: geometries: - Shape: Rect: + - ~ - x: "88.4" y: "0.0" - x: "88.78" diff --git a/layout21converters/resources/macro.yaml b/layout21converters/resources/macro.yaml index 51acae8..ae6a905 100644 --- a/layout21converters/resources/macro.yaml +++ b/layout21converters/resources/macro.yaml @@ -9,6 +9,7 @@ macros: geometries: - Shape: Rect: + - ~ - x: "88.4" y: "0.0" - x: "88.78" diff --git a/layout21raw/src/lef.rs b/layout21raw/src/lef.rs index 1fce12b..30ec8a3 100644 --- a/layout21raw/src/lef.rs +++ b/layout21raw/src/lef.rs @@ -133,7 +133,7 @@ impl<'lib> LefExporter<'lib> { // Conver to a [LefShape] let inner: lef21::LefShape = match shape { Shape::Rect(ref r) => { - lef21::LefShape::Rect(self.export_point(&r.p0)?, self.export_point(&r.p1)?) + lef21::LefShape::Rect(None, self.export_point(&r.p0)?, self.export_point(&r.p1)?) } Shape::Polygon(ref poly) => { let points = poly @@ -379,7 +379,7 @@ impl LefImporter { ) -> LayoutResult { use lef21::LefShape::{Path, Polygon, Rect}; match lefshape { - Rect(ref p0, ref p1) => self.import_rect((p0, p1)), + Rect(_, ref p0, ref p1) => self.import_rect((p0, p1)), Polygon(ref pts) => self.import_polygon(pts), Path(ref pts) => self.import_path(pts, layer), } diff --git a/lef21/resources/geoms1.yaml b/lef21/resources/geoms1.yaml index 87321f4..4d01f46 100644 --- a/lef21/resources/geoms1.yaml +++ b/lef21/resources/geoms1.yaml @@ -2,57 +2,71 @@ layer_name: some_layers_name geometries: - Shape: - Rect: [["1.065000", "1.075000"], ["1.705000", "1.325000"]] + Rect: + - ~ + - - "1.065000" + - "1.075000" + - - "1.705000" + - "1.325000" - Shape: Rect: + - ~ - - "1.495000" - "0.615000" - - "3.335000" - "0.785000" - Shape: Rect: + - ~ - - "1.495000" - "0.785000" - - "1.705000" - "1.075000" - Shape: Rect: + - ~ - - "1.495000" - "1.325000" - - "1.705000" - "1.495000" - Shape: Rect: + - ~ - - "1.495000" - "1.495000" - - "1.785000" - "2.465000" - Shape: Rect: + - ~ - - "2.180000" - "0.255000" - - "2.420000" - "0.615000" - Shape: Rect: + - ~ - - "3.070000" - "1.915000" - - "4.515000" - "2.085000" - Shape: Rect: + - ~ - - "3.070000" - "2.085000" - - "3.400000" - "2.465000" - Shape: Rect: + - ~ - - "3.090000" - "0.255000" - - "3.335000" - "0.615000" - Shape: Rect: + - ~ - - "4.090000" - "2.085000" - - "4.515000" diff --git a/lef21/resources/lef21.schema.json b/lef21/resources/lef21.schema.json index 50247fe..0d9c898 100644 --- a/lef21/resources/lef21.schema.json +++ b/lef21/resources/lef21.schema.json @@ -170,7 +170,7 @@ "writeOnly": true, "anyOf": [ { - "$ref": "#/definitions/Unsupported" + "$ref": "#/definitions/LefOnOff" }, { "type": "null" @@ -180,9 +180,10 @@ "version": { "description": "Lef Spec Version", "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, "via_rule_generators": { "description": "Via Rules Generators", @@ -540,9 +541,10 @@ }, "width": { "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" } } }, @@ -557,7 +559,8 @@ ], "properties": { "Spacing": { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" } }, "additionalProperties": false @@ -569,7 +572,8 @@ ], "properties": { "DesignRuleWidth": { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" } }, "additionalProperties": false @@ -698,10 +702,12 @@ ], "items": [ { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" } ], "maxItems": 2, @@ -1083,7 +1089,8 @@ ] }, "val": { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" } } }, @@ -1197,10 +1204,12 @@ ], "properties": { "x": { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, "y": { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" } } }, @@ -1268,6 +1277,13 @@ "Rect": { "type": "array", "items": [ + { + "type": [ + "string", + "null" + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" + }, { "$ref": "#/definitions/LefPoint" }, @@ -1275,8 +1291,8 @@ "$ref": "#/definitions/LefPoint" } ], - "maxItems": 2, - "minItems": 2 + "maxItems": 3, + "minItems": 3 } }, "additionalProperties": false @@ -1352,10 +1368,12 @@ "type": "array", "items": [ { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, { - "type": "number" + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" } ], "maxItems": 2, @@ -1425,15 +1443,17 @@ "properties": { "capacitance_pf": { "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, "current_ma": { "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, "database_microns": { "description": "Database Distance Units per Micron Defaults to 100, i.e. 1 DBU = 10nm", @@ -1448,33 +1468,38 @@ }, "frequency_mhz": { "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, "power_mw": { "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, "resistance_ohms": { "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, "time_ns": { "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" }, "voltage_volts": { "type": [ - "number", + "string", "null" - ] + ], + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" } } }, diff --git a/lef21/resources/lib2.yaml b/lef21/resources/lib2.yaml index 624dac3..4be7511 100644 --- a/lef21/resources/lib2.yaml +++ b/lef21/resources/lib2.yaml @@ -10,6 +10,7 @@ macros: geometries: - Shape: Rect: + - ~ - - "88.4" - "0.0" - - "88.78" From 636cf82b3cabfda8e1e4bed1a7cf6db7d0bf4ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Aguil=C3=B3=20Dom=C3=ADnguez?= Date: Wed, 26 Jun 2024 13:04:15 +0200 Subject: [PATCH 2/4] Added masks in geometry test and USEMINSPACING in lib test --- lef21/resources/geoms1.yaml | 222 ++++++++++++++++++++++++------ lef21/resources/lef21.schema.json | 27 +++- lef21/resources/lib2.yaml | 12 +- lef21/src/data.rs | 34 ++++- lef21/src/read.rs | 2 +- lef21/src/tests.rs | 35 ++++- 6 files changed, 272 insertions(+), 60 deletions(-) diff --git a/lef21/resources/geoms1.yaml b/lef21/resources/geoms1.yaml index 4d01f46..734fcd6 100644 --- a/lef21/resources/geoms1.yaml +++ b/lef21/resources/geoms1.yaml @@ -3,71 +3,211 @@ layer_name: some_layers_name geometries: - Shape: Rect: - - ~ - - - "1.065000" - - "1.075000" - - - "1.705000" - - "1.325000" + - ~ + - x: "1.065000" + y: "1.075000" + - x: "1.705000" + y: "1.325000" - Shape: Rect: - ~ - - - "1.495000" - - "0.615000" - - - "3.335000" - - "0.785000" + - x: "1.495000" + y: "0.615000" + - x: "3.335000" + y: "0.785000" - Shape: Rect: - ~ - - - "1.495000" - - "0.785000" - - - "1.705000" - - "1.075000" + - x: "1.495000" + y: "0.785000" + - x: "1.705000" + y: "1.075000" - Shape: Rect: - ~ - - - "1.495000" - - "1.325000" - - - "1.705000" - - "1.495000" + - x: "1.495000" + y: "1.325000" + - x: "1.705000" + y: "1.495000" - Shape: Rect: - ~ - - - "1.495000" - - "1.495000" - - - "1.785000" - - "2.465000" + - x: "1.495000" + y: "1.495000" + - x: "1.785000" + y: "2.465000" - Shape: Rect: - ~ - - - "2.180000" - - "0.255000" - - - "2.420000" - - "0.615000" + - x: "2.180000" + y: "0.255000" + - x: "2.420000" + y: "0.615000" - Shape: Rect: - ~ - - - "3.070000" - - "1.915000" - - - "4.515000" - - "2.085000" + - x: "3.070000" + y: "1.915000" + - x: "4.515000" + y: "2.085000" - Shape: Rect: - ~ - - - "3.070000" - - "2.085000" - - - "3.400000" - - "2.465000" + - x: "3.070000" + y: "2.085000" + - x: "3.400000" + y: "2.465000" - Shape: Rect: - ~ - - - "3.090000" - - "0.255000" - - - "3.335000" - - "0.615000" + - x: "3.090000" + y: "0.255000" + - x: "3.335000" + y: "0.615000" - Shape: Rect: - ~ - - - "4.090000" - - "2.085000" - - - "4.515000" - - "2.465000" + - x: "4.090000" + y: "2.085000" + - x: "4.515000" + y: "2.465000" + - Shape: + Rect: + - mask: "1" + - x: "1.065000" + y: "1.075000" + - x: "1.705000" + y: "1.325000" + - Shape: + Rect: + - mask: "1" + - x: "1.495000" + y: "0.615000" + - x: "3.335000" + y: "0.785000" + - Shape: + Rect: + - mask: "1" + - x: "1.495000" + y: "0.785000" + - x: "1.705000" + y: "1.075000" + - Shape: + Rect: + - mask: "1" + - x: "1.495000" + y: "1.325000" + - x: "1.705000" + y: "1.495000" + - Shape: + Rect: + - mask: "1" + - x: "1.495000" + y: "1.495000" + - x: "1.785000" + y: "2.465000" + - Shape: + Rect: + - mask: "1" + - x: "2.180000" + y: "0.255000" + - x: "2.420000" + y: "0.615000" + - Shape: + Rect: + - mask: "1" + - x: "3.070000" + y: "1.915000" + - x: "4.515000" + y: "2.085000" + - Shape: + Rect: + - mask: "1" + - x: "3.070000" + y: "2.085000" + - x: "3.400000" + y: "2.465000" + - Shape: + Rect: + - mask: "1" + - x: "3.090000" + y: "0.255000" + - x: "3.335000" + y: "0.615000" + - Shape: + Rect: + - mask: "1" + - x: "4.090000" + y: "2.085000" + - x: "4.515000" + y: "2.465000" + - Shape: + Rect: + - mask: "2" + - x: "1.065000" + y: "1.075000" + - x: "1.705000" + y: "1.325000" + - Shape: + Rect: + - mask: "2" + - x: "1.495000" + y: "0.615000" + - x: "3.335000" + y: "0.785000" + - Shape: + Rect: + - mask: "2" + - x: "1.495000" + y: "0.785000" + - x: "1.705000" + y: "1.075000" + - Shape: + Rect: + - mask: "2" + - x: "1.495000" + y: "1.325000" + - x: "1.705000" + y: "1.495000" + - Shape: + Rect: + - mask: "2" + - x: "1.495000" + y: "1.495000" + - x: "1.785000" + y: "2.465000" + - Shape: + Rect: + - mask: "2" + - x: "2.180000" + y: "0.255000" + - x: "2.420000" + y: "0.615000" + - Shape: + Rect: + - mask: "2" + - x: "3.070000" + y: "1.915000" + - x: "4.515000" + y: "2.085000" + - Shape: + Rect: + - mask: "2" + - x: "3.070000" + y: "2.085000" + - x: "3.400000" + y: "2.465000" + - Shape: + Rect: + - mask: "2" + - x: "3.090000" + y: "0.255000" + - x: "3.335000" + y: "0.615000" + - Shape: + Rect: + - mask: "2" + - x: "4.090000" + y: "2.085000" + - x: "4.515000" + y: "2.465000" diff --git a/lef21/resources/lef21.schema.json b/lef21/resources/lef21.schema.json index 0d9c898..6c1290f 100644 --- a/lef21/resources/lef21.schema.json +++ b/lef21/resources/lef21.schema.json @@ -859,6 +859,20 @@ } ] }, + "LefMask": { + "title": "Mask value", + "description": "Specifies which mask from double- or triple-patterning to use for this shape. Supports common mathematical operations (Add, Sub, increment, etc.).", + "type": "object", + "required": [ + "mask" + ], + "properties": { + "mask": { + "type": "string", + "pattern": "^-?[0-9]+(\\.[0-9]+)?$" + } + } + }, "LefOnOff": { "description": "Binary On/Off Settings, Denoted by `ON` and `OFF`", "oneOf": [ @@ -1278,11 +1292,14 @@ "type": "array", "items": [ { - "type": [ - "string", - "null" - ], - "pattern": "^-?[0-9]+(\\.[0-9]+)?$" + "anyOf": [ + { + "$ref": "#/definitions/LefMask" + }, + { + "type": "null" + } + ] }, { "$ref": "#/definitions/LefPoint" diff --git a/lef21/resources/lib2.yaml b/lef21/resources/lib2.yaml index 4be7511..2245a85 100644 --- a/lef21/resources/lib2.yaml +++ b/lef21/resources/lib2.yaml @@ -1,5 +1,4 @@ --- -version: "5.4" macros: - name: macro_name pins: @@ -11,11 +10,10 @@ macros: - Shape: Rect: - ~ - - - "88.4" - - "0.0" - - - "88.78" - - "1.06" - class: ~ + - x: "88.4" + y: "0.0" + - x: "88.78" + y: "1.06" direction: Input class: Block: @@ -27,5 +25,7 @@ macros: - X - Y - R90 +version: "5.4" +use_min_spacing: "Off" units: database_microns: 2000 diff --git a/lef21/src/data.rs b/lef21/src/data.rs index f9afdd9..824587c 100644 --- a/lef21/src/data.rs +++ b/lef21/src/data.rs @@ -426,7 +426,7 @@ pub enum LefGeometry { /// rectangles, polygons, and paths. #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq, Eq)] pub enum LefShape { - Rect(Option, LefPoint, LefPoint), + Rect(Option, LefPoint, LefPoint), Polygon(Vec), Path(Vec), } @@ -466,6 +466,38 @@ impl std::fmt::Display for LefPoint { write!(f, "{} {}", self.x, self.y) } } +/// # Mask value +/// +/// Specifies which mask from double- or triple-patterning to use for this shape. +/// Supports common mathematical operations (Add, Sub, increment, etc.). +#[derive( + Clone, + Default, + Debug, + Deserialize, + Serialize, + JsonSchema, + PartialEq, + Eq, + Add, + AddAssign, + Sub, + SubAssign, +)] +pub struct LefMask { + pub mask: LefDecimal, +} +impl LefMask { + /// Create a new [LefMask] + pub fn new(mask: impl Into) -> Self { + Self { mask: mask.into() } + } +} +impl std::fmt::Display for LefMask { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!(f, "{}", self.mask) + } +} /// # Lef Distance Units per Micron /// /// A constrained numeric type. Allowed values of [LefDbuPerMicron] are: diff --git a/lef21/src/read.rs b/lef21/src/read.rs index 04054df..8425e1b 100644 --- a/lef21/src/read.rs +++ b/lef21/src/read.rs @@ -840,7 +840,7 @@ impl<'src> LefParser<'src> { let mut mask = None; if self.matches(TokenType::Name) { if self.get_key()? == LefKey::Mask { - mask = Some(self.parse_number()?); + mask = Some(LefMask::new(self.parse_number()?)); } else { // The ITERATE construction would go here, but is not supported. self.fail(LefParseErrorType::Unsupported)?; diff --git a/lef21/src/tests.rs b/lef21/src/tests.rs index 7e010d6..40cd4f5 100644 --- a/lef21/src/tests.rs +++ b/lef21/src/tests.rs @@ -1,8 +1,7 @@ -use super::*; use super::read::{parse_str, LefLexer, LefParser, Token}; +use super::*; +use crate::utils::SerializationFormat::{Json, Toml, Yaml}; use std::path::Path; -use crate::utils::SerializationFormat::{Yaml, Json, Toml}; - #[test] fn test_points() -> LefResult<()> { @@ -62,6 +61,26 @@ fn it_parses_layer_geoms1() -> LefResult<()> { RECT 3.070000 2.085000 3.400000 2.465000 ; RECT 3.090000 0.255000 3.335000 0.615000 ; RECT 4.090000 2.085000 4.515000 2.465000 ; + RECT MASK 1 1.065000 1.075000 1.705000 1.325000 ; + RECT MASK 1 1.495000 0.615000 3.335000 0.785000 ; + RECT MASK 1 1.495000 0.785000 1.705000 1.075000 ; + RECT MASK 1 1.495000 1.325000 1.705000 1.495000 ; + RECT MASK 1 1.495000 1.495000 1.785000 2.465000 ; + RECT MASK 1 2.180000 0.255000 2.420000 0.615000 ; + RECT MASK 1 3.070000 1.915000 4.515000 2.085000 ; + RECT MASK 1 3.070000 2.085000 3.400000 2.465000 ; + RECT MASK 1 3.090000 0.255000 3.335000 0.615000 ; + RECT MASK 1 4.090000 2.085000 4.515000 2.465000 ; + RECT MASK 2 1.065000 1.075000 1.705000 1.325000 ; + RECT MASK 2 1.495000 0.615000 3.335000 0.785000 ; + RECT MASK 2 1.495000 0.785000 1.705000 1.075000 ; + RECT MASK 2 1.495000 1.325000 1.705000 1.495000 ; + RECT MASK 2 1.495000 1.495000 1.785000 2.465000 ; + RECT MASK 2 2.180000 0.255000 2.420000 0.615000 ; + RECT MASK 2 3.070000 1.915000 4.515000 2.085000 ; + RECT MASK 2 3.070000 2.085000 3.400000 2.465000 ; + RECT MASK 2 3.090000 0.255000 3.335000 0.615000 ; + RECT MASK 2 4.090000 2.085000 4.515000 2.465000 ; "#; let mut parser = LefParser::new(src)?; let geoms = parser.parse_layer_geometries()?; @@ -73,6 +92,7 @@ fn it_parses_layer_geoms1() -> LefResult<()> { fn it_parses_lib2() -> LefResult<()> { let src = r#" VERSION 5.4 ; + USEMINSPACING OBS OFF ; UNITS DATABASE MICRONS 2000 ; END UNITS @@ -97,15 +117,18 @@ fn it_parses_lib2() -> LefResult<()> { #[test] fn empty_lib_to_yaml() { - Yaml.save(&LefLibrary::new(), &resource("empty_lib.lef.yaml")).unwrap(); + 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(); + 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(); + Toml.save(&LefLibrary::new(), &resource("empty_lib.lef.toml")) + .unwrap(); } /// Helper function: Assert that `data` equals the content in YAML file `fname` From 7508850c23522317ecad20b78546fe877d63452a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Aguil=C3=B3=20Dom=C3=ADnguez?= Date: Wed, 26 Jun 2024 13:19:37 +0200 Subject: [PATCH 3/4] Added writing of UseMinSpacing on output lef if data is saved as lef --- lef21/src/write.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lef21/src/write.rs b/lef21/src/write.rs index 5fe6566..5ea53e1 100644 --- a/lef21/src/write.rs +++ b/lef21/src/write.rs @@ -53,7 +53,7 @@ impl<'wr> LefWriter<'wr> { fn write_lib(&mut self, lib: &LefLibrary) -> LefResult<()> { use LefKey::{ BusBitChars, DividerChar, End, Library, NamesCaseSensitive, NoWireExtensionAtPin, - Units, Version, + Units, UseMinSpacing, Version, }; if let Some(ref v) = lib.version { // Save a copy in our session-state @@ -85,6 +85,9 @@ impl<'wr> LefWriter<'wr> { if let Some(ref v) = lib.divider_char { self.write_line(format_args_f!("{DividerChar} \"{}\" ; ", v))?; } + if let Some(ref v) = lib.use_min_spacing { + self.write_line(format_args_f!("{UseMinSpacing} \"{}\" ; ", v))?; + } if let Some(ref v) = lib.units { self.write_line(format_args_f!("{Units} "))?; self.indent += 1; From ae66d510fe9048274d4a355aca2f561cb28d60c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Aguil=C3=B3=20Dom=C3=ADnguez?= Date: Wed, 26 Jun 2024 13:38:36 +0200 Subject: [PATCH 4/4] Added missing obs keyword to UseMinSpacing write --- lef21/src/data.rs | 2 +- lef21/src/write.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lef21/src/data.rs b/lef21/src/data.rs index 824587c..0d11326 100644 --- a/lef21/src/data.rs +++ b/lef21/src/data.rs @@ -643,6 +643,7 @@ enumstr!( Spacing: "SPACING", Bump: "BUMP", Mask: "MASK", + UseMinSpacing: "USEMINSPACING", // UNITS Fields Units: "UNITS", @@ -683,7 +684,6 @@ enumstr!( MustJoin: "MUSTJOIN", Property: "PROPERTY", ManufacturingGrid: "MANUFACTURINGGRID", - UseMinSpacing: "USEMINSPACING", ClearanceMeasure: "CLEARANCEMEASURE", PropertyDefinitions: "PROPERTYDEFINITIONS", MaxViaStack: "MAXVIASTACK", diff --git a/lef21/src/write.rs b/lef21/src/write.rs index 5ea53e1..166a578 100644 --- a/lef21/src/write.rs +++ b/lef21/src/write.rs @@ -52,7 +52,7 @@ impl<'wr> LefWriter<'wr> { /// Fields are written in the LEF-recommended order fn write_lib(&mut self, lib: &LefLibrary) -> LefResult<()> { use LefKey::{ - BusBitChars, DividerChar, End, Library, NamesCaseSensitive, NoWireExtensionAtPin, + BusBitChars, DividerChar, End, Library, NamesCaseSensitive, NoWireExtensionAtPin, Obs, Units, UseMinSpacing, Version, }; if let Some(ref v) = lib.version { @@ -86,7 +86,7 @@ impl<'wr> LefWriter<'wr> { self.write_line(format_args_f!("{DividerChar} \"{}\" ; ", v))?; } if let Some(ref v) = lib.use_min_spacing { - self.write_line(format_args_f!("{UseMinSpacing} \"{}\" ; ", v))?; + self.write_line(format_args_f!("{UseMinSpacing} {Obs} {} ; ", v))?; } if let Some(ref v) = lib.units { self.write_line(format_args_f!("{Units} "))?;