⬆️ ⬇️

Next steps in black magic processor after you've mastered Harris & Harris

Recently another printed edition of the Harris & Harris book was published in Russian . This is a wide-ranging educational program about how chips are designed in companies like Apple and Intel (design methodology at the level of register transfers using hardware description languages). Before this print edition, a free electronic edition of the same book was published, which became viral - the British site Imagination Technologies twice downloaded it, and posts about the book on Habré and Giktimes collected more than 300,000 views ( 1 , 2 , 3 , 4 , 5 ). The history of the translation of the book into Russian is also quite instructive - it began as a community project of a group of enthusiasts: teachers from Russian and Ukrainian universities, as well as Russian employees of companies in Silicon Valley (MIPS, AMD, Synopsys, Apple, NVidia ...) and in Russia (NIISI, MCST, Module ...). When the first printed edition in Russian came out, it was also bought up pretty quickly and complained that it was black and white. Therefore, the next print was a color, improved quality.



Now the question arises: well, you purchased or downloaded a free book, understood the basics of digital circuitry, the Verilog and VHDL hardware description languages, acquired the taste of writing in assembler and figured out the organization of the simplest conveyor microprocessor, and how it all fits with peripheral devices 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 in one of the companies that are engaged in chip design. For example, in Baikal Electronics , which develops processors for machine tools, gas pipeline controllers, communication devices and Tavolga terminals :







Here is a recent article about the built-in computers based on the Baikal-T microprocessor and performance tests . Baikalovtsy with boards for developers. Linux works for them:







You can also go to work in the Zelenograd company ELVIS-NeoTek , which was originally engaged in space , but is now expanding more and more into the commercial market of chips 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 the company's president, Yaroslav Petrichkovich, on the left in the picture:







Elvisovtsy designed the ELISE chip with their own video processing units, and made on it just such a fee for developers, to which you can attach a camera and identify something:







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







Well, of course, it is worth mentioning the developers of Elbrus MCST , developers of embedded microprocessor chips NIIMA Progress , Milander microcontrollers, KM-211 smart card chips, digital signal processing chips, Kiev branch of the Belgian company Melexis and other companies in which you You can engage in interesting tasks and build a fruitful career.



But before working as a chip developer, after the Harris & Harris introductory book, you need to develop some working skills. To do this, there is study at the university (Zelenograd MIET, Moscow MEPI, MIPT and Moscow State University, 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 the micro-architecture (the structure of the pipeline and the logical blocks of the processor), then you can try these books. Shen-Lipasti is a favorite among practicing micro-architects, but the blue book in the middle may appeal to those who do not like to read a lot more (it is shorter):







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







If you went to a math circle at school or at mathematics Olympiad, then you can dig deeper into the field of hardware for arithmetic operations, where you will find that even for simple addition and multiplication of numbers in the bar, 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. In this area and now, in the 21st century, there are breakthroughs and emotional disputes - see for example. last year's moan of the soul math from Berkeley "A Units Computation and 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 a micro-architecture or even just arithmetic blocks, you need a tool. Once upon a time digital schemes were drawn with a mouse on the screen, but in the last 25 years, design is most often written in Verilog (sometimes VHDL), after which a special program (logic synthesis) turns a design into a graph from wires and logical primitives, another program (static A timing analysis tells the designer if it fits into the speed budget, and the third program (place-and-route) lays out this design around the chip's site. When the design goes through all the stages: coding on the chain, 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 in them is in Harris & Harris, with the exception of the PLL theme (blocks for manipulating the clock signal). frequencies). On the other hand, the PLL in these books is not enough, 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-Ritchie for C, the second (heavy) to Strastrup for C ++, and the third was written by a well-known guru-consultant who also likes to speculate 37 pages about whether a reset is better - synchronous or asynchronous .







Here I must say that Verilog is not only a language for describing and synthesizing circuits, but also a programming language for writing tests. In some companies, for each engineer who writes code on the chain at the level of register transfers, there are three engineers who write the code for verification. Functional verification is generally a separate art with special languages, methodologies using modeling, automatic proof of schema properties, etc.



Career Verification Engineer with writing test environments on SystemVerilog may appeal to experienced programmers who want to change careers with for example writing programs in Java. 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 strength, bombarding them with random transactions and taking into account the coverage of interesting scenarios (functional coverage).



The best book on the language SystemVerilog - in the image 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, half an hour a day, in public transport such as an electric train, in order to learn from the experience of previous generations of users of the veralog.



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



Also on functional verification there is a course created by an employee of ELVIS-NeoTek + MIET and eNano / educational department of RUSNANO .







One of the first questions that arises among people who are thinking about studying digital circuitry: well, let's say I designed my own processor, but how do I make it, because ordering a typical commercial microcircuit at a factory costs more than a million dollars? The answer is to use FPGA / FPGA - these are special chips, which are matrices of cells, the logical functions in which, as well as the connections between them, can be repeatedly changed after production. They are much more expensive and slower than ordinary specialized chips, but for them there is no “initial payment” for production. Now on the market there are student boards with an FPGA costing less than $ 100, so the student and universities do not need to pay large sums for experimentation. Learning the basics of working with FPGA can be quite simple (see, for example, an article on the website of a Russian manufacturer of FPGA boards ), but with more advanced use many questions arise - both on the technical details of using FPGA and on the methodologies approach. I recommend these two books for reading before bedtime:







In addition to developing a circuit at the logical level, there is also a physical layer - the placement of logical elements around the area of ​​the microcircuit and their connection with tracks, taking into account various physical effects. You can read about it here in these books. The one on the left describes the process from the user's point of view of the software for design. This book was written by David Harris, one of Harris in Digital Circuit Design and Computer Architecture. The book on the right is about the algorithms used in the software for design automation:







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







But if you do not want to delve into the algorithms used in the software for the designer, but you want to be a designer yourself, and at the same time want to get a general picture of the whole way from idea to the factory, you can try a quizzes course from the educational department of RUSNANO. The course is called “Specialized Nano-Level Integrated Circuits” . Below is a selection of slides that shows what the course is about. There is also another, similar in course, course from a teacher at MIET + eNano, and another course related to it :







The above pile of books can create the impression that the field of electronics design is very complex. This is not quite true: there are complex tasks in it, but even a fifth-grader can master the basic methods. This is not an exaggeration: here is a video of an advanced fifth-grader Vyacheslav, who started working with Verilog and FPGA at the Summer School for Young Programmers in Novosibirsk this July:







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







The code that Daria modified in Novosibirsk is here . The educational processor used in the project is the schoolMIPS from Stanislav Zelio sparf . schoolMIPS is essentially the easiest processor to think of. It is single-ended and executes a dozen commands — enough to run programs like calculating Fibonacci numbers. Here is its general scheme:







Stanislav Zhelnio began to write a schoolMIPS processor based on the Harris & Harris example, then Alexander H. Romanov, a teacher at MIEM HSE, began to help him. In addition, Stanislav made several significant improvements for the educational project MIPSfpga , which is based on the industrial processor core MIPS microAptiv UP.



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



schoolMIPS can be increased step by step to add pipelining, memory handling, caches, a longer pipeline, superscalarity, and even a scoreboard in the style of CDC 6600 and the Tomasulo algorithm.



MIPSfpga can be used for experiments to improve the performance of real programs 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 the Kiev student Oleg Plotnikov did under the guidance of Eugene the Short from the laboratory of the KPI Lamp :







For such folk projects, there are three collections of boards - in Kiev (Kiev-Mohyla Academy, Moscow (HSE-MIEM) and Novosibirsk (NSTU). If you want to do say the example "CDC 6600 on the verilog" and agree to write about this post on Habré, but you do not have a fee, you can borrow it in one of these places.



Here is a photo from the hackathon at the Kiev-Mohyla Academy, where the students used the FPGA board shown in the video and where Harris & Harris are going to be introduced into the training:







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



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



All Articles