You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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));
}
The text was updated successfully, but these errors were encountered:
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));
}
The text was updated successfully, but these errors were encountered: