Homebrew CPU construction / házi készítésű processzor

Friss topikok

FunCPU - 7 bit homebrew CPU dedicated to Functional Programming

2015.10.14. 22:01 Budapesti álmodozó

Fun CPU is a seven bit homebrew processor with unique, unconventional design to natively support functional programming in machine language.

FunCPU employs a tagged architecture, but does not have registers, of which contents are exposed to the programmer. Sure, it has some internal registers, but they are hidden completely and not part of the computational model from the programmer’s perspective. FunCPU neither has program counter in its usual sense, although source, destination and function index registers play somewhat similar role during program execution.

Nor it utilizes flags such as zero, carry, overflow etc., not even in the inside. As the computation model is fully declarative, it does not support conditional or unconditional branching based on these flags in the conventional fashion. Although there is a built-in conditional evaluation with two branches and one condition.

It does not have input output port or devices, other than the control panel (being actually part of the FunCPU computer) , which is utilized to operate the machine and interact with FunCPU. It does not have any interrupt request possibilities either.

It follows that FunCPU does not facilitate writing interactive or process control applications. However, FunCPU can be used to perform arbitrary scientific calculations. Well, sort of, limited by its hardware capabilities, namely memory size and numerical precision.

Despite its simplicity FunCPU can be considered a fully fledged computational device in a sense that it is Turing-complete.


The program to be executed must be previously entered via the control board provided (see how!). The program generally consists of an expression, which value is calculated, or reduced in the course of program execution; and in most of the cases a set of functions. These functions - defined by the user, hence they are referenced hereinafter as user-defined functions – are applied to determine the value of a sub-expression during the program execution.

The expression evaluation, also called reduction or program execution may result in any of the following situations. The program may never halt. In this case we say that the expression is not defined. The program execution may stop with an error representing syntactical issue. In this case we say that the expression is not well-formed. The execution may stop due to some internal error. This is an undesired outcome, which denotes some internal hardware malfunction of the CPU, most probably some issue with the micro-sequencer EPROM. Finally, the execution may terminate in a normal state, thus producing a result. In this case the expression is well-formed and defined. The value of the expression is the constant which it has been reduced to. The processor will idle its final state and the result value is observable by looking at the data LEDs.

In case of termination the nature of the termination- , that is, whether it is a normal completion or abort of termination due to some error - is indicated by the status LEDs.


operating frequency from 1.4 to 47000 Hz
expression memory 256 bytes
function memory 256 bytes
numerical precision 7 bit
built-in functions if-then-else, inc, dec
user-defined functions 32 functions
number of cores 1
function arity from 1 to 4
number of modules

(clock, ram, alu, register, control board)

length of wires used

cca 200

registers available
for programer


number of chips

30 - CPU only 
45 - CPU, control board and RAM together





address bus



7/(*8 internally)

status word/bits





Szólj hozzá!

Címkék: functional programming FunCPU Homebrew CPU functional cpu homebuilt cpu

A bejegyzés trackback címe:


A hozzászólások a vonatkozó jogszabályok  értelmében felhasználói tartalomnak minősülnek, értük a szolgáltatás technikai  üzemeltetője semmilyen felelősséget nem vállal, azokat nem ellenőrzi. Kifogás esetén forduljon a blog szerkesztőjéhez. Részletek a  Felhasználási feltételekben és az adatvédelmi tájékoztatóban.

Nincsenek hozzászólások.