From c2e9fe0f58b02d50dc6ef23c32e5187dd78b2fac Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 12 Jun 2016 22:50:00 +0200 Subject: [PATCH] use entity name from bsdl file to name pin dump --- openocd-jtag-boundary-scan.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openocd-jtag-boundary-scan.pl b/openocd-jtag-boundary-scan.pl index 1e381e7..aa4ea26 100755 --- a/openocd-jtag-boundary-scan.pl +++ b/openocd-jtag-boundary-scan.pl @@ -10,6 +10,7 @@ use Storable; my $openocd_remote = shift @ARGV || 'picam:4444'; my $bsdl_file = $ENV{BSDL} || '_3128at100.bsd'; my $BOUNDARY_LENGTH = 288; +my $entity; my $bit2pin; my $io2bit; @@ -35,6 +36,9 @@ while(<$bsdl>) { } elsif ( m/attribute\s+BOUNDARY_LENGTH\s+of\s+\S+\s*:\s*entity\s+is\s+(\d+);/ ) { $BOUNDARY_LENGTH = $1; warn "# BSDL $bsdl_file BOUNDARY_LENGTH = $BOUNDARY_LENGTH\n"; + } elsif ( ! $entity && m/^entity\s(\S+)\s+is/ ) { + $entity = $1; + warn "# entity = $entity\n"; } } @@ -63,7 +67,8 @@ foreach my $map ( split(/\s*,\s*/, $pin_map) ) { } warn "# pin2io = ",dump( $pin2io ); -store \$pin2io, '/dev/shm/pin2io.storable'; +#store \$pin2io, $bsdl_file . '.pin2io.storable'; +store \$pin2io, $entity . '.pin2io.storable'; my @sort = sort { my $aa = $a; $aa =~ s/\D+//g; -- 2.20.1