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: David Chinnery
Original Redmine Issue: 343 from https://www.veripool.org
Original Date: 2011-05-04
Original Assignee: Wilson Snyder (@wsnyder)
Hi Wilson,
I just sent an email to you about this, bug figured I'd also submit it here.
Not sure if this should be submitted as an issue or a patch, so I've submitted it as an issue.
When a pin is deleted, the net counts are not decremented. Hence if another driver is connected, there will be a lint error for multiple drivers.
Here is a fix for this issue. Add to Netlist/Net.pm:
sub used_in_dec {
return if (! $[0]->used_in());
$[0]->used_in(-1+$[0]->_used_in());
}
sub used_out_dec {
return if (! $[0]->used_out());
$[0]->used_out(-1+$[0]->_used_out());
}
sub used_inout_dec {
return if (! $[0]->used_inout());
$[0]->used_inout(-1+$[0]->_used_inout());
}
Update delete() in Netlist/Pin.pm as follows:
sub delete {
my $self = shift;
if ($self->net && $self->port) {
$self->net->_used_in_dec() if ($self->port->direction() eq 'in');
$self->net->_used_out_dec() if ($self->port->direction() eq 'out');
$self->net->_used_inout_dec() if ($self->port->direction() eq 'inout');
}
my $h = $self->cell->_pins;
delete $h->{$self->name};
return undef;
}
Thanks,
Dave.
On 02/03/11 17:18, David Chinnery wrote:
[..]
I have run into an invalid lint warning after deleting an output pin,
then adding it back connected to the same net as it was connected to
before. I've attached a simple test case that exercises the issue.
A possible work around is to not delete a pin and then add the
connection, if the connection is to the same net as it was connected to
previously. However, this may not be viable when swapping a cell, say
from bfx1 to bfx2.
[..]
PS: Here's the invalid warning:
Reading Verilog file test.v ...
Linting before reconnecting net ...
Linting after reconnecting net ...
%Warning: test.v:2: Signal has multiple drivers (2): net1
Net:net1
Pin: cell1.A in
Pin: cell2.QB out
The text was updated successfully, but these errors were encountered:
Original Redmine Comment
Author Name: David Chinnery
Original Date: 2011-05-04T02:36:20Z
Unpleasant formatting in that submission. Here's it as pre-formatted text:
Here is a fix for this issue. Add to Netlist/Net.pm:
sub _used_in_dec {
return if (! $_[0]->_used_in());
$_[0]->_used_in(-1+$_[0]->_used_in());
}
sub _used_out_dec {
return if (! $_[0]->_used_out());
$_[0]->_used_out(-1+$_[0]->_used_out());
}
sub _used_inout_dec {
return if (! $_[0]->_used_inout());
$_[0]->_used_inout(-1+$_[0]->_used_inout());
}
Update delete() in Netlist/Pin.pm as follows:
sub delete {
my $self = shift;
if ($self->net && $self->port) {
$self->net->_used_in_dec() if ($self->port->direction() eq 'in');
$self->net->_used_out_dec() if ($self->port->direction() eq 'out');
$self->net->_used_inout_dec() if ($self->port->direction() eq 'inout');
}
my $h = $self->cell->_pins;
delete $h->{$self->name};
return undef;
}
Author Name: David Chinnery
Original Redmine Issue: 343 from https://www.veripool.org
Original Date: 2011-05-04
Original Assignee: Wilson Snyder (@wsnyder)
Hi Wilson,
I just sent an email to you about this, bug figured I'd also submit it here.
Not sure if this should be submitted as an issue or a patch, so I've submitted it as an issue.
When a pin is deleted, the net counts are not decremented. Hence if another driver is connected, there will be a lint error for multiple drivers.
Here is a fix for this issue. Add to Netlist/Net.pm:
sub used_in_dec {
return if (! $[0]->used_in());
$[0]->used_in(-1+$[0]->_used_in());
}
sub used_out_dec {
return if (! $[0]->used_out());
$[0]->used_out(-1+$[0]->_used_out());
}
sub used_inout_dec {
return if (! $[0]->used_inout());
$[0]->used_inout(-1+$[0]->_used_inout());
}
Update delete() in Netlist/Pin.pm as follows:
sub delete {
my $self = shift;
}
Thanks,
Dave.
On 02/03/11 17:18, David Chinnery wrote:
The text was updated successfully, but these errors were encountered: