Skip to content

Commit

Permalink
Merge pull request #49 from DavidAguilo/main
Browse files Browse the repository at this point in the history
Continuation: Made parser capable of handling USEMINSPACING and MASKS in rectangles
  • Loading branch information
dan-fritchman authored Jul 10, 2024
2 parents ef6a881 + a5f8839 commit dc82242
Show file tree
Hide file tree
Showing 10 changed files with 366 additions and 92 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"
Loading

0 comments on commit dc82242

Please sign in to comment.