1
0
mirror of https://github.com/wfjm/w11.git synced 2026-05-05 07:34:43 +00:00

- added RH70/RP/RM big disk support

- many cleanups
This commit is contained in:
Walter F.J. Mueller
2015-05-14 17:00:36 +00:00
parent e91847f8db
commit 4a032e9436
247 changed files with 11301 additions and 3449 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
# $Id: asm-11 575 2014-07-27 20:55:41Z mueller $
# $Id: asm-11 659 2015-03-22 23:15:51Z mueller $
#
# Copyright 2013-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
@@ -506,7 +506,7 @@ sub parse_line {
printf "-- parse: '$line'\n" if $opts{tparse} || $opts{ttoken};
# quit if illegal character found (non 7 bit ascii in asm-11)
# quit if invalid character found (non 7 bit ascii in asm-11)
foreach my $c (@{$l{cl}}) {
if (ord($c) > 127) {
add_err(\%l, 'I');

View File

@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
# $Id: create_disk 562 2014-06-15 17:23:18Z mueller $
# $Id: create_disk 679 2015-05-13 17:38:46Z mueller $
#
# Copyright 2013-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
@@ -14,6 +14,7 @@
#
# Revision History:
# Date Rev Version Comment
# 2015-04-06 665 1.1.1 add alias RM03 (for RM02) and RP05 (for RP04)
# 2014-06-14 562 1.1 BUGFIX: repair --boot; add RM02,RM05,RP04,RP07
# 2013-05-20 521 1.0 First draft
#
@@ -69,6 +70,10 @@ if (-e $fnam) {
}
my $typ = uc($opts{typ});
$typ = "RM02" if defined $typ && $typ eq "RM03"; # RM03 is equivalent to RM02
$typ = "RP04" if defined $typ && $typ eq "RP05"; # RM05 is equivalent to RP04
unless (defined $typ && exists $disktype{$typ}) {
print STDERR "create_disk-E: no or invalid --typ specification, use --help\n";
exit 1;
@@ -213,12 +218,12 @@ sub do_boot {
$buf .= "++======================================++\r\n";
$buf .= "\r\n";
$buf .= "Disk image created with 'create_disk --typ=$typ':\r\n";
$buf .= sprintf " number of cylinders: %6d\r\n", $cyl;
$buf .= sprintf " tracks per cylinder: %6d\r\n", $hd;
$buf .= sprintf " sectors per track: %6d\r\n", $sec;
$buf .= sprintf " block size: %6d\r\n", $bps;
$buf .= sprintf " total number of sectors: %6d\r\n", $nblk;
$buf .= sprintf " capacity in kByte: %6d\r\n", $cap/1024;
$buf .= sprintf " number of cylinders: %7d\r\n", $cyl;
$buf .= sprintf " tracks per cylinder: %7d\r\n", $hd;
$buf .= sprintf " sectors per track: %7d\r\n", $sec;
$buf .= sprintf " block size: %7d\r\n", $bps;
$buf .= sprintf " total number of sectors:%7d\r\n", $nblk;
$buf .= sprintf " capacity in kByte: %7d\r\n", $cap/1024;
$buf .= "\r\n";
$buf .= "CPU WILL HALT\r\n";
$buf .= "\r\n";
@@ -260,6 +265,10 @@ sub print_help {
($disktype{$typ}{bad} ? 'yes' : ' no');
}
print "\n";
print " RM03 is accepted as an alias for RM02 (same capacity)\n";
print " RP05 is accepted as an alias for RP04 (same capacity)\n";
print "\n";
print "currently supported initialization patterns:\n";
print " zero all zero (the default anyway if no -ini given)\n";

View File

@@ -1,14 +1,23 @@
#!/bin/bash
# $Id: tbrun_tbwrri 641 2015-02-01 22:12:15Z mueller $
# $Id: tbrun_tbwrri 666 2015-04-12 21:17:54Z mueller $
#
# Copyright 2014- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
# Copyright 2014-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
# License disclaimer see LICENSE_gpl_v2.txt in $RETROBASE directory
#
# Revision History:
# Date Rev Version Comment
# 2015-04-11 666 1.1 add --fusp,--xon
# 2014-12-27 622 1.0 Initial version
#
chkval ()
{
if [[ $1 =~ --.* || $1 =~ -[a-z]* ]]; then
echo "tbrun_tbwrri-E: value forgotten prior to '$1'"
exit 1
fi
}
docmd ()
{
echo "$1"
@@ -26,40 +35,58 @@ optpack=""
optrri=""
optpcom=""
optcuff=""
optfusp=""
optxon=""
# handle options
while (( $# > 0 )) ; do
case $1 in
-dry|--dry) optdry=$1 ; shift 1 ;;
-lsuf|--lsuf) optlsuf=$2 ; shift 2 ;;
-stack|--stack) optstack=$2 ; shift 2 ;;
-ghw|--ghw) optghw=$2 ; shift 2 ;;
-tbw|--tbw) opttbw=$2 ; shift 2 ;;
-pack|--pack) optpack=$2 ; shift 2 ;;
-rri|--rri) optrri=$2 ; shift 2 ;;
-cuff|--cuff) optcuff=$1 ; shift 1 ;;
-pcom|--pcom) optpcom=$1 ; shift 1 ;;
-dry|--dry) optdry=$1 ; shift 1 ;;
-lsuf|--lsuf) optlsuf=$2 ; chkval $2 ; shift 2 ;;
-stack|--stack) optstack=$2 ; chkval $2 ; shift 2 ;;
-ghw|--ghw) optghw=$2 ; chkval $2 ; shift 2 ;;
-tbw|--tbw) opttbw=$2 ; chkval $2 ; shift 2 ;;
-pack|--pack) optpack=$2 ; chkval $2 ; shift 2 ;;
-rri|--rri) optrri=$2 ; chkval $2 ; shift 2 ;;
-cuff|--cuff) optcuff=$1 ; shift 1 ;;
-fusp|--fusp) optfusp=$1 ; shift 1 ;;
-xon|--xon) optxon=$1 ; shift 1 ;;
-pcom|--pcom) optpcom=$1 ; shift 1 ;;
-\?|-h*|--h*) opthelp=$1 ; shift 1 ;;
-*) echo "tbrun_tbwrri-E: invalid option '$1'"; exit 1 ;;
*) break;;
esac
done
# complain if no tbench defined
if (( $# == 0 )) ; then
if [[ -n "$opthelp" || $# -eq 0 ]] ; then
echo "Usage: tbrun_tbwrri [opts] testbench rricmds..."
echo " Options:"
echo " --dry dry run, print commands, don't execute"
echo " --lsuf suff use '_<suff>.log' as suffix for log file"
echo " --stack nnn use <nnn> as ghdl stack size"
echo " --ghw fname write ghw file with name '<fname>.ghw"
echo " --ghw fname write ghw file with name '<fname>.ghw'"
echo " --tbw opts append <opts> to tbw command"
echo " --pack plist add '--pack=<=plist>' option to ti_rri"
echo " --rri opts append <opts> to ti_rri command"
echo " --cuff use cuff and not serport"
echo " --fusp use 2nd serport"
echo " --xon use xon with 1st serport"
echo " --pcom print test comments"
exit 1
fi
# check that only one of --cuff --fusp or --xon given
ncfxcount=0
if [[ -n "$optcuff" ]] ; then ncfxcount=$(($ncfxcount+1)); fi
if [[ -n "$optfusp" ]] ; then ncfxcount=$(($ncfxcount+1)); fi
if [[ -n "$optxon" ]] ; then ncfxcount=$(($ncfxcount+1)); fi
if (( $ncfxcount > 1 )) ; then
echo "tbrun_tbwrri-E: only one of --cuff,-fusp,--xon allowed"
exit 1
fi
tbench=$1
shift 1
@@ -92,17 +119,48 @@ logfile="${tbenchname}${logsuff}.log"
cmd="time ti_rri --run=\"tbw $tbench -fifo"
if [[ -n "$opttbw" ]] ; then cmd+=" $opttbw"; fi
if [[ -n "$optstack" ]] ; then cmd+=" --stack-max-size=$optstack"; fi
if [[ -n "$optghw" ]] ; then cmd+=" --wave=$optghw.ghw"; fi
if [[ -n "$optghw" ]] ; then
if [[ "$optghw" != *.ghw ]]; then optghw="$optghw.ghw"; fi
cmd+=" --wave=$optghw";
fi
cmd+=" 2>&1 | ghdl_assert_filter\""
cmd+=" --fifo --logl=3"
# Note: the following ensurs that we always have 'fifo=,<options' with an
# empty first field (the default fifo name)
fifoopts=""
if [[ -n "$optxon" ]] ; then fifoopts+=",xon"; fi
if (( $ncfxcount > 0 )) ; then fifoopts+=",noinit"; fi
if [[ -n "$fifoopts" ]] ; then
cmd+=" --fifo=$fifoopts"
else
cmd+=" --fifo"
fi
cmd+=" --logl=3"
if [[ -n "$optpack" ]] ; then cmd+=" --pack=$optpack"; fi
if [[ -n "$optrri" ]] ; then cmd+=" $optrri"; fi
cmd+=" --"
if [[ -n "$optcuff" ]] ; then
cmd+=" \"rlc oob -sbdata 8 0x2\" \"rlc oob -sbdata 16 0x4\""
cmd+=" \"rlc oob -sbdata 8 0x4\"" # portsel = 0100 -> fx2
cmd+=" \"rlc oob -sbdata 16 0x4\"" # swi = 0100 -> fx2
fi
if [[ -n "$optfusp" ]] ; then
cmd+=" \"rlc oob -sbdata 8 0x1\"" # portsel = 0001 -> 2nd ser
cmd+=" \"rlc oob -sbdata 16 0x1\"" # swi = 0001 -> 2nd ser
fi
if [[ -n "$optxon" ]] ; then
cmd+=" \"rlc oob -sbdata 8 0x2\"" # portsel = 0010 -> 1st ser XON
cmd+=" \"rlc oob -sbdata 16 0x2\"" # swi = 0010 -> 1st ser XON
fi
if (( $ncfxcount > 0 )) ; then cmd+=" \"rlc init\""; fi
while (( $# > 0 )) ; do
cmd+=" "
if [[ $1 =~ " " ]] ; then cmd+="\""; fi

View File

@@ -1,11 +1,13 @@
#!/usr/bin/perl -w
# $Id: ti_w11 654 2015-03-01 18:45:38Z mueller $
# $Id: ti_w11 680 2015-05-14 13:29:46Z mueller $
#
# Copyright 2013-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
# License disclaimer see LICENSE_gpl_v2.txt in $RETROBASE directory
#
# Revision History:
# Date Rev Version Comment
# 2015-05-14 680 1.3.1 use now -f1,-f1e,-f2,-f2e (fx now f1e)
# 2015-04-13 667 1.3 rename -fu->-fc, add -f2,-fx; setup good defaults
# 2015-01-02 640 1.2.2 BUGFIX: allow 'M' unit in baud rates
# 2014-12-23 619 1.2.1 use -fifo tbw option for test bench starts
# 2014-07-13 570 1.2 BUGFIX: split options args into ti_rri opts and cmds
@@ -23,6 +25,7 @@ autoflush STDOUT 1; # autoflush, so nothing lost on exec later
my $sysbase = "$ENV{RETROBASE}/rtl/sys_gen/w11a";
my $opt_dry;
my $opt_b;
my $opt_io = '';
my $opt_f = '';
@@ -46,7 +49,11 @@ my @arglist;
while (scalar(@ARGV)) {
my $curarg = $ARGV[0];
if ($curarg =~ m{^-b$} ) { # -b
if ($curarg =~ m{^-dry$} ) { # -dry
$opt_dry = 1;
shift @ARGV;
} elsif ($curarg =~ m{^-b$} ) { # -b
$opt_b = 1;
shift @ARGV;
@@ -54,37 +61,43 @@ while (scalar(@ARGV)) {
$opt_tmu = 1;
shift @ARGV;
} elsif ($curarg =~ m{^-s3$} ) { # -s3
} elsif ($curarg =~ m{^-s3$} ) { # -s3 (use -f2 by default)
$opt_io = 'f';
$opt_f = '2';
$val_tb = $val_tb_s3;
shift @ARGV;
} elsif ($curarg =~ m{^-n2$} ) { # -n2
} elsif ($curarg =~ m{^-n2$} ) { # -n2 (use -fc by default)
$opt_io = 'f';
$opt_f = 'c';
$val_tb = $val_tb_n2;
shift @ARGV;
} elsif ($curarg =~ m{^-n3$} ) { # -n3
} elsif ($curarg =~ m{^-n3$} ) { # -n3 (use -fc by default)
$opt_io = 'f';
$opt_f = 'c';
$val_tb = $val_tb_n3;
shift @ARGV;
} elsif ($curarg =~ m{^-b4$} ) { # -b3
} elsif ($curarg =~ m{^-b3$} ) { # -b3 (use -f1x by default)
$opt_io = 'f';
$opt_f = '1x';
$val_tb = $val_tb_b3;
shift @ARGV;
} elsif ($curarg =~ m{^-n4$} ) { # -n4
} elsif ($curarg =~ m{^-n4$} ) { # -n4 (prim serport fine)
$opt_io = 'f';
$opt_f = '1';
$val_tb = $val_tb_n4;
shift @ARGV;
} elsif ($curarg =~ m{^-bn4$} ) { # -bn4
} elsif ($curarg =~ m{^-bn4$} ) { # -bn4 (prim serport fine)
$opt_io = 'f';
$opt_f = '1';
$val_tb = $val_tb_bn4;
shift @ARGV;
} elsif ($curarg =~ m{^-f(s\d?|u)$} ) { # -f[su]
} elsif ($curarg =~ m{^-f(c|1|1x|2|2x)$} ) { # -f..
$opt_f = $1;
shift @ARGV;
@@ -152,18 +165,20 @@ while (scalar(@ARGV)) {
#
# check that either -(s3|n2|n3|n4|bn4) or -t or -u given
# setup pi_rri options for either case
# setup options for either case
#
if ($opt_io eq 'f') {
push @arglist, '--fifo';
my $fifoopts = ",noinit"; # fifo always with deferred init
$fifoopts .= ",xon" if $opt_f eq 'x';
push @arglist, "--fifo=$fifoopts";
push @arglist, "--run=$val_tb";
} elsif ($opt_io eq 't') {
push @arglist, "--term=$val_term";
} elsif ($opt_io eq 'u') {
push @arglist, '--cuff';
} else {
print STDERR "ti_w11-E: neither -(s3|n2|n3|b3|n4|bn4) nor -t or -u specified\n";
print STDERR "ti_w11-E: neither -(s3|n2|n3|b3|n4|bn4) nor -t,-u specified\n";
print_usage();
exit 1;
}
@@ -187,12 +202,26 @@ if ($opt_io eq 'f') {
if ($opt_tmu) {
push @arglist, 'rlc oob -sbcntl 13 1';
}
if ($opt_f eq 'u') {
push @arglist, 'rlc oob -sbdata 8 0x2';
push @arglist, 'rlc oob -sbdata 16 0x4';
if ($opt_f eq 'c') {
push @arglist, 'rlc oob -sbdata 8 0x4'; # portsel = 0100 -> fx2
push @arglist, 'rlc oob -sbdata 16 0x4'; # swi = 0100 -> fx2
} elsif ($opt_f eq '1x') {
push @arglist, 'rlc oob -sbdata 8 0x2'; # portsel = 0010 -> 1st ser XON
push @arglist, 'rlc oob -sbdata 16 0x2'; # swi = 0010 -> 1st ser XON
} elsif ($opt_f eq '2') {
push @arglist, 'rlc oob -sbdata 8 0x1'; # portsel = 0001 -> 2nd ser
push @arglist, 'rlc oob -sbdata 16 0x1'; # swi = 0001 -> 2nd ser
} elsif ($opt_f eq '2x') {
push @arglist, 'rlc oob -sbdata 8 0x3'; # portsel = 0011 -> 2nd ser XON
push @arglist, 'rlc oob -sbdata 16 0x3'; # swi = 0011 -> 2nd ser XON
}
}
#
# --fifo always uses deferred init, so add a rlc init after the oob's
#
push @arglist, 'rlc init' if $opt_io eq 'f';
#
# initialize w11 cpu system
#
@@ -227,12 +256,16 @@ if ($tirri eq '' || ! -e $tirri) {
}
#
# print command file
# print command line
#
if (1) {
print 'ti_rri ', join (' ', map {(m{\s}) ? "\"$_\"" : $_} @arglist) , "\n";
}
#
# if dry run, stop here
#
exit 0 if $opt_dry;
#
# and do it
#
@@ -245,14 +278,18 @@ exit 1;
sub print_usage {
print "usage: ti_w11 <setup options> <ti_rri opts and cmds>...\n";
print " setup options for ghdl simulation runs:\n";
print " -b3 start tb_w11a_b3 simulation\n";
print " -b3 start tb_w11a_b3 simulation (default: -f1x)\n";
print " -n4 start tb_w11a_n4 simulation\n";
print " -bn4 start tb_w11a_br_n4 simulation\n";
print " -n3 start tb_w11a_n3 simulation\n";
print " -n2 start tb_w11a_n2 simulation\n";
print " -s3 start tb_w11a_s3 simulation\n";
print " -n3 start tb_w11a_n3 simulation (default: -fc)\n";
print " -n2 start tb_w11a_n2 simulation (default: -fc)\n";
print " -s3 start tb_w11a_s3 simulation (default: -f2)\n";
print " -f.. simulation communication options\n";
print " -fu use cuff data path\n";
print " -fc use fx2 data path (cuff)\n";
print " -f1 use 1st serport\n";
print " -f1x use 1st serport with xon\n";
print " -f2 use 2nd serport (fusp)\n";
print " -f2x use 2nd serport with xon\n";
print " -tmu activate trace and monitoring unit\n";
print " setup options for FPGA connects:\n";
print " -u use --cuff connect\n";

View File

@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# $Id: ticonv_pdpcp 646 2015-02-15 12:04:55Z mueller $
# $Id: ticonv_pdpcp 675 2015-05-08 21:05:08Z mueller $
#
# Copyright 2013-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
# Copyright 2013-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# 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
@@ -14,6 +14,8 @@
#
# Revision History:
# Date Rev Version Comment
# 2015-05-08 675 1.3.1 start/stop/suspend overhaul
# 2015-04-03 661 1.3 adopt to new stat checking and mask polarity
# 2014-12-27 622 1.2.1 use wmembe now
# 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
@@ -51,11 +53,16 @@ my $fnam = $ARGV[1];
my $tout = $opts{tout} || 10.;
my $cmax = $opts{cmax} || 6;
my $ref_sdef = 0x00; # by default check for 'hard' errors
my $msk_sdef = 0xf0; # ignore the status bits + attn flag
open IFILE, $fnam or die "failed to open '$fnam'";
print "set old_statvalue [rlc get statvalue]\n";
print "set old_statmask [rlc get statmask]\n";
print "\n";
print "rlc set statvalue 0x00\n";
print "rlc set statmask \$rlink::STAT_DEFMASK\n";
print "\n";
while (<IFILE>) {
chomp;
s/--.*//; # drop all -- style comments
@@ -94,8 +101,12 @@ while (<IFILE>) {
# .sdef s=ref[,msk] ------------------------------------------------
} elsif ($cmd =~ /^\.sdef\s+s=([01]+),?([01]*)$/) {
cmdlist_do();
$ref_sdef = oct("0b$1");
$msk_sdef = oct("0b$2");
my $ref_sdef = oct("0b$1");
my $msk_sdef = oct("0b$2");
$msk_sdef = 0 unless defined $msk_sdef; # nothing ignored if not defined
printf "rlc log \".sdef 0x%2.2x,0x%2.2x\"\n", $ref_sdef, $msk_sdef;
printf "rlc set statvalue 0x%2.2x\n", $ref_sdef;
printf "rlc set statmask 0x%2.2x\n", (0xff & ~$msk_sdef);
# .rlmon,.rbmon ----------------------------------------------------
} elsif ($cmd =~ /^\.(r[lb]mon)\s+(\d)$/) {
@@ -171,10 +182,10 @@ while (<IFILE>) {
next if $dat =~ m/^#/;
if ($dat =~ m/d=([0-7]+)/ ) {
push @data, "0$1";
push @mask, "0";
push @mask, "0177777";
} elsif ($dat =~ m/d=-/) {
push @data, "0";
push @mask, "0177777";
push @mask, "0";
$domask = 1;
} else {
exit 1;
@@ -194,13 +205,13 @@ while (<IFILE>) {
push @cmdlist, "-$1 0$2";
add_edata($');
# simple action commands: sta,sto,cont,step,rst --------------------
} elsif ($cmd =~ /^(sta|sto|cont|step|rst)$/) {
# simple action commands: sta,sto,step,cres,bres -------------------
} elsif ($cmd =~ /^(sta|sto|step|cres|bres)$/) {
my %cmdmap = (sta => 'start',
sto => 'stop',
cont => 'continue',
step => 'step',
rst => 'reset');
cres => 'creset',
bres => 'breset');
push @cmdlist, sprintf "-%s", $cmdmap{$1};
# wtgo -> wtcpu ----------------------------------------------------
@@ -230,6 +241,11 @@ while (<IFILE>) {
}
cmdlist_do();
print "\n";
print "rlc set statvalue \$old_statvalue\n";
print "rlc set statmask \$old_statmask\n";
exit 0;
#-------------------------------------------------------------------------------
@@ -246,7 +262,7 @@ sub cmdlist_do {
return unless scalar(@cmdlist);
# printf "$cpu cp \\\n";
printf "$cpu cp -estatdef 0x%2.2x 0x%2.2x \\\n", $ref_sdef, $msk_sdef;
print "$cpu cp \\\n";
while (scalar(@cmdlist)) {
print " ";
print shift @cmdlist;

View File

@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# $Id: tmuconv 334 2010-10-23 08:24:24Z mueller $
# $Id: tmuconv 676 2015-05-09 16:31:54Z mueller $
#
# Copyright 2008-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
# Copyright 2008-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# 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
@@ -55,7 +55,9 @@
# vm.ibsres.busy:b
# vm.ibsres.dout:o
# co.cpugo:b
# co.cpuhalt:b
# co.cpususp:b
# co.suspint:b
# co.suspext:b
# sy.emmreq.req:b
# sy.emmreq.we:b
# sy.emmreq.be:b
@@ -314,6 +316,28 @@ my %pdp11_regs = ( # use simh naming convention
177414=> "rk.mr ",
177416=> "rk.db ",
177060=> "xor.cs", # XOR Tester
176700=> "rpa.cs1",
176702=> "rpa.wc ",
176704=> "rpa.ba ",
176706=> "rpa.da ",
176710=> "rpa.cs2",
176712=> "rpa.ds ",
176714=> "rpa.er1",
176716=> "rpa.as ",
176720=> "rpa.la ",
176722=> "rpa.db ",
176724=> "rpa.mr1",
176726=> "rpa.dt ",
176730=> "rpa.sn ",
176732=> "rpa.of ",
176734=> "rpa.dc ",
176736=> "rpa.m13",
176740=> "rpa.m14",
176742=> "rpa.m15",
176744=> "rpa.ec1",
176746=> "rpa.ec2",
176750=> "rpa.bae",
176752=> "rpa.cs3",
176500=> "ti2.cs",
176502=> "ti2.bu",
176504=> "to2.cs",
@@ -797,20 +821,20 @@ sub code2mnemo {
$sign = "-";
}
return sprintf "$name .%s%d.", $sign, abs(2*$off);
} elsif ($type eq "sob") {
my $reg = ($code>>6) & 07;
my $off = $code & 077;
return sprintf "$name r%d,.-%d.", $reg, 2*$off;
} elsif ($type eq "trap") {
my $off = $code & 0377;
return sprintf "$name %3.3o", $off;
} elsif ($type eq "spl") {
my $off = $code & 07;
return sprintf "$name %d", $off;
} elsif ($type eq "ccop") {
my $cc = $code & 017;
return "nop" if ($cc == 0);
@@ -823,17 +847,17 @@ sub code2mnemo {
if ($code & 002) { $str .= $del . $name . "v", $del = "+" }
if ($code & 001) { $str .= $del . $name . "c", $del = "+" }
return $str;
} elsif ($type eq "jsr") {
my $reg = ($code>>6) & 07;
my $dst = $code & 077;
my $dst_str = regmod($dst);
return "$name r$reg,$dst_str";
} elsif ($type eq "mark") {
my $off = $code & 077;
return sprintf "$name %3.3o", $off;
} elsif ($type eq "rfpp") {
my $reg = ($code>>6) & 03;
my $dst = $code & 077;

View File

@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
# $Id: vbomconv 646 2015-02-15 12:04:55Z mueller $
# $Id: vbomconv 672 2015-05-02 21:58:28Z mueller $
#
# Copyright 2007-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
@@ -383,6 +383,7 @@ if (exists $opts{ghdl_m} || exists $opts{ghdl_m_cmd} ) {
# --xst_prj ----------------------------------------------------------
if (exists $opts{xst_prj}) {
## $xst_writevhdl = 0; # needed in case "-use_new_parser yes" used
foreach (@srcfile_list) {
if ($xst_writevhdl) {
print "vhdl work $_\n";