Skip to content

Commit

Permalink
Merge pull request dan-fritchman#17 from growly/proto2gds
Browse files Browse the repository at this point in the history
proto2gds bin takes protos and makes them gds
  • Loading branch information
dan-fritchman authored Jul 27, 2022
2 parents 404abfb + 56acaa2 commit bffdd01
Show file tree
Hide file tree
Showing 20 changed files with 4,882 additions and 26 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ jobs:
toolchain: stable
override: true

- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install 2to3, protobuf and black
run: pip3 install 2to3 protobuf black

- name: Check out latest Vlsir dependencies
working-directory: layout21protos
run: |
git clone https://github.com/Vlsir/Vlsir.git vlsir
cd vlsir
scripts/build.sh
cd -
- name: Run cargo test
run: cargo test --all --verbose -- --show-output

Expand Down
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

members = [
"gds21",
"gds2proto",
"lef2yaml",
"lef21",
"layout21",
"layout21converters",
"layout21protos",
"layout21raw",
"layout21tetris",
"layout21",
"layout21utils",
"lef21",
]
10 changes: 10 additions & 0 deletions gds21/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,16 @@ impl GdsLibrary {
let mut wr = GdsWriter::new(file);
wr.write_lib(self)
}
pub fn set_all_dates(&mut self, time: &NaiveDateTime) {
let forced_gds_date = GdsDateTimes {
modified: time.clone(),
accessed: time.clone(),
};
self.dates = forced_gds_date.clone();
for gds_struct in &mut self.structs {
gds_struct.dates = forced_gds_date.clone();
}
}
}
// Enable [GdsLibrary] and [GdsStruct] serialization to file, in each of `utils` supported formats.
impl SerdeFile for GdsLibrary {}
Expand Down
25 changes: 23 additions & 2 deletions gds2proto/Cargo.toml → layout21converters/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
description = "Converts GDS files to protocol buffer descriptions, using Layout21, and Gds21."
name = "gds2proto"
description = "Converters to/from Layout21 formats from/to various legacy formats."
name = "layout21converters"
# Shared layout21 attributes
authors = ["Dan Fritchman <[email protected]>", "Arya Reais-Parsi <[email protected]>"]
edition = "2018"
Expand All @@ -10,9 +10,30 @@ version = "0.2.1"
workspace = "../"
exclude = ["resources",]

[[bin]]
name = "gds2proto"
path = "src/gds2proto.rs"
test = true
bench = false

[[bin]]
name = "proto2gds"
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

[dependencies]
gds21 = {path = "../gds21"}
lef21 = {path = "../lef21"}
layout21protos = {path = "../layout21protos"}
layout21raw = {path = "../layout21raw"}
layout21utils = {path = "../layout21utils"}
clap = { version = "3.0.0-beta.5", features = ["derive"] }
chrono = {version = "0.4" }
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bffdd01

Please sign in to comment.