'EP4CE6E22.bsd';
# '_3128at100.bsd';
# '3064at44.bsd'; # XXX
-my $tap = $ENV{TAP} || 'tb276.tap';
my $project_file = 'Altera/epm3064_dac/3064at44.qsf';
$project_file = 'tb276/f32c.qsf';
return unpack("H$hlen", pack("B$blen", $b));
}
-#my $cmd;
-
+my $tap;
+print $sock "jtag names\n"; # will fill-in $tap variable from openocd
my $BSR;
-# first sample
-print $sock "irscan $tap $opcode->{SAMPLE}\n"; # SAMPLE/PRELOAD
-print $sock "drscan $tap $BOUNDARY_LENGTH 0\n";
-
while(1) {
while (<$sock>) {
print_io $bin if $bin ne $last_bits;
gpio::pins() if $have_gpio;
last;
+ } elsif ( m/^(\w+\.tap)$/ && !$tap ) {
+ $tap = $1;
+ warn "# using TAP $tap";
+
+ # first sample
+ print $sock "irscan $tap $opcode->{SAMPLE}\n"; # SAMPLE/PRELOAD
+ print $sock "drscan $tap $BOUNDARY_LENGTH 0\n";
+
} else {
warn "# in ",dump($_);
}