My CPU

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…

Szólj hozzá!

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

FunCPU - Test Module

2015.09.04. 22:24 Budapesti álmodozó

Below a simple tester module is depicted. It is designed to facilitate the testing of other modules.  It has one incoming databus of 16 bit width. Each of the lower eight Leds of the two ten segment Led bars corresponds to one bit in the databus. The upper two Leds of the led display on the left…

Szólj hozzá!

Címkék: functional programming FunCPU module testing

FunCPU - Clock Generator

2015.08.03. 11:00 Budapesti álmodozó

Construction of FunCPU has begun with the clock generator. The module is already fully functional on its own, but space is left for incorporating more components for the EPROM chips storing the micro-program and for some control logic.   An 555 is used to generate the base for the clock…

Szólj hozzá!

Címkék: FunCPU Homebrew CPU Clock Generator

Control Panel

2014.10.08. 21:36 Budapesti álmodozó

Ok, here is a photo of the real control panel. It is a little bit different from the original design. It does not look that  spectacular, but has decent functionality.  The upper section includes 8 LEDs and 8 toggle switches. These are used for data entry as indicated by the label in between.…

Szólj hozzá!

Címkék: functional programming FunCPU functional cpu control panel

Boxing Day...

2014.09.18. 21:48 Budapesti álmodozó

It is high time I had gone to look for a suitable box to be the case of the FunCPU. I have decided on the one below. It is quite ugly and girlish actually, but it was the cheapest option. At least this will be the choice for CPU-case of my first attempt to build the CPU.  I expect to implement…

Szólj hozzá!

Címkék: functional programming FunCPU functional cpu physical implementation

Overcoming Some Limitations

2014.08.19. 21:00 Budapesti álmodozó

The FunCPU (in its current version) supports only numerical computation, more precisely, operations with integers. Functional languages, such as Lisp, Clean, etc. come with a richer set of data types and also have some kind of type construct capability. For example, Lisp as its name suggests mainly…

Szólj hozzá!

Címkék: records lists functional programming FunCPU functional cpu overcoming limitations

Evaluating 1+1

2014.08.16. 22:00 Budapesti álmodozó

It is high time we turned our attention to a complex mathematical problem. Namely, how FunCPU computes:1+1=? Please recall that the definition of "add" is stored at 00 (referenced by 81) is as follows:add(x,y):=   FD 7F 7E FC 81 7E FE 7F FF The following is an extract from the FunCPU…

Szólj hozzá!

Címkék: evaluation functional programming FunCPU functional cpu function evaluation

On (in)Efficiency of FunCPU

2014.08.11. 21:45 Budapesti álmodozó

On Data and Program Representation The computation (expression reduction) process is based on string manipulations (copy, insert, replace, etc.). The input string is scanned symbol by symbol until the string is reduced to an integer. This may happen in some cases, but may not in others. In the…

Szólj hozzá!

Címkék: efficiency functional programming FunCPU reduction process expression evaluation

Some Functions and Predicates

2014.08.07. 21:48 Budapesti álmodozó

Let us have a look at some elementary functions and predicates to have a better look and feel how FunCPU works. The definitions of these objects will be suppmented with their assembly code counterparts written directly in FunCPU machine code. In the subsequent section, the following encoding is…

Szólj hozzá!

Címkék: functions functional programming Turing-complete FunCPU predicates functional cpu

FunCPU - Passing Arguments

2014.07.23. 20:13 Budapesti álmodozó

It is not trivial how to handle argument passing in the lack of stack, or any dedicated storage for parameters. Consider the following examples: fac (n):= n*fac(n-1) fac(add(2,3))? ack(add(fac(fac(2)+fac(1)),fac(1)),1)? I wanted a simple solution, which still works without posing serious…

Szólj hozzá!

Címkék: functional programming FunCPU Homebrew CPU argument passing

FunCPU - Parenthesis, Precedence

2014.07.22. 17:03 Budapesti álmodozó

When evaluating expressions, the CPU must exactly know how to evaluate an expression, what function/expression parts should be evaluated first, next, and last etc. Therefore the representation of expressions and functions must be unambigous with respect to parenthesis and priorities. In…

Szólj hozzá!

Címkék: functional programming FunCPU Homebrew CPU parenthesis operator precedence

FunCPU - Evaluation Strategy

2014.07.22. 16:52 Budapesti álmodozó

It is not trivial how expressions should be reduced, i.e. evaluated. I have already mentioned that while some strategy could be fruitful in reducing an expression in a given interpretation, others may be not. Let us have a look at the following simple example of evaluation of the factorial function…

Szólj hozzá!

Címkék: functional programming FunCPU evaluation strategy reduction strategy reducing expressions

FunCPU - Memory Models

2014.07.21. 14:05 Budapesti álmodozó

Needless to say that not only initial and final expression, but also temporary expressions should be stored in memory somehow. The way of how expressions are represented has impact on hardware design. During reduction the cycles, expression symbols are being copied one by one. When a function…

Szólj hozzá!

Címkék: functional programming FunCPU homebrew cpu memory model

FunCPU - Function Encoding Schema

2014.07.18. 22:43 Budapesti álmodozó

In the previous post we have seen how 8 bit symbols represent literals, arguments, functions, etc. Similarly, it was vital to have a good and efficient function encoding. Basically in the context of function encoding we need to be able to answer the following question: Where does the function…

Szólj hozzá!

Címkék: functional programming FunCPU Homebrew CPU function encoding

FunCPU - Instruction set

2014.07.10. 21:42 Budapesti álmodozó

FunCPU will operate with 7-bit numerals (to understand why see the next couple of posts) and will directly support the following built-in functions: inc(x) is used for incrementing a value, that is for any x: x+1=inc(x). dec(x) is used for decrementing a value in the similar fashion. if-then-else…

Szólj hozzá!

Címkék: functional programming FunCPU Homebrew CPU built-in functions