Skip to content
Snippets Groups Projects
Commit c3168e52 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Try hdl.libs.change_key_in_dict_file(p, key, new_value) in mode=1 option.

parent 705e924f
No related branches found
No related tags found
No related merge requests found
......@@ -186,6 +186,12 @@ class HdlConfig:
return tech_dict
if __name__ == '__main__':
# Mode
# 0 = Read dictionary info from all HDL tool and library configuration files and derive the compile order
# 1 = Change a key value in all hdllib.cfg dict files
mode = 0
if mode==0:
# Read the dictionary info from all HDL tool and library configuration files in the current directory and the sub directories
libRootDir = 'RADIOHDL'
#libRootDir = 'UNB'
......@@ -236,3 +242,11 @@ if __name__ == '__main__':
print 'derive_lib_order = ', hdl.derive_lib_order(hdl.derive_all_use_libs('unb_common'))
print 'derive_lib_order = ', hdl.derive_lib_order(hdl.derive_all_use_libs('unb_minimal'))
if mode==1:
key = 'build_synth_dir'
new_value = '$HDL_BUILD_DIR'
# Read the dictionary info from all HDL tool and library configuration files in the current directory and the sub directories
libRootDir = 'RADIOHDL'
hdl = HdlConfig(libRootDir=os.environ[libRootDir], toolRootDir=os.path.expandvars('$RADIOHDL/tools'), libFileName='hdllib.cfg', toolFileName='hdltool.cfg')
for p in hdl.libs.filePathNames:
hdl.libs.change_key_in_dict_file(p, key, new_value)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment