From a2379f06f2abf28f81af62bd3cd04794e24460e4 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 22 Jun 2016 12:37:36 +0200 Subject: [PATCH] read qsf file and display assigments from there --- openocd-jtag-boundary-scan.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openocd-jtag-boundary-scan.pl b/openocd-jtag-boundary-scan.pl index 141af2a..726b30d 100755 --- a/openocd-jtag-boundary-scan.pl +++ b/openocd-jtag-boundary-scan.pl @@ -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; -- 2.20.1