Commit df3554ac authored by Stefan Tauner's avatar Stefan Tauner
Browse files

netlist: remove get_net_from_path()

parent c6a6722a
......@@ -1419,28 +1419,17 @@ sub _extract_netstring_elements {
return {'net_name' => $net_name, 'prefix' => $prefix, 'lsb' => $lsb, 'msb' => $msb};
}
## @method public get_net_from_path($netpath)
## @method public get_netdescriptor_from_path($netpath)
# @brief splits a hierarchical path of a net
#
# splits a hierarchical path of a net in the form of module1|module2|netname
# splits a hierarchical path of a net in the form of module1|module2|netname[7:0]
# (separator according to constant HIERSEP)
# to the net object corresponding to "netname" in module "module2"
#
# @param netpath the hierarchical PATH|TO|netname; separator according to constant HIERSEP
# @param netpath the hierarchical PATH|TO|netname[MSB:LSB]; separator according to constant HIERSEP; indices optional
#
# @returns STRING if an error occurred
# @returns HASHREF with the keys 'mod', 'net', 'msb' and 'lsb', if successful.
sub get_net_from_path {
my $logger = get_logger("");
my ($self, $netpath) = @_;
my $net_descr = $self->get_netdescriptor_from_path($netpath);
if (ref($net_descr) ne "HASH") {
return $net_descr;
}
return $net_descr->{'net'};
}
# @returns STRING error message if an error occurred
# @returns HASHREF with the keys 'mod', 'prefix', 'net', 'net_name', 'msb' and 'lsb', if successful.
sub get_netdescriptor_from_path {
my $logger = get_logger("");
my ($self, $netpath) = @_;
......@@ -1476,7 +1465,7 @@ sub get_netdescriptor_from_path {
return sprintf("Net '%s%s%s' in netlist %s has a defined pin range but requested net does not.", $mod->name, HIERSEP, $net_name, $self->{'filename'});
}
if (-1 == _offset_of_bit_in_netrange($msb, $net)) {
return sprintf("Pin [%s] is not in net '%s%s' in netlist %s", $msb, $mod->name, HIERSEP, $net_name, $self->{'filename'});
return sprintf("Bit [%s] is not in net '%s%s%s' in netlist %s", $msb, $mod->name, HIERSEP, $net_name, $self->{'filename'});
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment