+my $pin_desc;
+foreach my $pin_file ( glob "pins/$entity*.tsv" ) {
+ open(my $fh, '<', $pin_file);
+ while(<$fh>) {
+ chomp;
+ my ($pin,$desc, $bcm) = split(/\t+/,$_,3);
+ $pin_desc->{$pin} = $desc;
+ gpio::add_bcm_desc( $bcm => $desc ) if $have_gpio;
+ }
+ close($fh);
+ warn "# $pin_file ",dump($pin_desc);
+}
+
+{
+ open(my $fh, '<', $project_file);
+ while(<$fh>) {
+ chomp;
+ s/[\r\n]+$//;
+ next if m/^\s*#/;
+ my ($set,$pin, $op, $desc) = split(/\s+/,$_,4);
+ if ( $set =~ m/set_location_assignment/i && $op =~ m/-to/i && $pin =~ s/^PIN_//ig ) {
+ $pin_desc->{$pin} = $desc; # overwrite pin description
+ } else {
+ #warn "## ignored $_\n";
+ }
+ }
+ close($fh);
+ warn "# $project_file ",dump($pin_desc);
+}
+
+=for remove