-
Notifications
You must be signed in to change notification settings - Fork 72
clustergen: Improvements for generation with templates #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This allows to specify cacheable regions from the configuration, which was not possible before without writing custom python script which is unnecessary complex. Also gets rid of the `SnitchClusterTB` python class which modeled a simple environment with a DRAM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @fischeti!
Just a few comments from my side, otherwise looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a couple of commits to streamline the clustergen tool even more. Summary below. @fischeti if you can give them a quick review, then for me it's ready to merge.
-
It seems the
memories.json
file is not currently used anywhere in this repo, nor in Occamy. I temporarily removed it, to make the interface to the tool more consistent. In the future we can use a template to generate this file as well, if needed. -
Enable overriding the output file name, by passing a full path to the desired output file, instead of just the output directory.
Looks good to me. The |
This PR aims to improve the auto-generation of sources in several ways:
Cacheable regions
It is now possible to define external (cacheable) memory regions in the configuration file:
Previously, that was not possible. Instead, the intended way was to write a python script that imports the
SnitchCluster
class and adds additional information such as cacheable regions. For instance, for the testbench of the snitch cluster itself, there exists aSnitchClusterTb
class which defines a simple environment with a (cacheable) DRAM. However, writting a python script for integrating the snitch cluster is unnecessary cumbersome, which is why this was removed in favor ofexternal_addr_region
.Arbitrary templates
Instead of having different flags for the generation of different kind of sources, the clustergen now just validates a configuration file and extends it with additional information, from which arbitrary sources can be generated by providing a template with
--template
.Migrate to JSON5
The configuration files were migrated from HJSON to JSON5, which allows hexadecimal input, as well as comments