Line 1... |
Line 1... |
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
# $Id: ticonv_pdpcp 609 2014-12-07 19:35:25Z mueller $
|
# $Id: ticonv_pdpcp 622 2014-12-28 20:45:26Z mueller $
|
#
|
#
|
# Copyright 2013-2014 by Walter F.J. Mueller
|
# Copyright 2013-2014 by Walter F.J. Mueller
|
#
|
#
|
# This program is free software; you may redistribute and/or modify it under
|
# This program is free software; you may redistribute and/or modify it under
|
# the terms of the GNU General Public License as published by the Free
|
# the terms of the GNU General Public License as published by the Free
|
Line 12... |
Line 12... |
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
# for complete details.
|
# for complete details.
|
#
|
#
|
# Revision History:
|
# Revision History:
|
# Date Rev Version Comment
|
# Date Rev Version Comment
|
|
# 2014-12-27 622 1.2.1 use wmembe now
|
# 2014-12-07 609 1.2 use rlink::anena (for rlink v4)
|
# 2014-12-07 609 1.2 use rlink::anena (for rlink v4)
|
# 2014-07-31 576 1.1 add --cmax option (default = 3); support .sdef
|
# 2014-07-31 576 1.1 add --cmax option (default = 3); support .sdef
|
# 2014-07-26 575 1.0.4 add --tout option (sets wtcpu timeout)
|
# 2014-07-26 575 1.0.4 add --tout option (sets wtcpu timeout)
|
# 2013-05-19 521 1.0.3 use -be subopt of -wibrb
|
# 2013-05-19 521 1.0.3 use -be subopt of -wibrb
|
# 2013-04-12 504 1.0.2 renamed from pi2ti_pdpcp; fix [rm]wi handling
|
# 2013-04-12 504 1.0.2 renamed from pi2ti_pdpcp; fix [rm]wi handling
|
Line 122... |
Line 123... |
# Note: 'wibrb' must be handled separately
|
# Note: 'wibrb' must be handled separately
|
# Note: 'wmi' must be matched before 'wm'
|
# Note: 'wmi' must be matched before 'wm'
|
} elsif ($cmd =~ /^(wr[0-7]|wps|wal|wah|wmi|wm|stapc)\s+([0-7]+)$/) {
|
} elsif ($cmd =~ /^(wr[0-7]|wps|wal|wah|wmi|wm|stapc)\s+([0-7]+)$/) {
|
push @cmdlist, "-$1 0$2";
|
push @cmdlist, "-$1 0$2";
|
|
|
# (write) data type commands: wibrb ---
|
# (write) data type commands: wmembe ---
|
} elsif ($cmd =~ /^(wibrb)\s+([0-7]+)/) {
|
} elsif ($cmd =~ /^wmembe\s+([01]+)/) {
|
my $base = oct($2);
|
my $val = oct("0b$1");
|
my $be = $base & 0x3;
|
my $be = $val & 0x3;
|
if ($be == 0) {
|
my $stick = $val & 0x4;
|
push @cmdlist, "-wibrb 0$2";
|
if ($stick == 0) {
|
|
push @cmdlist, "-wmembe $be";
|
} else {
|
} else {
|
push @cmdlist, sprintf "-wibrb 0%6.6o -be %o", $base&0177700, $be;
|
push @cmdlist, "-wmembe $be -stick";
|
}
|
}
|
|
|
# (read) [d=data] type commands: rrx,rps,rm,rmi --------------------
|
# (read) [d=data] type commands: rrx,rps,rm,rmi --------------------
|
# Note: 'rmi' must be matched before 'rm'
|
# Note: 'rmi' must be matched before 'rm'
|
} elsif ($cmd =~ /^(rr[0-7]|rps|rmi|rm)/) {
|
} elsif ($cmd =~ /^(rr[0-7]|rps|rmi|rm)/) {
|