Formalizing model tyopes in schema
No point in having free floating formats in a standard!
It's not a standard if you have a choice!
@@ -1620,9 +1620,17 @@ def schema_libs(cfg, lib='default', stackup='default', corner='default'):
"""
}
- cfg['library'][lib]['hdl'] = {}
- cfg['library'][lib]['hdl']['default'] = {
- 'switch': "-library_hdl 'lib format <file>'",
+ modeltypes = ['verilog',
+ 'vhdl',
+ 'systemc',
+ 'iss',
+ 'qemu',
+ 'gem5']
+
+ cfg['library'][lib]['model'] = {}
+ for item in modeltypes:
+ cfg['library'][lib]['model'][item] = {
+ 'switch': f"-library_model_{item} 'lib <file>'",
'require': None,
'type': '[file]',
'lock': 'false',
@@ -1633,34 +1641,12 @@ def schema_libs(cfg, lib='default', stackup='default', corner='default'):
'date': [],
'author': [],
'signature': [],
- 'shorthelp': 'Library HDL models',
+ 'shorthelp': f'Library {item} model',
'example': [
- "cli: -library_hdl 'mylib verilog mylib.v'",
- "api: chip.set('library','mylib','hdl','verilog','mylib.v')"],
+ f"cli: -library_model_{item} 'mylib modelname'",
+ f"api: chip.set('library','mylib','model',{item},'modelname')"],
'help': """
- Library HDL models, specified on a per format basis. Examples
- of legal formats include verilog, vhdl, systemc, c++, python.
- """
- }
-
- cfg['library'][lib]['atpg'] = {
- 'switch': "-library_atpg 'lib <file>'",
- 'require': None,
- 'type': '[file]',
- 'lock': 'false',
- 'copy': 'false',
- 'defvalue': [],
- 'filehash': [],
- 'hashalgo': 'sha256',
- 'date': [],
- 'author': [],
- 'signature': [],
- 'shorthelp': 'Library ATPG models',
- 'example': ["cli: -library_atpg 'mylib mylib.atpg'",
- "api: chip.set('library','mylib','atpg','mylib.atpg')"],
- 'help': """
- Library models used for ATPG based automated fault based post
- manufacturing testing.
+ List of library {item} models.
"""
}
