Mooc:build a modern computer from first Principles:from Nand to Tetris
Designing modern computers with the first principle: from non-doors to Tetris
https://www.coursera.org/learn/build-a-computer/
Design a computer from scratch, and that's what the public class promised in the promo film. At first I was questioning, as an electronic information engineering graduate students, university 4 years, after learning "analog circuit", "digital circuit", "computer composition Principle", "Hardware Description Language", "assembly language", "C language", for how to design a computer can say, I completely start.
The course lasted for 12 weeks, and now it's only been released for the first 6 weeks. Each week builds on the previous week, building the modules of the previous week as a cornerstone and designing more complex modules. This abstraction at different levels is one of the core principles of building such a complex computer.
first week : A Boolean function was introduced. The core of the computer, CPU, memory are digital circuits, all digital circuits are composed of logic gates. Three commonly used logic gates, and doors, or doors, not doors in the real chip in fact there is a kind of door and non-door NAND get, visible and non-gate is so powerful, created the real digital circuit of the "atom" is so concise. The task of the first week is based on the non-gate, using a hardware description language specifically designed for this course (Hardward discription Language), which is used as an atom with the non-gate, to design with the gate, non-gate, or gate, XOR gate, multi-path and gate/or gate/non-gate/XOR gate, multi-channel selector, Multi-channel splitter. is to implement one with the door in hardware description language.
second week : The arithmetic operation is introduced. The core function of the CPU is to perform operations, that is, a pupil will subtraction or logical operation, but the computer can be calculated so fast, 1 seconds can be computed 1 billion times. This week first introduced the numbers in the computer's expression of complement, complement can combine addition and subtraction operations, without the need to separate two sets of logic. The addition of a bit can be achieved based on the gate and the Xor gate, which is called the Half adder (half Adder). The reason for being called a half-adder is that the reason for the two-adder is that the two-half adder can only be used as an adder, and the half-adder cannot handle the low carry operation. With an adder, the Arithmetic logic unit (arithmatic logic unit) can be obtained further, and the reason that the arithmetical logic unit differs from the adder is that it has some control circuitry for choosing the number of inputs to do what? is addition, subtraction, or operation, or operation? And some extra output, which indicates whether the result of the operation is zero or positive. Don't underestimate the extra output, it is the hardware foundation of the program to judge the statement, think about why. Represents the control and corresponding operation of an arithmetic logical unit.
Third week : The sequential logic circuit is introduced. It is not taught in the course of the traditional digital circuit course, and the non-gate is how to get a sequential logic circuit such as a trigger, but it is used as an "atom". With a multi-channel selector, a multiplexer, and a trigger, you can make memory (the Random Access Unit). This step to get the largest memory is 16K, that is, the final design of the computer's memory size, in terms of the size of the computer memory now, it is incredibly small. This week in addition to memory, the design of another important circuit is the program Counter, is actually a counter, you can control it to do self-add and load a number of two operations. This corresponds to the sequential execution of the program line and the jump operation. These simple circuits are seen as an integral part of the real-world computer.
Week Fourth : the introduction of assembly language. Assembly language can be directly converted to the computer can execute 2 of the instructions, assembly language is completely designed for this course. Assembly directives can be divided into two types, one describing operations and one describing addressing. In the assembly language program, you can see the high-level language loop, judge the shadow of the sentence. This week's task is to write a simple assembler that implements multiplication. Now most CPUs, at the hardware level, can achieve multiplication, one of the purposes of this course is to be as "concise" as possible, the multiplication is given to the software implementation.
Week Fifth : the CPU (Center Process Unit) is introduced. This is a small climax of the course, the previous weeks to build the circuit will be used in the CPU, a task of this week is to design the CPU, fortunately, the teacher gave a block diagram of the CPU, leaving us to think about the different modules between the control logic. The following is the structure of the CPU diagram.
With the CPU, memory, you can build a complete computer, modern computers are von Neumann structure, memory is divided into data memory, and instruction memory two parts.
Week Sixth : the assembler was introduced. Assembler is a binary code that converts assembly language into a CPU capable of executing. From the previous weeks, you will clearly realize that each binary code will have two parts of the data and control instructions. You'll be amazed how several control bits of the binary code precisely correspond to the arithmetic logic unit control, how to control the data from the memory, or the register in the CPU. This week's task is to design a assembler, which may be a bit difficult this week for people without any programming foundation. After some twists and turns, I finished the assembler with Python200 line.
The completion of this course, can be said to be full of accomplishment, the teacher of the computer so complex a system, a layer of split into a number of modules, while ensuring that every week the content of the difficulty can be a completely non-computer-based people accept, indeed this course is unparalleled. The teacher of this course, Shimon Schocken, is a great educator who has also written the course design process: http://shimonschocken.com/wp-content/uploads/2011/09/ Synthesis-course.pdf, who also gave a speech at Ted, described his teaching philosophy: Http://www.ted.com/talks/shimon_schocken_the_self_organizing_ Computer_course, or https://www.youtube.com/watch?v=ie7yrhxwods. In the speech, it was mentioned that some people in the United States spontaneously organized the contents of the course, and a Chinese university student used a programmable logic device to realize the design of the whole computer.
For me, this course is the best description of the Geek spirit, and geeks like to break up complex stuff and design new inventions, which is what this course does. May the spirit of the Geek remain forever!
Source: http://www.cnblogs.com/meelo/p/5559453.html
Design a computer from scratch? Open class: From the non-door to the Tetris