-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LowerToHW] Fix memories moved to testbench bug
Fixes a bug where memories instantiated under the DUT would be moved to the testbench directory. This bug was introduced in b40db34 where the set of DUT modules was precomputed by recording all FIRRTL modules under the DUT. The `isInDUT` function would then query this precomputed set. However, this meant that queries needed to be FIRRTL modules and not HW modules. Memories, because they were visited once FIRRTL module bodies were moved to HW module bodies, would then incorrectly always return false from the `isInDUT` method because the _new_ module was being used instead of the _old_ module. This is fixed by making the `isInDUT` function do the right thing in both cases. A new mapping of HW module to FIRRTL module is added. The `isInDUT` will use this to query the DUT module set if it is given a new HW module. Add one test of this behavior. Fixes #6775. Signed-off-by: Schuyler Eldridge <[email protected]>
- Loading branch information
Showing
2 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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