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

Change to Netlist/Net.pm #57

Closed
veripoolbot opened this issue Jan 23, 2009 · 2 comments
Closed

Change to Netlist/Net.pm #57

veripoolbot opened this issue Jan 23, 2009 · 2 comments
Assignees

Comments

@veripoolbot
Copy link
Collaborator

@veripoolbot veripoolbot commented Jan 23, 2009


Author Name: Jeff Short
Original Redmine Issue: 57 from https://www.veripool.org
Original Date: 2009-01-23
Original Assignee: Wilson Snyder (@wsnyder)


I would like to get the following (or it's equivalent added to Netlist/Net.pm. I have an application for this tool where I need to preserve the comments on nets in the output verilog. Amazingly everything works other than the verilog_text routine didn't print it.

Here is the code as I wrote it. Feel free to re-implement as needed. Also this was built off verion 3.042. There is just one new line that is added inside the foreach loop. I attached a full copy of the file just in case.

sub verilog_text {
my $self = shift;
my @out;
foreach my $decl ($self->_decls) {
push @out, $decl;
push @out, " [".$self->msb.":".$self->lsb."]" if defined $self->msb;
push @out, " ".$self->name;
push @out, " ".$self->array if $self->array;
push @out, " = ".$self->value if defined $self->value && $self->value ne '';
push @out, ";";
push @out, " ".$self->comment if defined $self->comment && $self->comment ne ''
}
return (wantarray ? @out : join('',@out));
}

@veripoolbot

This comment has been minimized.

Copy link
Collaborator Author

@veripoolbot veripoolbot commented Jan 24, 2009


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-01-24T02:20:17Z


Thanks for the patch, it makes sense. I committed it to git and it will be in 3.101.

@veripoolbot

This comment has been minimized.

Copy link
Collaborator Author

@veripoolbot veripoolbot commented Jan 28, 2009


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-01-28T19:09:46Z


In 3.110 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.