From 77473114b3c7e45780f76c4db32f280733ef6d73 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 13 Jun 2019 15:37:47 +0200 Subject: [PATCH 1/3] Add DFKFB numbers from a real KL10. --- doc/dfkfb.txt | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/doc/dfkfb.txt b/doc/dfkfb.txt index 7feb187..1146623 100644 --- a/doc/dfkfb.txt +++ b/doc/dfkfb.txt @@ -51,6 +51,65 @@ Still, it's fun to see how many multiples of a real KL you can run at. THE REAL THING ============== +These numbers are from the 1978 EK-0KL20-IN-001 "KL10-Based +DECSYSTEM-20 Installation Manual", pages 10-27 and 10-28. + +1 - BASIC CLOCK IS 40 NS. +2 - INDEXING TAKES 40 NS. +3 - INDIRECT TAKES 280 NS. +4 - INDEXING AND INDIRECT TAKES 320 NS. +5 - MOVEI TAKES 320 NS. +6 - MOVE FROM AC TAKES 440 NS. +7 - MOVE FROM MEMORY TAKES 480 NS. +8 - HRR FROM MEMORY TAKES 520 NS. +9 - STEOM 0 TAKES 560 NS. +10 - JRST TAKES 360 NS. +11 - JSR TAKES 680 NS. +12 - PUSHJ TAKES 840 NS. +13 - ADD FROM MEMORY TAKES 520 NS. +14 - MUL (9 ADD/SUB - 18 SHIFTS) TAKES 2.52 uS. +15 - DIV TAKES 5.58 uS. +16 - FIX A FLOATING POINT ONE TAKES 1.04 uS. +17 - FLTR AN INTERGER ONE TAKES 1.84 uS. +18 - FAD (1 RIGHT SHIFT) TAKES 1.88 uS. +19 - FAD (8 SHIFT RIGHT - 3 LEFT) TAKES 2.16 uS. +20 - FMP (7 ADD/SUB - 14 SHIFTS) TAKES 2.80 uS. +21 - FDV TAKES 5.72 uS. +22 - DMOVE FROM MEMORY TAKES 880 NS. +23 - DFAD (1 RIGHT SHIFT) TAKES 2.44 uS. +24 - DFAD (8 SHIFT RIGHT - 1 LEFT) TAKES 2.44 uS. +25 - DFMP (7 ADD/SUB - 32 SHIFTS) TAKES 4.92 uS. +26 - DFDV TAKES 10.32 uS. +27 - CONO PI TAKES 1.92 uS. +28 - CONI PI TAKES 3.36 uS. +29 - DATAO APR TAKES 1.56 uS. +30 - DATAI APR TAKES 1.76 uS. +31 - MOVE TO MEMORY TAKES 680 NS. +32 - LOGICAL SHIFT (35 PLACES LEFT) TAKES 640 NS. +33 - LOGICAL SHIFT (35 PLACES RIGHT) TAKES 760 NS. +34 - LOGICAL SHIFT COMBINED (71 PLACES LEFT) TAKES 1.12 uS. +35 - LOGICAL SHIFT COMBINED (71 PLACES RIGHT) TAKES 1.16 uS. +36 - INCREMENT BYTE POINTER TAKES 1.00 uS. +37 - INCREMENT AND LOAD BYTE TAKES 1.44 uS. +38 - INCREMENT AND DEPOSIT BYTE TAKES 1.80 uS. +39 - JFCL TAKES 880 NS. +40 - CAI TAKES 480 NS. +41 - JUMP TAKES 480 NS. +42 - CAM TAKES 600 NS. +43 - EQV AC TO AC TAKES 480 NS. +44 - EQV MEMORY TO AC TAKES 520 NS. +45 - SETOB TAKES 680 NS. +46 - AOS TO MEMORY TAKES 840 NS. +47 - EXCHANGE AN AC WITH AN AC TAKES 640 NS. +48 - EXCHANGE AN AC WITH MEMORY TAKES 840 NS. +49 - EXECUTE TAKES 640 NS. +50 - BLT MEMORY TO MEMORY TAKES 1.92 uS. +51 - BLT AC TO MEMORY TAKES 1.88 mS. +52 - DATAI TAKES 10.00 uS. +53 - DATAO TAKES 10.00 uS. + +KLH's original text follows: + Unfortunately, although I have output logs of DFKFB runs for a variety of platforms, I do not have one for a real KL10 itself! Hopefully someone will be able to contribute this from their archives. From b41d4b8ac727dc690e0e91157ff782db4a5ad90b Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Mon, 24 Feb 2020 14:31:51 +0100 Subject: [PATCH 2/3] Use PKG_CHECK_MODULES to locate libusb-1.0. This works better on FreeBSD. --- .gitignore | 1 + .travis.yml | 2 +- autogen.sh | 1 + configure.ac | 15 ++++++--------- mk/top.mk | 4 ++-- src/dvlites.c | 2 +- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 1d68a27..ecc08bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /configure +/aclocal.m4 bld/*/*.h bld/*/*.o bld/*/dpimp diff --git a/.travis.yml b/.travis.yml index f513cc7..e2271bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: c dist: trusty sudo: required -install: sudo apt-get install libusb-1.0-0-dev +install: sudo apt-get install libusb-1.0-0-dev pkg-config script: - ./autogen.sh - mkdir tmp diff --git a/autogen.sh b/autogen.sh index 974f62e..ff47de6 100755 --- a/autogen.sh +++ b/autogen.sh @@ -19,6 +19,7 @@ builddir=$(pwd) cd "$srcdir" srcdir=$(pwd) +aclocal # creates aclocal.m4 from configure.ac autoconf # creates configure from configure.ac autoheader # creates src/config.h.in from configure.ac diff --git a/configure.ac b/configure.ac index 5047746..66e8b35 100644 --- a/configure.ac +++ b/configure.ac @@ -103,15 +103,10 @@ AC_CHECK_FUNC([nanosleep], case "${need_libusb}" in yes) # Check if libusb-1.0 is present, otherwise fail. - # CPULIBS is for libraries only needed by the CPU, not by other programs. - SAVE_LIBS="$LIBS" - LIBS="" - AC_CHECK_LIB([usb-1.0], [libusb_get_device_descriptor], - [], - [AC_MSG_ERROR([Lights require libusb-1.0, which I could not find.])] - ) - CPULIBS="$LIBS" - LIBS="$SAVE_LIBS" + PKG_CHECK_MODULES([libusb], [libusb-1.0], + [AC_DEFINE([HAVE_LIBUSB_1_0], [1], + [Define if you have libusb-1.0.])], + [AC_MSG_ERROR([Lights require libusb-1.0, which I could not find.])]) ;; esac @@ -287,6 +282,8 @@ AC_SUBST([CPULIBS]) AC_SUBST([NETLIBS]) AC_SUBST([MAKEFILE], [Makefile]) AC_SUBST([CENVFLAGS]) +AC_SUBST([libusb_CFLAGS]) +AC_SUBST([libusb_LIBS]) # ------------------------------------------------------------------------- # Output section. State which files are going to be constructed. diff --git a/mk/top.mk b/mk/top.mk index 46288a3..e6b84c5 100644 --- a/mk/top.mk +++ b/mk/top.mk @@ -18,14 +18,14 @@ SRC = @top_srcdir@/src BLDSRC = @top_builddir@/src CC = @CC@ -CFLAGS = -c @CFLAGS@ +CFLAGS = -c @CFLAGS@ @libusb_CFLAGS@ CPPFLAGS = @CPPFLAGS@ -I$(BLDSRC) -I$(SRC) CFLAGS_LINT = -ansi -pedantic -Wall -Wshadow \ -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wredundant-decls LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ -CPULIBS = @CPULIBS@ +CPULIBS = @CPULIBS@ @libusb_LIBS@ NETLIBS = @NETLIBS@ prefix = @prefix@ diff --git a/src/dvlites.c b/src/dvlites.c index fa1cbcb..3101bb3 100644 --- a/src/dvlites.c +++ b/src/dvlites.c @@ -34,7 +34,7 @@ static int decosfcclossage; #if KLH10_DEV_LITES /* Moby conditional for entire file */ #if HAVE_LIBUSB_1_0 -#include +#include #endif /* * For now, assume that having is equivalent to having From 2f478c2df2151145981f283923ff3d50c84e1261 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Mon, 24 Feb 2020 15:16:52 +0100 Subject: [PATCH 3/3] FreeBSD build on Cirrus CI. --- .cirrus.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000..14eec45 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,16 @@ +env: + CIRRUS_CLONE_DEPTH: 1 + ARCH: amd64 + +task: + freebsd_instance: + image: freebsd-12-0-release-amd64 + install_script: + - pkg upgrade -y + - pkg install -y gmake pkgconf autotools + script: + - ./autogen.sh + - mkdir tmp + - cd tmp + - ../configure --enable-lights + - gmake -C bld-ks-its