📜 ⬆️ ⬇️

Training Course - Building a computer from scratch

Hello to all!

Have you ever wanted to create a computer of your architecture, with your language and your operating system? I am yes.

And therefore I want to tell about one training course, the purpose of which is to not only tell how computers are created and operate, but also, unlike other courses, to practically create a working computer. Interesting? Read on.
')

The computer system that will be built by the end of the course is a simple 16-bit computer of this architecture:
• Processor - contains 3 registers: address, data register, program counter
• Two 16 KB memory modules: one for storing data and one for storing code
• Two I / O devices: keyboard and screen

The course also involves the creation of an assembler, a virtual machine, a simple compiler for a simple object-oriented language and an operating system.

The course was created by Noam Nisan and Shimon Schockenb and its main goal is to demonstrate a complete picture of the work of modern computer systems based on a simple computer created in the course. I do not know about you, but when I started learning to program, I very vaguely imagined how everything works. In general, this course is a great opportunity to understand the basic principles of computer systems.

Here is the course plan:

Each chapter contains theoretical material and practical tasks.

The computer is described using the HDL (Hardware Description Langauage) language based on Nand - the simplest chip. All other chips created during the course are based on various combinations of the Nand chip and other chips based on it.

What is Nand doing?
Simple logical operation - Not (And (x, y)):
X Y Nand (x, y)
0 0 1
0 1 1
1 0 1
1 1 0

Here, for example, chips And and Not, based on the Nand chip, on HDL:

CHIP Not {

IN in; //
OUT out; //

PARTS: //
Nand(a=in,b=in,out=out);

}


CHIP And {

IN a, b; //
OUT out; //

PARTS: //
Nand(a=a,b=b,out=c);
Not(in=c, out=out);

}


Agree that simply writing all the chips would be uninteresting, they need to run. To do this, use the Hardware Simulator (see screenshot). Also, for each chip that will be created, a test file is offered to verify that it works correctly.

image

Software projects (assembler, virtual machine, simple compiler) can be created using any programming language based on the course materials. The OS will be built using the language developed in the course itself.

The course website http://www1.idc.ac.il/tecs/ - all materials necessary for the course are presented on this site in the public domain.

PS
It seems to me that this is a very interesting and useful course. What do you think?

Source: https://habr.com/ru/post/52566/


All Articles