sorting issue in chip data parser script
In parse_chip_data_xml there is a list that was parsed lexically instead
of numerically causing an issue in error isolation to MC_OMI_DL_FIR[0].
Change-Id: Ie8210b7e3f52660477b7611b19d7137d0d488dbd
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/xml/parse_chip_data_xml b/xml/parse_chip_data_xml
index c083f7d..8108ff1 100755
--- a/xml/parse_chip_data_xml
+++ b/xml/parse_chip_data_xml
@@ -237,7 +237,7 @@
my $list = [];
for ( @{$insts} ) { push @{$list}, $_->{reg_inst}; }
- @{$list} = sort @{$list}; # Sort the list just in case.
+ @{$list} = sort {$a <=> $b} @{$list}; # Sort the list just in case.
return BitRange::compress($list);
}
@@ -598,7 +598,7 @@
{
my ( $node, $sigs, $insts_data ) = @_;
- my @node_insts = sort keys %{$insts_data};
+ my @node_insts = sort {$a <=> $b} keys %{$insts_data};
my $sz_insts = scalar @node_insts;
# There should be only one child node per node instance bit position.
@@ -728,7 +728,7 @@
}
# Now that we have all of the node data, collapse the instance data into
- # a list.
+ # a list. Note that sort order doesn't matter. Only used for consistency.
for ( sort keys %{$insts_data} )
{
$insts_data->{$_}->{node_inst} = $_;