Closed chykon closed 1 year ago
Thank you for reporting this and providing a great example for reproducing!
I'm rethinking the overall rules around Combinational
, especially around https://github.com/intel/rohd/issues/290 and sensitivity list calculations, which it sounds like may be responsible for the slow build time you're experiencing. I think we should be able to dramatically accelerate this to nearly the speed of a simple assignment.
I think this type of thing is also a great thing to throw into the ROHD benchmarks to help protect this type of performance.
Slightly modified your code into a benchmark and confirmed that the ongoing refactor of Combinational
has fixed the performance issues seen in this bug.
Note that if you're trying to generate 64KiB of memory, you might want to lean for a sparse memory model using a Map
for overall performance unless you really plan to synthesize the memory like that.
See #344 which includes the fix and benchmark
Describe the bug
It takes a VERY long time to build a circuit in which combinational logic interacts with a large number of sequential ones. An hour later, the assembly was not completed.
I will provide the code to reproduce. There are two modules:
It is worth noting that in the case of using
<=
, you can wait until the end of the build, in contrast to the use case of theCombinational
set. Most likely this can also be linked to https://github.com/intel/rohd/issues/286.Using the debugger, you can see that the build does not hang, but is EXTREMELY SLOW while in one of the
getCombinationalPaths
function loops.To Reproduce
Expected behavior
Build does not take long.
Actual behavior
Build takes a long time.
Additional: Dart SDK info
Dart SDK version: 2.19.3 (stable) (Tue Feb 28 15:52:19 2023 +0000) on "linux_x64"
Additional: pubspec.yaml
No response
Additional: Context
ROHD v0.4.2