Skip to content

Commit

Permalink
Merge branch 'main' into lef_rw_and_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nanobowers committed Jul 10, 2024
2 parents 39a3db6 + dc82242 commit a916b38
Show file tree
Hide file tree
Showing 10 changed files with 322 additions and 66 deletions.
1 change: 1 addition & 0 deletions layout21converters/resources/macro.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ macros:
geometries:
- Shape:
Rect:
- ~
- x: "88.4"
y: "0.0"
- x: "88.78"
Expand Down
1 change: 1 addition & 0 deletions layout21converters/resources/macro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ macros:
geometries:
- Shape:
Rect:
- ~
- x: "88.4"
y: "0.0"
- x: "88.78"
Expand Down
4 changes: 2 additions & 2 deletions layout21raw/src/lef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -379,7 +379,7 @@ impl LefImporter {
) -> LayoutResult<Shape> {
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),
}
Expand Down
228 changes: 191 additions & 37 deletions lef21/resources/geoms1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,212 @@
layer_name: some_layers_name
geometries:
- Shape:
Rect: [["1.065000", "1.075000"], ["1.705000", "1.325000"]]
Rect:
- ~
- x: "1.065000"
y: "1.075000"
- x: "1.705000"
y: "1.325000"
- Shape:
Rect:
- ~
- x: "1.495000"
y: "0.615000"
- x: "3.335000"
y: "0.785000"
- Shape:
Rect:
- ~
- x: "1.495000"
y: "0.785000"
- x: "1.705000"
y: "1.075000"
- Shape:
Rect:
- ~
- x: "1.495000"
y: "1.325000"
- x: "1.705000"
y: "1.495000"
- Shape:
Rect:
- ~
- x: "1.495000"
y: "1.495000"
- x: "1.785000"
y: "2.465000"
- Shape:
Rect:
- ~
- x: "2.180000"
y: "0.255000"
- x: "2.420000"
y: "0.615000"
- Shape:
Rect:
- ~
- x: "3.070000"
y: "1.915000"
- x: "4.515000"
y: "2.085000"
- Shape:
Rect:
- ~
- x: "3.070000"
y: "2.085000"
- x: "3.400000"
y: "2.465000"
- Shape:
Rect:
- ~
- x: "3.090000"
y: "0.255000"
- x: "3.335000"
y: "0.615000"
- Shape:
Rect:
- ~
- 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:
- - "1.495000"
- "0.615000"
- - "3.335000"
- "0.785000"
- mask: "2"
- x: "1.495000"
y: "0.615000"
- x: "3.335000"
y: "0.785000"
- Shape:
Rect:
- - "1.495000"
- "0.785000"
- - "1.705000"
- "1.075000"
- mask: "2"
- x: "1.495000"
y: "0.785000"
- x: "1.705000"
y: "1.075000"
- Shape:
Rect:
- - "1.495000"
- "1.325000"
- - "1.705000"
- "1.495000"
- mask: "2"
- x: "1.495000"
y: "1.325000"
- x: "1.705000"
y: "1.495000"
- Shape:
Rect:
- - "1.495000"
- "1.495000"
- - "1.785000"
- "2.465000"
- mask: "2"
- x: "1.495000"
y: "1.495000"
- x: "1.785000"
y: "2.465000"
- Shape:
Rect:
- - "2.180000"
- "0.255000"
- - "2.420000"
- "0.615000"
- mask: "2"
- x: "2.180000"
y: "0.255000"
- x: "2.420000"
y: "0.615000"
- Shape:
Rect:
- - "3.070000"
- "1.915000"
- - "4.515000"
- "2.085000"
- mask: "2"
- x: "3.070000"
y: "1.915000"
- x: "4.515000"
y: "2.085000"
- Shape:
Rect:
- - "3.070000"
- "2.085000"
- - "3.400000"
- "2.465000"
- mask: "2"
- x: "3.070000"
y: "2.085000"
- x: "3.400000"
y: "2.465000"
- Shape:
Rect:
- - "3.090000"
- "0.255000"
- - "3.335000"
- "0.615000"
- mask: "2"
- x: "3.090000"
y: "0.255000"
- x: "3.335000"
y: "0.615000"
- Shape:
Rect:
- - "4.090000"
- "2.085000"
- - "4.515000"
- "2.465000"
- mask: "2"
- x: "4.090000"
y: "2.085000"
- x: "4.515000"
y: "2.465000"
30 changes: 27 additions & 3 deletions lef21/resources/lef21.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
"writeOnly": true,
"anyOf": [
{
"$ref": "#/definitions/Unsupported"
"$ref": "#/definitions/LefOnOff"
},
{
"type": "null"
Expand Down Expand Up @@ -846,6 +846,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": [
Expand Down Expand Up @@ -1300,15 +1314,25 @@
"Rect": {
"type": "array",
"items": [
{
"anyOf": [
{
"$ref": "#/definitions/LefMask"
},
{
"type": "null"
}
]
},
{
"$ref": "#/definitions/LefPoint"
},
{
"$ref": "#/definitions/LefPoint"
}
],
"maxItems": 2,
"minItems": 2
"maxItems": 3,
"minItems": 3
}
},
"additionalProperties": false
Expand Down
13 changes: 7 additions & 6 deletions lef21/resources/lib2.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: "5.4"
macros:
- name: macro_name
pins:
Expand All @@ -10,11 +9,11 @@ macros:
geometries:
- 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:
Expand All @@ -26,5 +25,7 @@ macros:
- X
- Y
- R90
version: "5.4"
use_min_spacing: "Off"
units:
database_microns: 2000
Loading

0 comments on commit a916b38

Please sign in to comment.