Wouter's BBC micro pages: 32016 2p

32016 power supply

Disk images (from non-original disks):

Benchmarks

I've had trouble following the instructions in the manuals which makes me unsure the disk images are all ok, as Copy and the Editor don't seem to work (*), but I might be doing something wrong. This means I can't at this time put together a disk with all utilities I want and I need to swap disks to compile and link. Anyway, I worked around the editor problem by transferring a few C programs I made in xemacs on FreeBSD, transferring them using bbccom (serial cable) to a BBC disk on one BBC micro, then compiling/linking the program on another BBC micro with the 32016 attached.

(*) Copy gives the error message that the file I want to copy alredy exists, I think it's just finding the files I want to copy as the OS seems to try all disks/surfaces whenever one wants to use/open a file. So, Copy :0.$.Edit-rif -to :3 doesn't work. Maybe the disc images above are 'installed' versions, not the original ones. I'll try to get hold of these uninstalled ones. Edit gave me the problem of a blank screen (or black on black text).

System: BBC model B, with dual 80 track floppy drive, 32016 2nd processor with 6MHz 32016 CPU (NS16032D-6), and FP coprocessor NS16081D-6, 1MB RAM

Run Basic: Put DISK 1 in the top drive, and at the * prompt (using the Pandora IO system, no booting into the full Panos OS), type Bas32 which loads the BBC basic for the 32016. HIMEM says 1046968, LOMEM 26575, cool :)

Example test program:

  10TIME=0
  20FOR N=0 TO 1000
  30Y=SIN(N)
  40NEXT
  50P.TIME/100

Times:

  BBC B: 25.45 s
  32016: 5.15 s

So the 32016 calculates about 200 sines/s in Basic.

Start Panos: Boot by putting DISK 1 in the top drive, then SHIFT+BREAK.

Creating a user disc for C programming: Put DISK 5 into the top drive, put a blank DFS formatted disc in the bottom drive, and enter the command InstDFS. Now, you will probably get many errors about files already being on the target disc (which they aren't) but that doesn't matter. Wait until that's done, the program will say 'verified system disc' (or something like that) and ask you to put another blank disc in the bottom drive. Just leave the (still) blank disc there, en press a key. All required programs will now be copied onto the disc although it was a very very slow process in my case. No idea why.

Results:

Compiling (put DISK 5 in the top drive, user disk with C programs etc. as created above and to which you may have added C programs with an editor or as I did, with a serial program, then enter cc flops) takes about 100 s.
Linking (put DISK 2 with the system utilities in the top drive, then link flops c,pas) takes another 60 seconds.
Execution takes about 10 seconds to load the program and whatever else is needed to start execution from disk (the system checks the top drive first it seems, which might be the main cause for this slow start, not checked yet).

To list a program, use: copy <file> -to vdu, e.g. copy cWorld-c -to vdu For f77, use:

  f77 <file>
  link <file> F77

Copying utilities from disk 0 to 1: copy :0.<file>.rif -to :1

The programs

1. Simple loop:

/* 32000 c - loop speed test */

#include <STDIO-h>
#include <MATH-h>

main()
{
	int i;
	float a,b,c,d;

	printf("WHS NS32016 loop test\n");


	a=1.24235426;
	b=2.525252;
	c=3.123532523;
	d=1.012857535;

	for (i=0; i<1000000; i++) {
	}
}

This is just to check what the integer loop adds to the times for the next two tests.

Executable size: 29332 bytes

Running time (without the 10s load time): ca. 12 seconds.
I started the timer when I saw the line "WHS NS32016 loop test" on the display.
For comparison, on an AMD 64 3000+, with FreeBSD 6.2 and compiling with GCC 3.4.6: I added a loop around this loop for an extra 10,000 times, which took ca. 12 s. This means that that machine/OS/compiler combination is ca. 10000/12*12 = ca. 10000 times faster than the 32016-6/16081/Acorn C compiler.

2. Sines:

/* 32000 c - floating point speed test: sines */

#include <STDIO-h>
#include <MATH-h>

main()
{
	int i;
	double a,b,c,d;

	printf("WHS NS32016 FP speed test (sines)\n");


	a=1.24235426;
	b=2.525252;
	c=3.123532523;
	d=0.012857535;

	for (i=0; i<100000; i++) {
		a=sin(b);
		b=b+d;
	}
}

Executable size: 38700 bytes

Running time (without the 10 s load time): ca. 77 s.
So, the ca. 1.2 second loop time is not very significant. The 32016-6/16081 calculates about 1300 sines/s.
For comparison, on an AMD 64 3000+/FreeBSD 6.2/GCC 3.4.6: I added a loop around the sine calculation (including variables initialisation) for an extra 10,000 times, which took 58 s. This means that AMD 64 3000+/FreeBSD 6.2/GCC 3.4.6 is ca. 10000/58*77 = ca. 13300 times faster than the 32016-6/16081/Acorn C compiler.

3. Flops (floating point operations): + - * / in the same amounts.

/* 32000 c - floating point speed test */

#include <STDIO-h>
#include <MATH-h>

main()
{
	int i;
	float a,b,c,d;

	printf("WHS NS32016 FP speed test\n");


	a=1.24235426;
	b=2.525252;
	c=3.123532523;
	d=1.012857535;

	for (i=0; i<1000000; i++) {
		a=a+b*c/d;
		b=b-d;
	}
}

Executable size: 29380 bytes

Running time (without the 10 s load time): ca. 130 s.

Here, the ca. 12 second loop time is significant. The 32016-6/16081 calculates about 4E6/(130-12)= ca. 34000 flops/s.

For comparison, on an AMD 64 3000+/FreeBSD 6.2/GCC 3.4.6 (compiler option: -O2): I added a loop around this fp calculation (including variables initialisation) for an extra 10,000 times, which took ca. 98 s. This means that AMD 64 3000+/FreeBSD 6.2/GCC 3.4.6 is ca. 10000/98*130 = ca. 13300 times faster than the 32016-6/16081/Acorn C compiler and it calculates about 4E6*1E4/(98-12)= ca. 0,47 Giga flops/s.

The welcome disc:

This contains various programs, also some assembler demos. It mentions a few facts such as:

6 µs FP multiplication
165k Whetstones/s
40% faster with SPICE than a VAX 11/750

Note: SPICE is a circuit simulation program.

This means it should be able to do about 166000 muls/s, but load/store operations are probably not included. Also have a look at other Whestone/dhrystone speeds:

T800 transputer (1987): 4 M Whetsones/s (32bit FP)
AMD 3000+ (ca. 2005):   ca. 1130 M Whetsones/s (32bit FP)

80286-8:        ca. 1200-1400 dhrystones/s
Vax 11/785:     ca. 2100 dhrystones/s
Vax 8600:       ca. 7100 dhrystones/s
Ppro-200:        ca. 200 k dhrystones/s
AMD 3000+:       ca. 4.5 M dhrystones/s
To email me, go to this page