Skip to content

add mechanism to disable module cache#37

Merged
grg merged 5 commits intoStanfordVLSI:masterfrom
grg:gleng/disable_module_cache
Mar 3, 2026
Merged

add mechanism to disable module cache#37
grg merged 5 commits intoStanfordVLSI:masterfrom
grg:gleng/disable_module_cache

Conversation

@grg
Copy link
Copy Markdown
Collaborator

@grg grg commented Mar 3, 2026

The module cache helps speed up generation by identifying when a module is generated multiple times with the same parameters and skipping duplicate generations. (This can be manually handled via clone calls. Clone is feasible within a module, but becomes difficult across modules.)

One problem right now is that the duplicate detection logic only looks at the parameters begin passed to the currently module; it doesn't consider parameters lower down in the hierarchy that may be overridden via one of the override mechanisms (e.g., command line, XML, ...).

@grg grg requested a review from steveri March 3, 2026 00:49
@grg
Copy link
Copy Markdown
Collaborator Author

grg commented Mar 3, 2026

@steveri The module cache code was added last year. We never override parameters so it works well for us, but it could break things if parameters are overridden.

It's probably better to do one of these longer term:

  • Identify when overrides are in place and disable the module cache automatically.
  • Have the duplicate module detection logic look at overrides and identify if a child is being overridden.

grg added 4 commits March 2, 2026 18:48
The module cache helps speed up generation by identifying when a module
is generated multiple times with the same parameters and skipping
duplicate generations. (This can be manually handled via clone calls.
Clone is feasible within a module, but becomes difficult across
modules.)

One problem right now is that the duplicate detection logic only looks
at the parameters begin passed to the currently module; it doesn't
consider parameters lower down in the hierarchy that may be overridden
via one of the override mechanisms (e.g., command line, XML, ...).
@grg grg force-pushed the gleng/disable_module_cache branch from cd0d27e to 594990d Compare March 3, 2026 02:48
@grg
Copy link
Copy Markdown
Collaborator Author

grg commented Mar 3, 2026

I actually added a test case this time 🎉

The Genesis invocation in the test includes -no_module_cache. Without it, the test fails because of the parameter override on the command line not being handled correctly by the module cache.

Copy link
Copy Markdown
Contributor

@steveri steveri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks for the new test.

@grg grg merged commit f58a0cf into StanfordVLSI:master Mar 3, 2026
5 checks passed
@grg grg deleted the gleng/disable_module_cache branch March 3, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants