Re:Stack Computers: 4.4 Architecture of the Novix NC4016 (1989)
by DonHopkins on Wednesday September 18, 2019 @08:42AM
(#21004712)
Forth is a bit weird by 1985 (or any year's) standards, so a chip designed to execute it directly will be a bit weird too!
For example, Forth uses separate operand (data/parameter) and return stacks, instead of interleaving them in main memory like most CPUs and runtimes. So the Novix has separate memory and busses to the return stack, operand stack, and main memory, and it can independently push or pop from them in parallel, in the same (bit-sliced) instruction! And that's frequently useful:
>The NC4016 subroutine return bit allows combining a subroutine return with other instructions in a similar manner. This results in most subroutine exit instructions executing "for free" in combination with other instructions. An optimization that is performed by NC4016 compilers is tail-end recursion elimination. Tail-end recursion elimination involves replacing a subroutine call/subroutine exit instruction pair by an unconditional branch to the subroutine that would have been called.
>When the NC4016 was designed, gate array technology did not permit placing the stack memories on-chip. Therefore a minimum NC4016 system consists of three 16-bit memories: one for programs and data, one for the data stack, and one for the return stack.
For example, Forth uses separate operand (data/parameter) and return stacks, instead of interleaving them in main memory like most CPUs and runtimes. So the Novix has separate memory and busses to the return stack, operand stack, and main memory, and it can independently push or pop from them in parallel, in the same (bit-sliced) instruction! And that's frequently useful:
>The NC4016 subroutine return bit allows combining a subroutine return with other instructions in a similar manner. This results in most subroutine exit instructions executing "for free" in combination with other instructions. An optimization that is performed by NC4016 compilers is tail-end recursion elimination. Tail-end recursion elimination involves replacing a subroutine call/subroutine exit instruction pair by an unconditional branch to the subroutine that would have been called.
>When the NC4016 was designed, gate array technology did not permit placing the stack memories on-chip. Therefore a minimum NC4016 system consists of three 16-bit memories: one for programs and data, one for the data stack, and one for the return stack.