Issue #31
Possible problem with ->verilog_text
| Status: | Closed | Start date: | 09/15/2008 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | Wilson Snyder | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
Description
When I call $nl->verilog_text where $nl is a Verilog::Netlist object, the value property on a net seems to be dropped.
Example: wire PWROK = VDD & ~VSS;
->dump on PWROK returns: Net:PWROK Type:wire Array: Value:VDD&~VSS
However the ->verilog_text only shows: wire PWROK;
It looks like I am using version 3.040 of your code.
Jeff Short
History
Updated by Jeff Short over 4 years ago
I was able to fix the output by doing the following in Net.pm : 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, ";"; } return (wantarray ? @out : join('',@out)); }
Just added one new line to deal with value. Not sure this is 100% correct but it works in my case anyway. Let me know what you think.
Jeff
Updated by Jeff Short over 4 years ago
- File tmp.txt added
Well posting the text in this window didn't work well. Trying as attachment.
Jeff
Updated by Wilson Snyder over 4 years ago
- Status changed from New to Closed
- Assignee set to Wilson Snyder
Thanks for the patch, that makes sense. I've pushed it to the GIT version and it'll be in the next release.
Also available in: Atom
![[logo]](/img/veripool_small.png)