📜 ⬆️ ⬇️

I went to the office of Arduino; talked about the FPGA-ah; volunteers required

This morning I went to the office of the Arduino California branch. There was an intercompanish meeting on educational programs, to which I was invited by AMD manager Timur Paltashev. At the end of the event a curious discussion arose:

Right now, students are taught to program Arduino and other devices based on microcontrollers and embedded processors (Lego, Rasberry Pye, etc.). But in the 1970s, schoolchildren were taught here, in California, to assemble circuits on a breadboard, on transistors and low-integration chips (7400 TTL, CMOS 4000, etc.) with AND-OR and D-trigger elements. It’s like progress - you can write a program on the microcontroller that would intelligently move with a robotic hand, which is difficult to do on individual logic elements, but how do we raise schoolchildren who can design (not program) the microcontrollers themselves?

The answer is obvious: you can put programmable logic integrated circuits (FPGA / FPGA) between individual logic elements and factory-produced microcontrollers and use the triad "individual elements - FPGAs - microcontrollers" to form a more complete picture of the world in children, which is not only software and a little bit of interfacing, but system thinking, in which tasks are distributed between programming and circuitry, and, even at a very simple high school level, all levels are clear and Technology - from the physics of semiconductors to the transistors to the gates - to register transfer level - to the level of micro / block processor unit - to the level architecture / system commands - to level programming in C and Python - to robots and so on.
')


The idea of ​​teaching schoolchildren on all fronts of digital circuitry and embedded programming sounds good theoretically, but how to make it happen?

Arduino already has inexpensive FPGA boards, and FPGA manufacturers began distributing free software for synthesis without complex licenses. However, on the way to Nirvana are:

  1. The unfriendliness of the software for the synthesis of the circuits and their configuration of the FPGA
  2. The serious difference between the parallel mental model of the code in the hardware description system SystemVerilog and the intuitive understandable mental model of sequential programming
  3. Specific children's problems, for example: even younger students (7-10 years old) understand relatively easily the concept of electric current, resistance and capacitors, combinational logic elements, binary arithmetic operations - but with the understanding of sequential logic (D-flip-flops, counters, shift registers, finite automata) plugging occurs, although older schoolchildren understand this.


If you do not know what FPGA is, you can read my old texts "How to start developing iron using FPGA - step-by-step instructions" , as well as "Introduction to the design of hardware chips for those programmers who have never done this" .

About mental models and children's problems, I will write separate posts, and now I’ll stop only on the unfriendliness of the software for synthesizing code in the hardware description language. This software looks heavy for a child even from screenshots:

Altera Quartus II:



Xilinx Vivado:



It is clear that for children such a GUI is not suitable. Children need a simple pure Arduino GUI, but with some specifics of synthesizing hardware description languages ​​— for example, a GUI should show the size of the circuit and the maximum clock frequency at which the circuit can work without overloading it with unnecessary details. And also show the synthesized scheme:



Writing a simple Arduino GUI should not be a very difficult task, since both Xilinx and Altera contain programs in their packages that perform synthesis and tracing from the command line, and the GUI can call these programs. It remains to find who would like to do this in the form of a popular open source project. I promised comrades from Arduino.org to look among my Russian, Ukrainian, etc. contacts, who could do this. I propose to discuss this in the comments.

Question: And why synthesize the circuitry to be embedded in the FPGA from the description in the Verilog / SystemVerilog / VHDL language? After all, is there a high-level synthesis tool that allows you to synthesize a scheme from an algorithm in C?

Answer: Tula of this kind have serious limitations on the types of schemes that they can produce. Try on such a tule to design a pipeline processor with stalls and forwarding.

Question: But I found it on the website of this very Arduin FPGA board ( http://www.cnx-software.com/2016/10/21/alorium-xlr8-arduino-compatible-altera-max-0-fpga-board -sells-for-75 / ), that it can be programmed with the usual Arduino environment, with the usual sketches.

Answer: The manufacturer simply synthesized the AVR microcontroller and flashed it into the FPGA. Using FPGA in this way is like using a CD-ROM drive as a stand for coffee. This can be done, but this does not exhaust the essence of the drive. On the FPGA, you can make a variety of schemes, ranging from a simple element And and flashing lights circuitry method, and not just flashing a large processor, designed by other people.

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


All Articles