my $openocd_remote = shift @ARGV || 'picam:4444';
my $bsdl_file = $ENV{BSDL} || '_3128at100.bsd';
-$bsdl_file = '3064at44.bsd'; # XXX
+#$bsdl_file = '3064at44.bsd'; # XXX
+my $tap = $ENV{TAP} || 'x300.tap';
+
my $BOUNDARY_LENGTH = 288;
my $entity;
my $BSR;
# first sample
-print $sock "irscan x300.tap 0x55\n"; # SAMPLE/PRELOAD
-print $sock "drscan x300.tap $BOUNDARY_LENGTH 0\n";
+print $sock "irscan $tap 0x55\n"; # SAMPLE/PRELOAD
+print $sock "drscan $tap $BOUNDARY_LENGTH 0\n";
while(1) {
diff_bits( $BSR, $b ), $/;
-# print $sock "irscan x300.tap 0x55\n"; # SAMPLE/PRELOAD
- print $sock "drscan x300.tap $BOUNDARY_LENGTH 0x", bin2hex($b), "\n";
- print $sock "irscan x300.tap 0x00\n"; # EXTEST
-# print $sock "drscan x300.tap $BOUNDARY_LENGTH 0x", bin2hex($b), "\n";
+# print $sock "irscan $tap 0x55\n"; # SAMPLE/PRELOAD
+ print $sock "drscan $tap $BOUNDARY_LENGTH 0x", bin2hex($b), "\n";
+ print $sock "irscan $tap 0x00\n"; # EXTEST
+# print $sock "drscan $tap $BOUNDARY_LENGTH 0x", bin2hex($b), "\n";
} elsif ( $cmd =~ m/\?/ ) {
$last_bits = '';
- print $sock "irscan x300.tap 0x55\n"; # SAMPLE/PRELOAD
- print $sock "drscan x300.tap $BOUNDARY_LENGTH 0\n";
+ print $sock "irscan $tap 0x55\n"; # SAMPLE/PRELOAD
+ print $sock "drscan $tap $BOUNDARY_LENGTH 0\n";
} else {
gpio::cmd( $cmd );
- print $sock "irscan x300.tap 0x55\n"; # SAMPLE/PRELOAD
- print $sock "drscan x300.tap $BOUNDARY_LENGTH 0\n";
+ print $sock "irscan $tap 0x55\n"; # SAMPLE/PRELOAD
+ print $sock "drscan $tap $BOUNDARY_LENGTH 0\n";
}