[comp.lang.forth] Forth and the Novix 4016 CPU

ken@hpclkms.HP.COM (Ken Sumrall) (11/30/89)

I was reading a back issue of Byte magazine (April 87), and I came across
an article about a CPU from Novix that ran Forth as its instruction set.
I was wondering what the consesus of this notes group was regarding this
chip.

Also, the article mentioned that a public domain Forth compiler/runtime
called cmForth was available.  I checked Bytenet (Byte's BBS) but it
doesn't have anything that was printed before 1988.  Does anyone know
where I can get cmForth?

Many thanks in advance.

Ken Sumrall
ken%hpda@hplabs.hp.com
...!hplabs!hpda!ken

marc@noe.UUCP (Marc de Groot) (12/06/89)

In article <43960001@hpclkms.HP.COM> ken@hpclkms.HP.COM (Ken Sumrall) writes:
>I was reading a back issue of Byte magazine (April 87), and I came across
>an article about a CPU from Novix that ran Forth as its instruction set.
>I was wondering what the consesus of this notes group was regarding this
>chip.

The Novix NC4016 is a hardware Forth processor.  I bought one of the original
experimenter boards back in '85.

The NC4016 is a sixteen-bit processor.  It has three address spaces: the
parameter stack, the return stack, and main memory.  All three address
spaces have their own address and data bus, making it possible to
do operations on the address spaces in parallel.

Almost all instructions (including subroutine calls) take 1 clock cycle.
The exception is memory fetches and stores, which take 2 clock cycles (one
for the memory access, and the next one to fetch the new instruction.

Almost all subroutine returns operate in parallel with the last instruction
in the subroutine, meaning that the overhead for a subroutine call is one
clock cycle!

The typical clock frequency is 4 MHz, with hand-picked parts being pushed
to 7 or 8 MHz.

The Novix chip's development cycle was never completed, and the silicon
has bugs.  The multiply is broken (it yields the wrong answer when the
top operand is odd) and the interrupt cannot be used with any 2-cycle
instruction or any instruction that modifies IP.  The multiply can be
coded around, and the interrupt can be used with the inclusion of a fast
PAL that disables interrupts around "bad" instructions.

Despite its problems, the Novix chip demonstrates some amazing properties.
It is only 4000 gates (yes, four thousand) and so was implemented in a
semi-custom gate array instead of using VLSI technology.  There is no
pipelining -- it runs fast because it is SIMPLE.

The Novix chip runs cmForth which is a public-domain Forth written by
Chuck Moore himself.  cmForth is about ten pages long, fits in 2K words
and can recompile itself from source written in Forth (off floppy in
about 8 seconds).  cmForth is not a "robust development product", it
is Chuck's personal research platform.  Words like "VLIST" are simply
not present.  cmForth only compiles the first three letters and the
length of a word, unlike most modern Forth implementations.  Studying
cmForth's structure will teach you a great deal about Forth.

A friend of mine pointed out that the AIDS virus and cmForth have about
the same number of bits in them -- how many bits does it typically take
to allow self-reproduction?

Chuck Moore was selling a board called the FORTHkit.  I think it is
still available.  Here is his address:

	Chuck Moore
	Computer Cowboys
	410 Star Hill Road
	Woodside, CA 94062
	(415) 851 4362

I don't have a copy of cmForth that I can send you.  I am running a Forth
I wrote myself on the Novix.

^M

-- 
Marc de Groot (KG6KF)                   These ARE my employer's opinions!
Noe Systems, San Francisco
UUCP: uunet!hoptoad!noe!marc
Internet: marc@kg6kf.AMPR.ORG

peter@ficc.uu.net (Peter da Silva) (12/11/89)

In article <729@noe.UUCP> marc@noe.UUCP (Marc de Groot) writes:
> cmForth is not a "robust development product", it
> is Chuck's personal research platform.  Words like "VLIST" are simply
> not present.  cmForth only compiles the first three letters and the
> length of a word, unlike most modern Forth implementations.

Sounds like Chuck's standard Forth Incorporated product, Polyforth. Yes,
it was amazingly compact, but we were real glad to switch to Forth-77. It's
full of weird stuff, and most of the changes in forth-79 and -83 (like
getting rid of stateful words: ?compile, ?load, etc...) can be traced to
Forth Inc and Chuck Moore's influence. Computer Cowboy is right.
-- 
`-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>.
 'U`  Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>.

      "If you want PL/I, you know where to find it." -- Dennis