Skip to content
Snippets Groups Projects
Commit b2fa3035 authored by David Lanzendörfer's avatar David Lanzendörfer
Browse files

Adding electrical specs

Initial file creation
parent 12ed329a
No related branches found
No related tags found
No related merge requests found
......@@ -13,23 +13,34 @@ import librepdk.technologies
class Config:
confname = None
tech_data = None
electric_data = None
def __init__(self, process):
self.ureg = pint.UnitRegistry()
self.ureg.autoconvert_offset_to_baseunit = True
self.process = process
tech_subdir=os.path.join("librepdk","technologies","*.tech.*")
files=[]
techfile_filter=os.path.join("librepdk","technologies","*.tech.*")
electric_filter=os.path.join("librepdk","technologies","*.electric.*")
techfiles=[]
electricfiles=[]
for path in sys.path:
files+=glob(os.path.join(path,tech_subdir))
techfiles+=glob(os.path.join(path,techfile_filter))
electricfiles+=glob(os.path.join(path,electric_filter))
# find technology files
technologies = []
for i, file in enumerate(files):
for i, file in enumerate(techfiles):
module = SourceFileLoader(str(i), file).load_module()
technologies.append(module.name)
if module.name == process:
self.tech_data = load_tech_file(file)
# find electric specs
for i, file in enumerate(electricfiles):
module = SourceFileLoader(str(i), file).load_module()
if module.name == process:
self.electric_data = module
if process not in technologies:
message = "Invalid technology: "+process+"!\nValid technologies are: \n"
for i, t in enumerate(technologies):
......
# All known electrical characteristics for SKY130
name = "SKY130"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment