Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LibrePDK
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Generator tools
LibrePDK
Commits
d4e591cc
Commit
d4e591cc
authored
2 years ago
by
David Lanzendörfer
Browse files
Options
Downloads
Patches
Plain Diff
Fixing configuration class
parent
3e19487e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config.py
+22
-13
22 additions, 13 deletions
config.py
with
22 additions
and
13 deletions
config.py
+
22
−
13
View file @
d4e591cc
...
...
@@ -6,10 +6,15 @@ from lclayout.tech_util import load_tech_file
import
pint
class
Config
:
cfgname
=
None
confname
=
None
tech_data
=
None
def
__init__
(
self
,
process
):
self
.
ureg
=
pint
.
UnitRegistry
()
self
.
ureg
.
autoconvert_offset_to_baseunit
=
True
self
.
confname
=
process
self
.
tech_data
=
load_tech_file
(
process
)
def
get_process_name
(
self
):
return
self
.
tech_data
.
name
if
hasattr
(
self
.
tech_data
,
"
name
"
)
else
"
UNDEF
"
...
...
@@ -29,9 +34,24 @@ class Config:
print
(
"
WARNING: No minimum enclosue for
"
,
layer_pair
,
"
defined!
"
)
else
:
print
(
"
WARNING: No minimum_enclosure defined!
"
)
return
w
def
get_abutment_box
(
self
):
r
=
(
0
,
0
)
if
hasattr
(
self
.
tech_data
,
"
my_abutment_box
"
):
r
=
self
.
tech_data
.
my_abutment_box
else
:
print
(
"
WARNING: No abutment box defined!
"
)
return
r
def
get_outline
(
self
):
r
=
(
0
,
0
)
if
hasattr
(
self
.
tech_data
,
"
my_outline
"
):
r
=
self
.
tech_data
.
my_outline
else
:
print
(
"
WARNING: No outline defined!
"
)
return
r
def
get_min_spacing
(
self
,
layer_pair
):
w
=
None
if
hasattr
(
self
.
tech_data
,
"
min_spacing
"
):
...
...
@@ -107,14 +127,3 @@ class Config:
print
(
"
WARNING: weights_vertical not defined!
"
)
return
(
x
,
y
)
def
__init__
(
self
,
name
,
cfgname
):
if
not
os
.
path
.
exists
(
cfgname
):
raise
Exception
(
cfgname
+
"
does not exist!
"
)
self
.
ureg
=
pint
.
UnitRegistry
()
self
.
ureg
.
autoconvert_offset_to_baseunit
=
True
self
.
confname
=
name
self
.
tech_data
=
load_tech_file
(
name
)
self
.
cfgname
=
cfgname
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment