School on the basics of digital circuitry: Novosibirsk - Ok, Krasnoyarsk - get ready
From October 2 to October 5, a school on the basics of digital circuitry, architecture and the use of Verilog was held in Novosibirsk . The formal name of the event: a school for undergraduates and graduate students, held at the Novosibirsk State Technical University in the framework of the XIV International Scientific and Technical Conference "Actual Problems of Electronic Instrument Engineering" APEP-2018, held under the auspices of IEEE.
This event was primarily focused on those who:
- read the book Digital Circuit Design and Computer Architecture, D. Harris, S. Harris (also known as H & H or Harris-and-Harris);
- wants to apply their knowledge in practice, but does not understand what equipment and software is necessary for this and does not know how to use it;
- is a senior student or a graduate student and is expected to disseminate his knowledge (to conduct workshops, laboratories, etc. at the university).
Announcement: a similar school is scheduled from November 6 to 9 at the base of the Institute of Space and Information Technologies of the Siberian Federal University (IKIT SFU). The school will be led by Alina Leskovskaya - a postgraduate student, a design engineer at AES IMS named after M. Reshetnev, and her colleagues: Dmitry Vlasov and Boris Dudkin. Contact for registration: firstname.lastname@example.org
If your position sounds at least «Junior FPGA Developer», then with a high probability you will not learn anything new for yourself in this post. For everyone else - welcome under cat.
Why do you need it
At one time (back in college), the author of these lines studied computer architecture without using Verilog or VHDL: you come to a lecture, during which a black box called “computer” is laid out into many small black boxes: “processor”, “ memory ", etc. But they still remain black boxes: you can not "climb" inside, you can not "change" the device. The course ends, but you still have the feeling that you are working with "magical entities of an obscure inner structure." At best, you can configure them (program). In my head there is no holistic picture of the digital world. There is no understanding of how it works inside. That understanding, which distinguishes a good Engineer from "passed by".
In order to get a complete picture, you must be able to change the studied devices and create your own. And here Verilog (or VHDL), simulation software and inexpensive debugging boards with FPGAs for testing in hardware come to the rescue. A simple processor ( schoolMIPS ) can be written in 1-2 evenings. And this is not rocket science at all, no magic.
Having in mind a holistic picture of the digital world, it is not at all necessary to associate your life with the development of microchips. But I believe that people who really understand how the "magic counting box" works will not write terrible slow programs. I'll draw a parallel: a hammer and a drill lying in a closet do not make you a joiner. At the same time, you are able to drive a nail, you understand why you need these tools, when it is worth using a hammer, why you should not take a microscope instead, and when you should turn to a professional.
Work at the School was practice-oriented. It is very hard to put all the questions of theory and practice described in H & H into four days. Therefore, this goal was not set. The whole theory was given solely in volume, necessary for practice. Therefore, it was not easy for those who did not open the book before.
• Hardware Description Language and why it is needed
• What is FPGA
• Basics of combinational logic
• Basic logic elements and their description on Verilog
• Test environment (Testbench)
• Testing the operation of a combinational circuit using a simulator (Icarus Verilog, Modelsim)
• Synthesis of a combinational circuit, Intel Quartus and Xilinx Vivado GUI
• What the combinational circuit is synthesized when implemented on the FPGA
• Programming the debugging board
• Checking the project performance on the debugging board
• Basics of the Makefile and working in non-project mode
• Multiplexer and its methods descriptions on Verilog HDL
• Demultiplexer and how to describe it on Verilog HDL
• Practical example: working with 7-segment indicators
• Conditional compilation in Verilog HDL
• Combination schemes and signal propagation time
• Clock signal and sequential circuits
• Different types of assignments in Verilog HDL
• D-trigger and its implementation on Verilog in different variations: asynchronous and synchronous resets, write resolution port
• In which the sequential circuit is synthesized when implemented on FPGA
• register and its implementation
• The meter and its implementation
• Dynamic and static discipline
• metastable and synchronizer
• Unwanted latch, consequences and ways to avoid
• End cars Ata (Moore and Mealy)
• Presentation of the machine in the form of a state transition diagram
• Implementation of machine on Verilog HDL
• The general approach of designing complex automata
• Step-by-step implementation of the interface module of the ultrasonic distance sensor on Verilog
• Independent work. The implementation of the interface module keyboard 4x4 for FPGA
• Independent work. Implementation of the calculator on the FPGA
• Basics of pipelining
• Architecture and micro-architecture
• Basics of development on MIPS assembler
• Working with MARS simulator
• Designing a simple one-cycle processor using schoolMIPS as an example
• Data path and control device
• Compiling a program, starting a processor in a simulator and on a debugging board
• Independent work. Adding support for new instructions to the processor
All course materials (slides, scripts, source codes, literature) are available online ( github , additional materials ). Slides are designed in a dubious style, when there is a lot of text on them, in the hope that it will simplify acquaintance with offline materials.
Practical and independent tasks were performed mainly on the Terasic DE10-Lite boards with Intel MAX10 FPGAs on board. We also had Digilent Nexys 4 DDR on the example of which the work with Xilinx Vivado was demonstrated. With rare exception, the examples are prepared in such a way that you can use both DE10-Lite and Nexys 4 DDR. The choice in favor of working with motherboards on Intel FPGA is due to the following reasons:
- DE10-Lite is cheaper than Nexys 4 DDR, which means it is available to a larger number of trainees if they want to continue the experiments at home or as part of the learning process;
- The same simple projects on which the course is built are assembled using Intel Quartus many times faster than using Xilinx Vivado. With all my sympathy for Vivado, we had only 4 days.
What about video
When the event was announced, I started receiving requests to organize a broadcast or video recording. Unfortunately, this did not fit into the format of the organization of the School I chose. We did not have lectures as such: a few slides, then practice. There were questions - we analyze, constant dialogue,
funny jokesand moving around the audience. Choosing between working for the camera and building productive contact with the audience, I chose the latter. How it happened - to judge the students. Please treat with understanding.
I want the same
Are you a teacher who is interested in giving students knowledge? Or are you a student who wants to get this knowledge, regardless of whether their teachers give it or not? In this case, even if you could not attend the event, you have all the information necessary for self-mastering the subject and / or building / changing the course:
- The book "Digital circuit design and computer architecture", which is available free of charge in electronic form ( link ), or can be purchased in paper ( link ). Reads easily, fascinates like fiction. It has a low entry threshold - no special knowledge is needed to start reading it. Recently, an ARM architecture supplement was released ( link );
- Sample code is available for the book, as well as slides (English and Russian versions) that can be used to build your own course ( link );
- Cheap debugging boards: Terasic DE10-Lite is, in my opinion , the best choice in terms of price / performance ratio, $ 55 for those who have proven academic status (excluding delivery). Fee ZEOWAA - when you have to save on everything. The option is working, but there may be problems with the firmware due to poor-quality USB-cable that comes in the kit;
- The materials of the current School ( github , additional materials ), as well as other events organized by YuriPanchul ( silicon-russia.com , slides and many more useful things ).
Please do not expect someone to come to you and do something good. Your knowledge, if you are a student, and the knowledge of your students, if you are a teacher, is 99% dependent on your efforts.
What I brought for myself
- In 4 days, you can either put the basic things (for those who have not read H & H), or something more advanced (for those who have already read the book). It is better not to combine.
- For those who have not read the book and have no experience with FPGAs, it is advisable to start the practice from working with chips of a small degree of integration, and only after that give FPGAs. This is very important because allows you to quickly rebuild the brain with a relatively familiar mode of "programming" on the mode of "circuitry". This was already written by Yuri ( link ). We, unfortunately, missed this stage.
- the initiator of the event and the organizer of the NSTU - Vladimir Makukha;
- carrying out the school in its current form would have been impossible if several years ago a group of enthusiasts had not undertaken to translate the Digital circuit design and computer architecture;
- My visit to Novosibirsk would have been impossible without the support of educational initiatives that exists within IVA Technologies ;
- holding a school was a big question when it turned out that the funds allocated to the university for the purchase of debug boards were stuck somewhere in the abyss of bureaucracy. Boards in the end collected "with the world on a thread." Mikhail Shadrin (NSU) borrowed several Nexys 4 DDR. Part of the boards was purchased by graduate students who came to study. Several Terasic motherboards were singled out by Alexander Romanov (MIEM HSE). But the boards were still not enough. Helped YuriPanchul , after which we with Mikhail Shupletsov (MSU) promptly organized their purchase. And the guys from Terasic without any delay as quickly as possible organized the shipment.
- Dmitry Vlasov, Anton Kulichkov and Valery Barmin helped with the school - we met a year ago in Tomsk ( link ), and this year they helped students with theory and practice.
- Many thanks to the students - without your desire to learn new things and without your persistence, we would have failed.
For 4 days <...> we plunged into FPGA-based development technologies so much that it completely changed my understanding of the use of FPGAs in the modern world in real production. Earlier in the educational process, we used FPGA only to speed up the solution of problems, and now we learned how to use microcontroller microarchitecture development <...> This school really interested me so much that I plan to develop in this direction. More such events!
Many thanks to the team, thanks to which a similar school was held at NSTU. Thank you for the opportunity to “dive into” FPGA programming, learn how other developers work with Quartus, ModelSim, and also get to know, for example, Vivado. During these 4 days I consolidated the old knowledge and learned a lot of new things, for example about MIPS. <...> I can apply the knowledge gained in my work, which has recently been closely connected with FPGA programming
Perhaps I want to note that due to limited time, you managed to present enough information for an initial understanding of the material. I personally had some basic knowledge of a hardware programming language. But the main exhaust for me is a change of view on programming as a whole. I now look at familiar things from a different angle and have an idea of how to implement these or other modules differently.
For these four days I have completely differently looked at the programming of the FPGA, at the Verilog hardware description language and at the application of the FPGA at the present time. I received an initial level of knowledge on FPGAs and digital circuitry at the 4th year of study at the university and
there were no problems with the simplest combinational and sequential circuits, but then
more and more complex and interesting ones appeared and eventually we programmed the
MIPS core . A huge advantage of this school was a huge amount of practice.
In the course of the school "from physics to chip" at APEP-2018, dogmas were stated when working with Verilog:
It is necessary to master the book of Harris. In this topic, a lot of pitfalls when writing code - absolutely identical (from the logic point of view) blocks can be synthesized in different ways <...> Simulation will give much more possibilities when developing than synthesis - pay more attention to Waveform. In professional activities, you have to work with different FPGA lines from different manufacturers, <...> Save your time in perspective (writing scripts and make-files). From the point of view of practice, a number of basic sequential and combinational circuits were considered; pipeline, 4x4 keyboard, examples of finite automata, the simplest MIPS architecture and other tasks.
ZY I found out about this school and signed up 12 hours before its start, I did not regret about attending this event, though reading the book Harris would have been much better.