added two more possible pins
[x300-pci] / openocd-jtag-boundary-scan.pl
index f4e4059..726b30d 100755 (executable)
@@ -86,6 +86,22 @@ foreach my $pin_file ( glob "pins/$entity*.tsv" ) {
        warn "# $pin_file ",dump($pin_desc);
 }
 
+{
+       my $pin_file = 'Altera/epm3064_dac/3064at44.qsf';
+       open(my $fh, '<', $pin_file);
+       while(<$fh>) {
+               chomp;
+               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 "# $pin_file ",dump($pin_desc);
+}
+
 =for remove
 my @sort = sort {
        my $aa = $a; $aa =~ s/\D+//g;
@@ -223,11 +239,11 @@ if ( $cmd =~ /(p|o)(\d+)=(\d+)/ ) {
        if ( $what eq 'p' && length($v) == 1 ) {
 
                my $pin = $p;
-               warn "# pin $pin = $v\n";
-
                my $io = $pin2io->[$pin];
                my $bit = $io2bit->{$io}->[0];
 
+               warn "# pin $pin = $v io=$io bit=$bit\n";
+
                $b =
                          substr($old_bsr,0,$bit+1) # leave input as-is
                        . ( $v eq 'Z' ? 1 : 0 )     # control