clustergen: Improvements for generation with templates#202
Merged
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
colluca
approved these changes
Feb 18, 2025
Collaborator
There was a problem hiding this comment.
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.jsonfile 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.
Contributor
Author
|
Looks good to me. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SnitchClusterclass and adds additional information such as cacheable regions. For instance, for the testbench of the snitch cluster itself, there exists aSnitchClusterTbclass 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