Next Steps in Black Magic Processor Engineering After You Learned Harris & Harris

    Recently, another printed edition of the book Harris & Harris in Russian was released . This is a wide educational program on how microchips are designed by companies such as Apple and Intel (design methodology at the level of register transfers using hardware description languages). Prior to this print edition, a free electronic edition of the same book was released, which became viral - its downloads were twice overwhelmed by the British website Imagination Technologies, and the posts on the book on Habré and Giktimes collected more than 300,000 views ( 1 , 2 , 3 , 4 , 5) The history of translating the book into Russian is also quite instructive - it began as a public project of a group of enthusiasts: teachers of Russian and Ukrainian universities, as well as Russian employees of companies both in Silicon Valley (MIPS, AMD, Synopsys, Apple, NVidia ...) and in Russia (NIIISI, ICST, Module ...). When the first printed publication in Russian came out, it was also quickly bought out and complained that it was black and white. Therefore, the next print was color, improved quality.

    Now the question arises: well, you purchased or downloaded a book for free, understood the basics of digital circuitry, Verilog and VHDL hardware description languages, acquired the taste of assembly language and figured out how to organize a simple pipelined microprocessor, and how it all fits in with peripherals and built-in by programming. What to do next?

    The picture shows Tatyana Volkova, an employee of Samsung's educational programs at the Moscow Institute of Physics and Technology.

    First of all, if you learn more after H&H, you can get an interesting job at one of the companies that designs microchips. For example, in Baikal Electronics , which develops processors for machine tools, gas pipeline controllers, communication devices andTavolga terminals :

    Here's a recent article about embedded computers based on the Baikal-T microprocessor and performance tests . Baikal residents with boards for developers. Linux works for them:

    You can also go to work in the Zelenograd company ELVIS-NeoTech , which was originally engaged in space , but is now expanding more and more into the commercial market for chip for smart cameras with pattern recognition. The name of their product, Orwell 2000, with an allusion, if anyone does not know, to George Orwell’s novel , was invented by company president Yaroslav Petrichkovich, on the left in the picture:

    Elvisists designed the ELISE chip with their own video processing units, and made such a board for developers on it, which you can attach a camera to and recognize something:

    You can also go to a very interesting group of the NIISI RAS , where you designed the KOMDIV-64 microprocessor - see the video with the project manager . KOMDIV-64 is compatible in architecture (command system) with MIPS64, but has its own microarchitecture of a superscalar pipeline designed in Russia and its own vector coprocessor. Here is an example of a computer on a KOMDIV-64 processor that can operate in extreme conditions - from the Canadian Arctic to southern Arizona:

    Well, of course, it is worth mentioning the developers of Elbrus ICST, developers of integrated microprocessor chips NIIMA "Progress" , microcontrollers Milander , chips for smart cards KM-211 , chips for digital signal processing Module , the Kiev branch of the Belgian company Melexis and other companies where you can engage in interesting tasks and build a fruitful career.

    But before working as a chip developer, after the introductory book Harris & Harris needs to build some work skills. For this, there is study at the university (Zelenograd MIET, Moscow Engineering Physics Institute, Moscow Institute of Physics and Technology, St. Petersburg ITMO, Kiev KPI and others), self-education through books, online courses and open-source projects.

    Let's start with the books. If you are interested in microarchitecture (the structure of the pipeline and logical blocks of the processor), then you can try these books. The favorite among practicing microarchitects is Shen Lipasti, but the blue book in the middle may be liked a little more by those who don’t like to read a lot (it’s shorter):

    There is also a course on a teacher’s teacher’s cursor from Princeton :

    If you went to a math class at school or at math competitions, then you can dig deeper into the area of ​​the hardware for arithmetic operations, where you will find that even for simple addition and multiplication of numbers in a column there are dozens of implementations, some of which use a pipeline to increase throughput and all sorts of tricks for special cases, such as operations with constants. Breakthroughs and emotional disputes occur in this area even now, in the 21st century - see, for example. last year's moan of the soul mathematician from Berkeley "A Critique of John L. Gustafson's THE END of ERROR - Unum Computation and his A Radical Approach to Computation with Real Numbers . " Here is one of the good books on computer arithmetic:

    But in order for you to implement microarchitecture or even just arithmetic blocks, you need a tool. Once upon a time, digital circuits were drawn with the mouse on the screen, but in the last 25 years the design is most often written in the Verilog language (sometimes VHDL), after which a special program (logic synthesis) turns the design into a graph of wires and logical primitives, another program (static timing analysis) tells the designer whether he fits into the speed budget, and the third program (place-and-route) lays out this design on the site of the chip. When the design goes through all the stages: coding on a veril, debugging, verification, synthesis, static timing analysis, floorplanning, place-n-route, parasitics extraction, etc. - it turns out a file called GDSII, which is sent to the factory, and the factory bakes chips.

    If you want to understand what Verilog and VHDL are in a couple of days, you can read these books, but generally speaking, everything they have is in Harris & Harris, except for the PLL theme (blocks for manipulating a clock signal) frequency). On the other hand, these books are not covered enough about PLL, so I mention them only because they are unusually thin:

    If you want to read about Verilog from people who really stood at its origins, here are three books. The first is similar to Kernighan-Richie for C, the second (heavy) to Strastrup for C ++, the third was written by a well-known consultant guru, who also loves to speculate on 37 pages which reset is better - synchronous or asynchronous .

    It must be said here that Verilog is not only a language for describing and synthesizing circuits, but also a programming language for writing tests. In some companies, for every engineer who writes code on a veril at the register transfer level, there are three engineers who write code for verification. Functional verification is generally a separate art with special languages, methodologies using modeling, automatic proof of circuit properties, etc.

    The career of Verification Engineer with writing test environments on SystemVerilog may appeal to experienced programmers who want to change careers from writing programs to Java, for example. SystemVerilog has elements of object-oriented and simulated multi-threaded programming. The essence of the activity is the creation of frameworks that test hardware designs for durability, bombarding them with random transactions and considering coverage of interesting scenarios (functional coverage).

    The best SystemVerilog book in the picture below to the left. On the right is a rather old book on writing test environments, updated for SystemVerilog. This book is tedious, but suitable for regular reading, for half an hour a day, in public transport such as an electric train, to take over the experience of previous generations of users of the verilogue.

    In the center, I brought a very simple and thin book, which contains an elementary introduction to Universal Design Methology (UVM). UVM is a SystemVerilog class library for building block level testing tools. The UVM methodology is not as universal as its management consultants promise, but it is useful for almost every verification engineer to have an idea about it. This UVM book is not bad, although it does not describe how to assign drivers for pipelined transactions (this is often necessary). Read this book over the weekend and pass it on to another - it is really so short. There are no good long books about UVM (they are all bad), so I recommend reading the standard and talking with colleagues. When using UVM, it is advisable to use common sense, otherwise instead of real work, you will begin to endlessly look for ways to bypass a rather rigid structure,

    There is also a course on functional verification created by an employee of ELVIS-NeoTech + MIET and eNano / educational department of RUSNANO .

    One of the first questions that people think about studying digital circuitry: well, let's say I designed my own processor, but how can I produce it, because ordering a typical commercial microcircuit in a factory costs more than a million dollars? The answer is the use of FPGAs / FPGAs - these are special microcircuits that are arrays of cells, the logical functions of which, as well as the connections between them, can be changed many times after manufacturing. They are much more expensive and slower than conventional specialized chips, but for them there is no “down payment” for production. There are student boards with FPGAs that cost less than $ 100 on the market now, so students and universities no longer need to lay out large amounts of money to experiment. Learning the basics of working with FPGAs is quite simple (see e.g.article on the website of the Russian manufacturer of FPGA boards ), but with more advanced use, many questions arise - both on the technical details of using FPGAs, and on approaches and methodologies. I recommend these two books for reading before going to bed:

    In addition to developing a circuit at the logical level, there is also a physical level - placing logic elements on the microcircuit board and connecting them with tracks, taking into account various kinds of physical effects. You can read about it in such books. The one on the left describes the process, from the point of view of the user of the software for the design. This book was written by David Harris, one of the Harris in Digital Circuitry and Computer Architecture. The book on the right is about the algorithms used in software for design automation:

    One of the co-authors of the second book is our compatriot Igor Markov , who has become a widely recognized authority in America on automation of the physical design of electronics in America. Igor Markov also came to Moscow State University and held seminars there that helped the ear mufflers to get involved in algorithmically interesting research projects in this area. Here are a few slides from these seminars:

    But if you don’t want to delve into the algorithms used in the software for the designer, but want to be the designer yourself, and at the same time want to get a general picture of the whole way from the idea to the factory, you can try an educational program from the educational department RUSNANO. The course is called "Specialized Nanoscale Integrated Circuits". Below is a selection of slides that shows what is being discussed in the course. There is also another similar course from the MIET + eNano teacher and another related course :

    The above pile of books may give the impression that the field of electronics design is very complex. This is not entirely true: it has complex tasks, but even a fifth grader can learn the basic methods. This is not an exaggeration: here is a video of an advanced fifth grader Vyacheslav, who began working with Verilog and FPGA at the Summer School of Young Programmers in Novosibirsk in July this year:

    And in this picture, the eighth-grader Daria (on the right) added instructions to the simplest processor (modifying the decoder and ALU), synthesized it, wrote tests in assembler and launched the processor on the FPGA board:

    The code that Daria modified in Novosibirsk is here . The training processor used in the project is schoolMIPS from Stanislav Zhelnio sparf . schoolMIPS is essentially the easiest processor you can think of. It is single-cycle and executes a dozen commands - enough to run programs like calculating Fibonacci numbers. Here is his general outline:

    Stanislav Zhelnio began to write the schoolMIPS processor based on the example of their Harris & Harris, then he began to help HSE MIEM professor Alexander Romanov, who wants to use this processor in his course. In addition, Stanislav made several significant improvements for the MIPSfpga educational project , which is based on the MIPS microAptiv UP industrial processor core.

    Both schoolMIPS and MIPSfpga can be used as the next steps after learning Harris & Harris. They can become the basis for a chain of student projects.

    schoolMIPS can step-by-step grow and add pipelining, memory handling, caches, a longer pipeline, superscalarity and even a CDC 6600-style scoreboard and the Thomasulo algorithm to it.

    MIPSfpga can be used for experiments to increase the performance of real programs by using transition prediction, add mathematical coprocessors to it, or rewrite the cache module to build multi-core systems with coherent caches based on the MESI algorithm.

    You can simply use MIPSfpga to build a prototype system on a chip and integrate sensors with it, as a Kiev student Oleg Plotnikov led by Evgeny Korotky from the Lamp KPI laboratory :

    For such popular projects, there are three collections of boards - in Kiev (Kiev-Mohyla Academy, Moscow (HSE-MIEM) and Novosibirsk (NSTU). If you want to make an example, "CDC 6600 on the veril" and agree to write about this post on Habré, but you don’t have a fee, you can borrow it in one of these

    places.Here is a photo from a hackathon at the Kiev-Mohyla Academy, where students used the FPGA board shown in the video and where they intend to introduce Harris & Harris into training:

    If you don’t have enough Harris textbooks downloaded for free, and you want a paper copy with high print quality, then in addition to the Internet, you can buy it in some books, for example, in the Moscow Biblioglobus. True, they put it not among books on electronics, but among books on programming, but it really is on the border of electronics and programming, so it can be put in at least two departments:

    Also popular now: