Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIRRTL] Treat blackboxes in layers as "testbench" #6881

Merged
merged 2 commits into from Mar 29, 2024

Conversation

seldridge
Copy link
Member

@seldridge seldridge commented Mar 29, 2024

When determining which directory to place a blackbox into, make two changes to get this working correctly with layers:

  1. Never change a directory if one is already specified.
  2. Treat any bound instance as not under the DUT.

Taken together, this preserves both the original behavior of grand central blackbox extraction and causes blackboxes instantiated under layers to be placed in the testbench directory.

Fixes #6880.

Note: that this intentionally does not test what happens when something is inside a Grand Central View. I'm going to go out on a limb and not specify this and state that we probably don't want to support it. Grand Central Views are planned to be fully replaced with layers making this question irrelevant.

When determining which directory to place a blackbox into, make two
changes to get this working correctly with layers:

  1. Never change a directory if one is already specified.
  2. Treat any bound instance as not under the DUT.

Taken together, this preserves both the original behavior of grand central
blackbox extraction and causes blackboxes instantiated under layers to be
placed in the testbench directory.

Fixes #6880.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Copy link
Contributor

@mwachs5 mwachs5 left a comment

Choose a reason for hiding this comment

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

Tests look good!

@seldridge seldridge merged commit aca154a into main Mar 29, 2024
4 checks passed
@seldridge seldridge deleted the dev/seldridge/issue-6880 branch March 29, 2024 16:36
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.

[firrtl] extmodules with HasBlackBoxInline instantiated only in a layer not emitted into layers location
2 participants