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

Fixes bug in verilog name generation logic #1016

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

rdaly525
Copy link
Owner

Fixes #941

Copy link
Collaborator

@joyliu37 joyliu37 left a comment

Choose a reason for hiding this comment

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

Looks good to me. So I need to use serializeToFile to dump the generator information?

->getMetaData()["verilog"];
module_name = make_name(instance_module->getName(), verilog_json);
}
if (instance_module->isGenerated() && instance_module->getGenerator()->getMetaData().count("verilog") > 0) {
Copy link
Collaborator

@joyliu37 joyliu37 Jul 22, 2021

Choose a reason for hiding this comment

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

After testing with clockwork, I need to change this line of code into

if (instance_module->isGenerated() && instance_module->getMetaData().count("verilog") > 0)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@rdaly525 I think this means you need to check two separate cases here:

  1. the instance_module has "verilog" metadata
  2. the instance_module->getGenerator() has "verilog" metadata

Copy link
Collaborator

@leonardt leonardt left a comment

Choose a reason for hiding this comment

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

Change looks fine, but I think there's one extra case needed for Joey's use case

->getMetaData()["verilog"];
module_name = make_name(instance_module->getName(), verilog_json);
}
if (instance_module->isGenerated() && instance_module->getGenerator()->getMetaData().count("verilog") > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@rdaly525 I think this means you need to check two separate cases here:

  1. the instance_module has "verilog" metadata
  2. the instance_module->getGenerator() has "verilog" metadata

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.

Add a Custom Name for CoreIR Generator When Generate Verilog
4 participants