[topgen] All RACL configs are relative to the project root#26122
Conversation
matutem
left a comment
There was a problem hiding this comment.
Nice try, but it ends up causing generate_racl to have an extra argument, which becomes a special case in the new topgen. Ideally the racl_config path would start at hw/top_darjeeling, since that requires no additional args: topgen.py has a file scope variable holding the path to repo_top.
|
Previosly, I had |
From repo_top doesn't make sense. This is a file provided in the topgen user's tree, not the topgen tool's tree. Note that those are not necessarily the same root! REPO_TOP is a fine root for tool-provided files (and one of the roots for referenced IPs and IP templates). However, if you have hard-coded in-tree paths for user files in the "new topgen," expect changes requested on that PR. 😄 |
|
I noticed you already place some racl hjson files under hw / top_darjeeling / data / racl. Could we assume that path and just have a file naming convention? Internally we deduce that from path to the top config hjson file. |
So, to elaborate on the suggestion from @matutem , it might look like this: - racl_config: 'racl/racl.hjson'
+ racl_config: 'racl' # Points to a file located at <toplevel.hjson dir>/racl/<racl_config>.hjson
...
- racl_mappings: {
- soc: 'racl/all_rd_wr_mapping.hjson'
- }
+ racl_mappings: {
+ soc: 'all_rd_wr_mapping' # Points to a file located at <toplevel.hjson dir>/racl/<racl_mappings>.hjson
+ }I don't have a particular opinion for whether to use names (which would be like the current approach with xbar) or direct file paths in toplevel.hjson. |
Frankly, I disagree with that approach. All this adds is another assumption rather than being explicit, e.g., place the files relative to the toplevel.hjson. Furthermore, downstream users may want to point Darjeelings files to a different configuration and leave the default configuration untouched. |
alees24
left a comment
There was a problem hiding this comment.
Thanks for this; I've tried it on the Darjeeling DV sim and it's fine, so I've dropped my hack.
It just needs linting fixes from CI.
Modified version of changes from lowRISC#26122; do NOT merge this commit Signed-off-by: Adrian Lees <a.lees@lowrisc.org>
f013690 to
6a4c642
Compare
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
To allow topgen to be called from different paths.