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: Nicky Ayoub
Original Redmine Issue: 66 from https://www.veripool.org
Original Date: 2009-02-16
Original Assignee: Wilson Snyder (@wsnyder)
I'm not sure if it's me or my interpretation of the docs.
From Modules.pm :
$self->ports_ordered
Returns list of references to Verilog::Netlist::Port in the order
the ports were declared in the module’s port list.
I replaced show_module_names() of vier with :
sub show_module_names {
my $nl = shift;
my $fh = shift;
foreach my $mod ($nl->modules_sorted) {
print $fh " ",$mod->name,"\n";
my @ports = $mod->ports_ordered();
print Dumper(\@ports);
foreach my $sig (@ports) {
my $net = $sig->net;
if ( $net->width ) {
printf (" %sput %s [%s:%s];\n", $sig->direction, $sig->name, $net->msb, $net->lsb,);
} else {
printf (" %sput %s\n", $sig->direction, $sig->name);
}
}
}
}
The results look like this :
% ./v2sp --nomissing --modules memory_mask.v
Version : 3.110
memory_mask
$VAR1 = [
'Q',
'CLK',
'CEN',
'WEN',
'A',
'D',
'OEN'
];
Can't locate object method "net" via package "Q" (perhaps you forgot to load "Q"?) at ./v2sp line 183.
I was expecting a port reference and not a port name in $sig.
Please comment and I can supply a patch either to the docs or the code.
Thanks,
Nicky
The text was updated successfully, but these errors were encountered:
Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-02-17T00:02:41Z
Hmm, yes. I think I'd prefer to change the documentation to say it returns text references, as that preserves backward compatibility, and also at the time that list is made the references don't exist yet. I think find_port_by_index be used if you really want the reference.
Author Name: Nicky Ayoub
Original Redmine Issue: 66 from https://www.veripool.org
Original Date: 2009-02-16
Original Assignee: Wilson Snyder (@wsnyder)
I'm not sure if it's me or my interpretation of the docs.
From Modules.pm :
I replaced show_module_names() of vier with :
The results look like this :
I was expecting a port reference and not a port name in $sig.
Please comment and I can supply a patch either to the docs or the code.
Thanks,
Nicky
The text was updated successfully, but these errors were encountered: