@donn: After installing openlane 2 and running the spm example I have a config.yaml file in my spm dir but no config.tcl, as shown in your tutorial. Below shows the contents of my spm tutorial.
1. What is the difference between .json and .yaml config files?
2. Is this an issue that I have a config.yaml instead of config.json?
Thanks,
d
donn
10/29/2024, 9:23 AM
Ah, the tutorial is out of date- we switched to YAML a while back. No, they're semantically identical, YAML is just prettier.
d
Diarmuid Collins
10/29/2024, 11:01 AM
Cool. Thanks for clarifying Mohamed.
Diarmuid Collins
11/03/2024, 8:58 AM
@donn: One difference between .json and .yaml is I can insert comments in a .yaml while I cant in .json. This is a nice feature so I would like to just .yaml files.
I have a flow running with a config.json file containing the below line:
"DIE_AREA": "0 0 300 300",
I changed this to the below in my config.yaml file:
DIE_AREA: 0 0 300 300
However, the tool errors out due to:
ERROR Refusing to automatically convert string at 'DIE_AREA' to list
How do I make this conversion? Thanks
d
donn
11/03/2024, 9:07 AM
Declare it as a list: [0, 0, 300, 300]
donn
11/03/2024, 9:08 AM
OpenLane 2 is pretty strongly typed, JSON and Tcl files though do try their best to convert things so backwards compatibility with OpenLane 1 is maintained. Because YAML was never supported by OpenLane 1, it is type-strict by default.
donn
11/03/2024, 5:31 PM
(incidentally, you can opt into type-strictness in JSON by setting
"meta": { "version": 2 }
or opt out of it in YAML by setting
meta: { "version": 2 }
)
d
Diarmuid Collins
11/03/2024, 8:04 PM
Thanks @donn. That works now. So the top level config can be written as a .json or .yaml file in openlane2 but only .json in openlane1. Even tho the top level can be specified as .yaml I see the sub-directories still all use .json files. Understanding things better now! Cheers
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.