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;
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