Regisztráció Blogot indítok
Adatok
Budapesti álmodozó

21 bejegyzést írt és 0 hozzászólása volt az általa látogatott blogokban.

Admin Szerkesztő Tag Vendég
My CPU FunCPU - Architecture 2015.10.14 21:45:31
The picture below depicts the overall architecture of the FunCPU. It employs a 8 bit wide databus and a 9 bit wide address bus. Please recall, that although the databus is 8 bits wide, due to the nature of the tagged architecture only 7 out of 8 bits can be used externally (i.e. by the program), and…..
The ALU module is very simple and straightforward. It is mounted together with the control board encoding logic on a single board. It performs a simple addition operation on the two operands as described in the following table. The two selector bits define the two input sources. ALU…..
My CPU FunCPU - Test Module 2015.09.04 22:24:28
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…..
My CPU FunCPU - Control Board 2015.08.04 18:53:40
..
My CPU FunCPU - Clock Generator 2015.08.03 11:00:19
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…..
My CPU Control Panel 2014.10.08 21:36:11
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.…..
My CPU Boxing Day... 2014.09.18 21:48:18
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…..
My CPU Overcoming Some Limitations 2014.08.19 21:00:12
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…..
My CPU Evaluating 1+1 2014.08.16 22:00:27
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…..
My CPU On (in)Efficiency of FunCPU 2014.08.11 21:45:24
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…..
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…..
Now let us take a look at how the functional CPU (FunCPU for short) can be programmed in reality, from the programmer’s point of view.   This will be covered by looking at each gizmo  (i.e. button, switch, LED, etc.) on the front/control panel. On the bottom right side, the purpose of the…..
My CPU FunCPU - Passing Arguments 2014.07.23 20:13:44
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…..
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…..
My CPU FunCPU - Evaluation Strategy 2014.07.22 16:52:48
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…..
My CPU FunCPU - Memory Models 2014.07.21 14:05:55
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…..
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…..
My CPU FunCPU - Tagged Architecture 2014.07.16 22:03:05
In the memory, different type of symbols are stored together. It is essential for the CPU to be able to differentiate among them. Therefore type information is required to be assigned to each unit of information. This piece of information is tagged to each symbol. A lot of effort has been dedicated…..
My CPU FunCPU - Computational Model 2014.07.13 22:40:21
As the computational model will be purely functional without any imperative elements (which could introduce side effects), a simple expression rewriting system will be adequate. User-defined functions will make up a library, which will in turn, also define the rewriting rules. Functions from…..
My CPU FunCPU - Instruction set 2014.07.10 21:42:45
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…..
My CPU FunCPU - Goals 2014.07.09 14:28:23
It has been a long time since my last CPU project, which focused on a very simple 8 bit CPU. Nothing groundbreaking, just a very simple variation of an accumulator machine.  This time I have set out a different, more ambitious goal. I have wanted to create still something simple, but…..