Bad scaling, if there are nasty forests of generate statements #1314
Labels
area: performance
Issue involves performance issues
effort: days
Expect this issue to require roughly days of invested effort to resolve
Author Name: John Coiner (@jcoiner)
Original Redmine Issue: 1314 from https://www.veripool.org
Original Assignee: John Coiner (@jcoiner)
This patch adds two tests:
One is a tree of modules, defined recursively, each of which contains a generate statement with several leaves. Each leaf has a submodule, and only one of the leaves should ever be active at a time. So each module really only has one submodule, post-generate, and the module hierarchy is a simple vine. This test passes.
The other is a tree of modules, defined non-recursively. Otherwise it's very similar. This causes verilator to spin and consume all memory on the host. The reason is, it doesn't appear that verilator can prune its analysis to only the active leaves of the generate statement, instead it fans out exponentially across unreachable generate paths.
I was a little surprised that the basic case is broken, while the "tricky" case of a recursive module works well. I'm also a little surprised that verilator handles recursive modules as a special case internally. I'll dive in and see if it's possible to clean that up and get to a single general case that passes both tests...
The text was updated successfully, but these errors were encountered: