mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-08-29 09:30:38 +02:00
Validate tech_name param in compiler/globals.py
We need to pre-validate the tech_name param in the config file or python will comply with a non-very-descriptive message that can confuse the user about where's the problem.
This commit is contained in:
@@ -564,6 +564,12 @@ def import_tech():
|
||||
sys.path.append(tech_path)
|
||||
debug.info(1, "Adding technology path: {}".format(tech_path))
|
||||
|
||||
# Validate tech_name param
|
||||
techname_lower = OPTS.tech_name.lower()
|
||||
if (techname_lower is None) or (techname_lower!="sky130" and techname_lower!="scn3m_subm" and techname_lower!="scn4m_subm") :
|
||||
debug.error("tech_name in config file should be sky130|scn3m_subm|scn4m_subm")
|
||||
quit()
|
||||
|
||||
# Import the tech
|
||||
try:
|
||||
tech_mod = __import__(OPTS.tech_name)
|
||||
|
||||
Reference in New Issue
Block a user