mirror of
https://github.com/wfjm/w11.git
synced 2026-03-10 04:54:26 +00:00
bin/*: drop superfluous exists for
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: asm-11_expect 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: asm-11_expect 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.1.2 drop superfluous exists for $opts
|
||||
# 2019-05-25 1152 1.1.1 skip data checks if dot not defined
|
||||
# 2018-11-03 1065 1.1 add and use bailout; update exit code usage
|
||||
# 2013-03-29 500 1.0 Initial version
|
||||
@@ -28,7 +29,7 @@ my $errcnt; # total error count
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: config_wrapper 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: config_wrapper 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2010-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.1.10 drop superfluous exists for $opts
|
||||
# 2018-12-18 1089 1.1.9 add and use bailout
|
||||
# 2013-09-21 534 1.1.8 add nexys4 support
|
||||
# 2013-01-02 467 1.1.7 jconfig: prepend '0x' to support 'jtag #2007'
|
||||
@@ -48,7 +49,7 @@ if (not defined $opts{path}) {
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: console_starter 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: console_starter 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2009-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Vers Comment
|
||||
# 2019-07-13 1189 1.1.1 drop superfluous exists for $opts
|
||||
# 2014-08-10 581 1.1 rename to console_starter
|
||||
# 2010-07-04 312 1.0.3 correct telnet_wrapper path
|
||||
# 2010-04-26 284 1.0.2 add error check for GetOptions
|
||||
@@ -21,7 +22,7 @@ my %opts = ();
|
||||
GetOptions(\%opts, "h", "t:s", "d:s", "s", "w", "l")
|
||||
or die "bad options";
|
||||
|
||||
if (exists $opts{h}) {
|
||||
if ($opts{h}) {
|
||||
print "usage: console_starter [-h] [-t type] [-d type] [-s] [-w] [-l]\n";
|
||||
print " -h help, print this text and quit\n";
|
||||
print " -t term set terminal type, vt100 or vt52 (def: vt100)\n";
|
||||
@@ -61,7 +62,7 @@ if (exists $opts{d}) {
|
||||
}
|
||||
}
|
||||
|
||||
if (exists $opts{s}) { # simh ports
|
||||
if ($opts{s}) { # simh ports
|
||||
$port = 5670 if ($dev eq "DL");
|
||||
$port = 5671 if ($dev eq "DZ");
|
||||
$title = sprintf "\"%s %s\"", $dev, $term;
|
||||
@@ -73,8 +74,8 @@ if (exists $opts{s}) { # simh ports
|
||||
|
||||
my $geo_w = 80;
|
||||
my $geo_l = 24;
|
||||
$geo_w = 132 if exists $opts{w};
|
||||
$geo_l = 48 if exists $opts{l};
|
||||
$geo_w = 132 if $opts{w};
|
||||
$geo_l = 48 if $opts{l};
|
||||
|
||||
push @args, "-j", "-rightbar", "-sb", "-sl", "500";
|
||||
push @args, "-bg", "gray90", "-fg", "black";
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: create_disk 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: create_disk 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.1.4 drop superfluous exists for $opts
|
||||
# 2018-12-18 1089 1.1.3 add and use bailout
|
||||
# 2015-06-21 692 1.1.2 use sysseek rather seek; add RM80
|
||||
# 2015-04-06 665 1.1.1 add alias RM03 (for RM02) and RP05 (for RP04)
|
||||
@@ -40,7 +41,7 @@ my %disktype = (
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help(1);
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: dmpcntanal 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: dmpcntanal 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2018-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.0.1 drop superfluous exists for $opts
|
||||
# 2018-10-19 1057 1.0 Initial version
|
||||
# 2018-10-06 1053 0.1 First draft
|
||||
#
|
||||
@@ -76,7 +77,7 @@ my %hdif;
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: dmscntanal 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: dmscntanal 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.0.2 drop superfluous exists for $opts
|
||||
# 2018-12-18 1089 1.0.1 add and use bailout
|
||||
# 2015-06-28 696 1.0 Initial version
|
||||
#
|
||||
@@ -30,7 +31,7 @@ my $sum_um;
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
@@ -38,7 +39,7 @@ if (exists $opts{help}) {
|
||||
foreach my $file (@ARGV) {
|
||||
read_file($file);
|
||||
add_groups();
|
||||
show_raw() if exists $opts{raw};
|
||||
show_raw() if $opts{raw};
|
||||
show_frac();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: dmscntconv 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: dmscntconv 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.0.3 drop superfluous exists for $opts
|
||||
# 2018-12-18 1089 1.0.2 add and use bailout
|
||||
# 2015-12-28 721 1.0.1 adopt to new syntax of STATE2SNUM mapper
|
||||
# 2015-06-27 695 1.0 Initial version
|
||||
@@ -28,7 +29,7 @@ my %dat_um;
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: fx2load_wrapper 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: fx2load_wrapper 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2011-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.1.1 drop superfluous exists for $opts
|
||||
# 2014-08-10 581 1.1 use _ic instead of _as as default firmware
|
||||
# 2012-02-11 457 1.0.1 use RETRO_FX2_VID/PID; check iProduct string
|
||||
# 2011-12-29 446 1.0 Initial version
|
||||
@@ -44,7 +45,7 @@ if (not defined $opts{ihx_path}) {
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: github_md2html 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: github_md2html 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2016-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.1.5 drop superfluous exists for $opts
|
||||
# 2018-12-18 1089 1.1.4 add and use bailout
|
||||
# 2018-10-19 1057 1.1.3 add --verbose; don't list up-to-date files anymore
|
||||
# 2018-07-02 1033 1.1.2 use non-greedy match in -stand code
|
||||
@@ -34,7 +35,7 @@ my $url_css_ghmdbody = "https://wfjm.github.io/css/github-markdown-body.css";
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
autoflush STDOUT 1 if (-t STDOUT); # autoflush if output into term
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
@@ -77,7 +78,7 @@ sub do_request {
|
||||
for (my $nretry=0; $nretry<10; $nretry++) {
|
||||
my $res = $ua->request($req);
|
||||
|
||||
if (exists $opts{dump}) {
|
||||
if ($opts{dump}) {
|
||||
print "------------------------------------------------------\n";
|
||||
print "response for $ifile\n";
|
||||
print $res->as_string,"\n";
|
||||
@@ -115,7 +116,7 @@ sub do_request {
|
||||
sub do_md2html {
|
||||
my ($ifile) = @_;
|
||||
my $ofile = "$ifile.html";
|
||||
my $doit = exists $opts{force} || (not -e $ofile);
|
||||
my $doit = $opts{force} || (not -e $ofile);
|
||||
|
||||
unless ($doit) {
|
||||
# -M returns <script_start_time> - <file_modify_time> in fractional days
|
||||
@@ -166,7 +167,7 @@ sub do_md2html {
|
||||
$req->content($idata);
|
||||
}
|
||||
|
||||
if (exists $opts{dump}) {
|
||||
if ($opts{dump}) {
|
||||
print "------------------------------------------------------\n";
|
||||
print "request for $ifile\n";
|
||||
print $req->as_string,"\n";
|
||||
@@ -177,7 +178,7 @@ sub do_md2html {
|
||||
|
||||
my $html = $res->decoded_content;
|
||||
|
||||
if (exists $opts{standalone}) {
|
||||
if ($opts{standalone}) {
|
||||
$html =~ s{<a(.*?)href="(.+?)"}{ # non-greedy matches !!
|
||||
my $hopt = $1;
|
||||
my $href = "$2";
|
||||
@@ -185,15 +186,15 @@ sub do_md2html {
|
||||
if ($href =~ m|^(.+\.md)(#.*)?$|) {
|
||||
$href = $1 . '.html';
|
||||
$href .= $2 if defined $2;
|
||||
print " hmap: $href\n" if exists $opts{trace};
|
||||
print " hmap: $href\n" if $opts{trace};
|
||||
} else {
|
||||
if (-d "$ifile_path/$href") {
|
||||
$href =~ s|/$||; # drop trailing '/'
|
||||
if (-r "$ifile_path/$href/README.md") {
|
||||
$href .= '/README.md.html';
|
||||
print " dmap: $href: ok\n" if exists $opts{trace};
|
||||
print " dmap: $href: ok\n" if $opts{trace};
|
||||
} else {
|
||||
print " dmap: $href: skipped\n" if exists $opts{trace};
|
||||
print " dmap: $href: skipped\n" if $opts{trace};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: ldadump 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: ldadump 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.0.2 drop superfluous exists for $opts
|
||||
# 2019-04-19 1133 1.0.1 better -trec format of start address record
|
||||
# 2019-04-13 1131 1.0 Initial version
|
||||
#
|
||||
@@ -20,7 +21,7 @@ my %opts = ();
|
||||
GetOptions(\%opts, "help", "lsm", "tbyt", "trec")
|
||||
or bailout("bad command options");
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: svn_set_ignore 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: svn_set_ignore 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2007-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Vers Comment
|
||||
# 2019-07-13 1189 1.2.3 drop superfluous exists for $opts
|
||||
# 2018-12-18 1089 1.2.2 add and use bailout
|
||||
# 2017-05-27 899 1.2.1 check svn:ignore existance before reading it
|
||||
# 2016-12-17 821 1.2 use .gitignore rather .cvsignore
|
||||
@@ -62,7 +63,7 @@ sub do_dir {
|
||||
if (not exists $ignores{$d}) {
|
||||
$ignores{$d} = ();
|
||||
if (-r "$d/.gitignore") {
|
||||
print "read $d/.gitignore\n" if exists $opts{trace};
|
||||
print "read $d/.gitignore\n" if $opts{trace};
|
||||
open (CVSIG, "$d/.gitignore")
|
||||
or bailout("failed to read '$d/.gitignore': $!");
|
||||
while (<CVSIG>) {
|
||||
@@ -70,7 +71,7 @@ sub do_dir {
|
||||
next if /^\s*$/; # ignore empty or space only lines
|
||||
next if /^#/; # ignore comments
|
||||
push @{$ignores{$d}}, $_;
|
||||
print " $_\n" if exists $opts{trace};
|
||||
print " $_\n" if $opts{trace};
|
||||
}
|
||||
close (CVSIG);
|
||||
}
|
||||
@@ -118,7 +119,7 @@ sub do_dir {
|
||||
print "new svn:ignore:\n";
|
||||
print " ", join("\n ",@new_ipat),"\n";
|
||||
|
||||
if (not exists $opts{"dry-run"}) {
|
||||
if (not $opts{"dry-run"}) {
|
||||
open (TMP, ">/tmp/svn_set_ignore_$$")
|
||||
or bailout("failed to open tmp file: $1");
|
||||
print TMP join("\n",@new_ipat),"\n";
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: tap2file 1180 2019-07-08 15:46:59Z mueller $
|
||||
# $Id: tap2file 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.0.4 drop superfluous exists for $opts
|
||||
# 2019-07-08 1180 1.0.3 BUGFIX in rlmax calculation; add -v option
|
||||
# 2018-12-18 1089 1.0.2 add and use bailout
|
||||
# 2015-06-03 686 1.0.1 add print_usage; cleanups
|
||||
@@ -24,7 +25,7 @@ my %opts = ();
|
||||
GetOptions(\%opts, "pref=s", "v", "help")
|
||||
or bailout("bad command options");
|
||||
|
||||
if (scalar(@ARGV) == 0 || exists $opts{help}) {
|
||||
if (scalar(@ARGV) == 0 || $opts{help}) {
|
||||
print_usage();
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: tmuconv 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: tmuconv 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2008-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.1.4 drop superfluous exists for $opts
|
||||
# 2018-12-18 1089 1.1.3 add and use bailout
|
||||
# 2018-10-05 1053 1.1.2 use 'ca.*' instead of 'sy.*' fields
|
||||
# 2015-11-01 712 1.1.1 BUGFIX: fix '.' handling for br/sob instructions
|
||||
@@ -435,7 +436,7 @@ my %pdp11_regs = ( # use simh naming convention
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
@@ -557,7 +558,7 @@ sub do_file {
|
||||
next;
|
||||
}
|
||||
|
||||
@val_curr_text = @val_curr if exists $opts{dump} || exists $opts{cdump};
|
||||
@val_curr_text = @val_curr if $opts{dump} || $opts{cdump};
|
||||
|
||||
my $cyc_curr = int $val_curr[0];
|
||||
my $cyc_str = sprintf "%8d", $cyc_curr;
|
||||
@@ -577,7 +578,7 @@ sub do_file {
|
||||
my $ibreq_we = 0;
|
||||
my $ibreq_act = 0;
|
||||
|
||||
if (exists $opts{dump} || exists $opts{cdump}) {
|
||||
if ($opts{dump} || $opts{cdump}) {
|
||||
my @val_change;
|
||||
my $any_change;
|
||||
|
||||
@@ -587,16 +588,16 @@ sub do_file {
|
||||
$any_change |= $change;
|
||||
}
|
||||
|
||||
if (exists $opts{dump} || $any_change) {
|
||||
if ($opts{dump} || $any_change) {
|
||||
printf "cycle $cyc_str %s", "-" x 32;
|
||||
if ($notfirst && exists $opts{cdump}) {
|
||||
if ($notfirst && $opts{cdump}) {
|
||||
printf " (%d)",$cyc_curr-$change_cyc;
|
||||
}
|
||||
print "\n";
|
||||
|
||||
for (my $i=1; $i<scalar(@val_curr); $i++) {
|
||||
my $oper = $val_change[$i] ? "<=" : " =";
|
||||
if (exists $opts{dump} || $val_change[$i]) {
|
||||
if ($opts{dump} || $val_change[$i]) {
|
||||
printf " %-16s:%s %s %s\n", $var_name[$i], $var_type[$i],
|
||||
$oper, $val_curr_text[$i];
|
||||
}
|
||||
@@ -608,7 +609,7 @@ sub do_file {
|
||||
# handle t_id
|
||||
# uses cycles with dp_ireg_we = '1'
|
||||
#
|
||||
if (exists $opts{t_id} and $notfirst) {
|
||||
if ($opts{t_id} and $notfirst) {
|
||||
if ($val_curr[$ind_dp_ireg_we_last]) {
|
||||
my $pc = $val_curr[$ind_dp_pc] - 2;
|
||||
my $psw = $val_curr[$ind_dp_psw];
|
||||
@@ -630,7 +631,7 @@ sub do_file {
|
||||
# handle t_ru
|
||||
# uses cycles with dp_gpr_we = '1'
|
||||
#
|
||||
if (exists $opts{t_ru}) {
|
||||
if ($opts{t_ru}) {
|
||||
if ($val_curr[$ind_dp_gpr_we]) {
|
||||
my $adst = $val_curr[$ind_dp_gpr_adst];
|
||||
my $mode = $val_curr[$ind_dp_gpr_mode];
|
||||
@@ -671,7 +672,7 @@ sub do_file {
|
||||
# vm_emsres_ack_w = '1'
|
||||
# vm_emsreq_cancel = '1'
|
||||
#
|
||||
if (exists $opts{t_em}) {
|
||||
if ($opts{t_em}) {
|
||||
if ($val_curr[$ind_vm_emmreq_req]) {
|
||||
$emreq_cyc = $cyc_curr;
|
||||
$emreq_str = sprintf "%s %s %8.8o",
|
||||
@@ -745,7 +746,7 @@ sub do_file {
|
||||
# sy_ibsres_ack = '1'
|
||||
# vm_ibsres_busy '1' -> '0' transition
|
||||
#
|
||||
if (exists $opts{t_ib}) {
|
||||
if ($opts{t_ib}) {
|
||||
if ($val_curr[$ind_vm_ibmreq_re] || $val_curr[$ind_vm_ibmreq_we]) {
|
||||
my $addr_str = sprintf "%6.6o", $val_curr[$ind_vm_ibmreq_addr];
|
||||
$ibreq_cyc = $cyc_curr;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: vbomconv 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: vbomconv 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2007-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.18.1 drop superfluous exists for $opts
|
||||
# 2018-11-09 1066 1.18 add and use bailout; add @tcl
|
||||
# 2016-08-28 804 1.17.3 xsim work dir now xsim.<mode>.<stem>
|
||||
# 2016-07-02 782 1.17.2 add VBOMCONV_GHDL_OPTS and VBOMCONV_GHDL_GCOV
|
||||
@@ -125,7 +126,7 @@ my $has_unisim; # @lib:unisim seen or implied
|
||||
my $has_unimacro; # @lib:unimacro seen
|
||||
my $has_simprim; # @lib:simprim seen or implied
|
||||
my $sim_mode = 'bsim';
|
||||
my $do_trace = exists $opts{trace};
|
||||
my $do_trace = $opts{trace};
|
||||
my $level = 0; # vbom nesting level
|
||||
my $xst_writevhdl = 1;
|
||||
my $xlpath=$opts{xlpath};
|
||||
@@ -152,7 +153,7 @@ $is_veri = $xsim_lang eq 'verilog';
|
||||
|
||||
autoflush STDOUT 1; # autoflush, so nothing lost on exec later
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
@@ -329,7 +330,7 @@ if ($do_trace) {
|
||||
|
||||
# --ghdl_a -- ghdl analysis command ----------------------------------
|
||||
|
||||
if (exists $opts{ghdl_a} || exists $opts{ghdl_a_cmd}) {
|
||||
if ($opts{ghdl_a} || $opts{ghdl_a_cmd}) {
|
||||
if ($no_xlpath && ($has_unisim || $has_unimacro || $has_simprim) ) {
|
||||
print STDERR "vbomconv-E: --xlpath required with ghdl_a or ghdl_a_cmd";
|
||||
exit 1;
|
||||
@@ -346,7 +347,7 @@ if (exists $opts{ghdl_a} || exists $opts{ghdl_a_cmd}) {
|
||||
$cmd .= " ${ghdl_opts}";
|
||||
$cmd .= " $file";
|
||||
print "$cmd\n";
|
||||
if (exists $opts{ghdl_a}) {
|
||||
if ($opts{ghdl_a}) {
|
||||
my $wrc = system "/bin/sh", "-c", $cmd;
|
||||
if ($wrc != 0) {
|
||||
my $rc = int($wrc/256);
|
||||
@@ -365,7 +366,7 @@ if (exists $opts{ghdl_a} || exists $opts{ghdl_a_cmd}) {
|
||||
|
||||
# --ghdl_i -- ghdl inspection command --------------------------------
|
||||
|
||||
if (exists $opts{ghdl_i} || exists $opts{ghdl_i_cmd}) {
|
||||
if ($opts{ghdl_i} || $opts{ghdl_i_cmd}) {
|
||||
my $workdir = "ghdl.${sim_mode}";
|
||||
my %ghdl_work;
|
||||
|
||||
@@ -400,7 +401,7 @@ if (exists $opts{ghdl_i} || exists $opts{ghdl_i_cmd}) {
|
||||
|
||||
if ($nfile) {
|
||||
print "$cmd\n";
|
||||
if (exists $opts{ghdl_i}) {
|
||||
if ($opts{ghdl_i}) {
|
||||
exec "/bin/sh", "-c", $cmd or
|
||||
bailout("failed to exec /bin/sh -c $cmd: $!");
|
||||
}
|
||||
@@ -416,7 +417,7 @@ if (exists $opts{ghdl_i} || exists $opts{ghdl_i_cmd}) {
|
||||
# If used from make with proper dependencies, this will just do
|
||||
# the right thing.
|
||||
|
||||
if (exists $opts{ghdl_m} || exists $opts{ghdl_m_cmd} ) {
|
||||
if ($opts{ghdl_m} || $opts{ghdl_m_cmd} ) {
|
||||
my $workdir = "ghdl.${sim_mode}";
|
||||
my $cmd = "";
|
||||
|
||||
@@ -449,7 +450,7 @@ if (exists $opts{ghdl_m} || exists $opts{ghdl_m_cmd} ) {
|
||||
}
|
||||
$cmd .= " $top";
|
||||
print "$cmd\n";
|
||||
if (exists $opts{ghdl_m}) {
|
||||
if ($opts{ghdl_m}) {
|
||||
exec "/bin/sh", "-c", $cmd or
|
||||
bailout("failed to exec /bin/sh -c $cmd: $!");
|
||||
}
|
||||
@@ -457,7 +458,7 @@ if (exists $opts{ghdl_m} || exists $opts{ghdl_m_cmd} ) {
|
||||
|
||||
# --xst_prj ----------------------------------------------------------
|
||||
|
||||
if (exists $opts{xst_prj}) {
|
||||
if ($opts{xst_prj}) {
|
||||
## $xst_writevhdl = 0; # needed in case "-use_new_parser yes" used
|
||||
foreach (@srcfile_list) {
|
||||
if ($xst_writevhdl) {
|
||||
@@ -470,7 +471,7 @@ if (exists $opts{xst_prj}) {
|
||||
|
||||
# --isim_prj ---------------------------------------------------------
|
||||
|
||||
if (exists $opts{isim_prj}) {
|
||||
if ($opts{isim_prj}) {
|
||||
foreach (@srcfile_list) {
|
||||
print "vhdl work $_\n";
|
||||
}
|
||||
@@ -478,7 +479,7 @@ if (exists $opts{isim_prj}) {
|
||||
|
||||
# --vsyn_prj ---------------------------------------------------------
|
||||
|
||||
if (exists $opts{vsyn_prj}) {
|
||||
if ($opts{vsyn_prj}) {
|
||||
# determine source and simulation file sets
|
||||
my @fl_syn;
|
||||
my @fl_sim;
|
||||
@@ -583,7 +584,7 @@ if (exists $opts{vsyn_prj}) {
|
||||
|
||||
# --vsim_prj ---------------------------------------------------------
|
||||
|
||||
if (exists $opts{vsim_prj}) {
|
||||
if ($opts{vsim_prj}) {
|
||||
# Note: use a separate workdir for each sim_mode and each model (given
|
||||
# by stem). This allows to have all co-existant, and to delete the workdir
|
||||
# each time one of them is re-build.
|
||||
@@ -717,7 +718,7 @@ if (exists $opts{vsim_prj}) {
|
||||
|
||||
# --dep_ghdl ---------------------------------------------------------
|
||||
|
||||
if (exists $opts{dep_ghdl}) {
|
||||
if ($opts{dep_ghdl}) {
|
||||
|
||||
print "#\n";
|
||||
print "$stem : $stem.dep_ghdl\n";
|
||||
@@ -776,7 +777,7 @@ if (exists $opts{dep_ghdl}) {
|
||||
|
||||
# --dep_xst ----------------------------------------------------------
|
||||
|
||||
if (exists $opts{dep_xst}) {
|
||||
if ($opts{dep_xst}) {
|
||||
print "#\n";
|
||||
print "$stem.ngc : $stem.dep_xst\n";
|
||||
print "#\n";
|
||||
@@ -801,7 +802,7 @@ if (exists $opts{dep_xst}) {
|
||||
|
||||
# --dep_isim ---------------------------------------------------------
|
||||
|
||||
if (exists $opts{dep_isim}) {
|
||||
if ($opts{dep_isim}) {
|
||||
my $stem_isim = $stem . "_ISim";
|
||||
|
||||
$stem_isim =~ s/_ssim_ISim$/_ISim_ssim/ if ($sim_mode eq 'ssim');
|
||||
@@ -846,7 +847,7 @@ if (exists $opts{dep_isim}) {
|
||||
|
||||
# --dep_vsyn ---------------------------------------------------------
|
||||
|
||||
if (exists $opts{dep_vsyn}) {
|
||||
if ($opts{dep_vsyn}) {
|
||||
print "#\n";
|
||||
print "$stem.bit : $stem.dep_vsyn\n";
|
||||
print "#\n";
|
||||
@@ -870,7 +871,7 @@ if (exists $opts{dep_vsyn}) {
|
||||
|
||||
# --dep_vsim ---------------------------------------------------------
|
||||
|
||||
if (exists $opts{dep_vsim}) {
|
||||
if ($opts{dep_vsim}) {
|
||||
my $stem_vsim = $stem . "_XSim";
|
||||
|
||||
$stem_vsim =~ s/_ssim_XSim$/_XSim_ssim/ if ($sim_mode eq 'ssim');
|
||||
@@ -1063,13 +1064,13 @@ if (exists $opts{vsyn_export} or
|
||||
|
||||
# --get_top ----------------------------------------------------------
|
||||
|
||||
if (exists $opts{get_top}) {
|
||||
if ($opts{get_top}) {
|
||||
print "$top\n";
|
||||
}
|
||||
|
||||
# --flist ------------------------------------------------------------
|
||||
|
||||
if (exists $opts{flist}) {
|
||||
if ($opts{flist}) {
|
||||
|
||||
my @flist;
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: xise_msg_filter 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: xise_msg_filter 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2011-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.1.4 drop superfluous exists for $opts
|
||||
# 2018-12-18 1089 1.1.3 add and use bailout
|
||||
# 2015-01-30 640 1.1.2 renamed from isemsg_filter
|
||||
# 2014-02-01 550 1.1.1 rename --pack to --pacc (accepted is meant here)
|
||||
@@ -35,7 +36,7 @@ my $misscnt = 0;
|
||||
|
||||
autoflush STDOUT 1; # autoflush, so nothing lost on exec later
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
@@ -87,7 +88,7 @@ foreach (@flist) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($ackcnt && exists $opts{pacc}) {
|
||||
if ($ackcnt && $opts{pacc}) {
|
||||
print "Accepted messages of type [$type] from $lognam:\n";
|
||||
foreach (@flist) {
|
||||
next if $_->[1] == 0;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: xviv_msg_filter 1172 2019-06-29 07:27:24Z mueller $
|
||||
# $Id: xviv_msg_filter 1189 2019-07-13 16:41:07Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2016-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-07-13 1189 1.1.4 drop superfluous exists for $opts
|
||||
# 2018-12-22 1091 1.1.3 add count-only rules; add -pcnt; add [bit] handling
|
||||
# 2018-11-18 1072 1.1.2 display INFO Common 17-14 'further message disabled'
|
||||
# 2018-08-11 1039 1.1.1 allow {yyyy.x} tags (in addition to ranges)
|
||||
@@ -48,7 +49,7 @@ my $retrobase = $ENV{RETROBASE};
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
if (exists $opts{help}) {
|
||||
if ($opts{help}) {
|
||||
print_help();
|
||||
exit 0;
|
||||
}
|
||||
@@ -157,7 +158,7 @@ foreach my $f (@flist) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($ackcnt && exists $opts{pacc}) {
|
||||
if ($ackcnt && $opts{pacc}) {
|
||||
print "Accepted messages for type [$type] from $lognam:\n";
|
||||
foreach my $f (@flist) {
|
||||
next if $$f{cnt} == 0;
|
||||
|
||||
Reference in New Issue
Block a user