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

Use debug_name by default for instances #323

Merged
merged 2 commits into from Dec 4, 2018
Merged

Use debug_name by default for instances #323

merged 2 commits into from Dec 4, 2018

Conversation

leonardt
Copy link
Collaborator

This PR changes the default naming scheme for instances.

Before, we would generate a unique name inst{n} where n is equal to the current number of instances in the definition. This makes it challenging to debug because you have to look at the instantiation to figure out what module was being instances (which is not always obvious).

@priyanka-raina suggested that we attach module names to instances so we can see which module is being instanced (which in turn attaches the module names to the wires). We already had this logic for error message so it was fairly simple to repurpose.

The new naming scheme is: {module_name}_inst{n} where n is the number of times module_name has been instanced in the current definition.

This shouldn't affect any functionality, it should improve debugging experience, however it is a pain for any existing gold files. I've updated the magma golds here, mantle will also need to be updated.

Let me know if you have any issues with this new proposed naming scheme.

@coveralls
Copy link

coveralls commented Nov 29, 2018

Pull Request Test Coverage Report for Build 1298

  • 8 of 8 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 72.08%

Totals Coverage Status
Change from base Build 1292: 0.01%
Covered Lines: 3511
Relevant Lines: 4871

💛 - Coveralls

@leonardt leonardt merged commit c4972e1 into master Dec 4, 2018
@leonardt leonardt deleted the debug-names branch December 4, 2018 21:14
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.

None yet

3 participants