Buenos días
Intentaré ayudar, ya que me encontré en una situación similar cuando empecé. Técnicamente, todavía estoy aprendiendo.
Comencemos con los fundamentos de los dispositivos FPGA: FPGA significa Matriz de Puertas Programables en Campo. Para configurar el dispositivo para una función específica, se crea un campo eléctrico dentro del dispositivo que permite establecer y romper conexiones internas según sea necesario. Las conexiones se convierten en bloques lógicos, como los circuitos integrados, como un 74LS00 (una puerta NAND). Si combinamos puertas NAND, podemos crear funciones muy complejas que pueden ejecutarse a velocidades muy altas.
Para programar dispositivos FPGA, utilizamos lenguajes de descripción de hardware: VHDL, Verilog, System Verilog. Estos lenguajes se utilizan para describir el comportamiento o la estructura de la función lógica que deseamos lograr.
Para lograr esto, necesitamos un software que acepte nuestro código, lo convierta en puertas lógicas y luego lo envíe a la FPGA, donde se aplica el campo eléctrico y el dispositivo se convierte en la función lógica que describimos en nuestro lenguaje de programación. Existen muchos proveedores de dispositivos FPGA y todos utilizan software de programación propietario. Las licencias para las herramientas de desarrollo de software propietario son muy caras. El dispositivo FPGA en la PCB que compró está fabricado por Lattice Semiconductor y su software propietario se llama Diamond.
Una persona muy inteligente llamada Claire Wolf, anteriormente Clifford Wolf, realizó ingeniería inversa del archivo de programación de Lattice Semiconductor y creó herramientas de programación de código abierto para dispositivos FPGA de Lattice llamadas Yosys y NextPNR. Yosys sintetiza el código y NextPNR lo coloca y enruta dentro del dispositivo FPGA. La herramienta de software final se llama Iceprog, que toma la salida de nextPNR (un archivo de bits) y programa el dispositivo FPGA con ella.
https://clifford.at/Para estas herramientas de software se creó un programa de gestión de proyectos en Python llamado APIO. Básicamente, APIO es una herramienta de línea de comandos que combina la verificación y la síntesis del código, la colocación, el enrutamiento y la programación en un solo lugar, en lugar de tener que llamar a cada programa por separado. No tiene nada que ver con la verdura :)
Entonces... ¿dónde entra Icestudio? Icestudio es una interfaz gráfica para APIO. En lugar de escribir el código requerido en Verilog en un editor de texto, es posible dibujar diagramas que describen lo necesario. Icestudio permite hacer esto con bloques de código prediseñados. Icestudio muestra el diagrama, lo que facilita la comprensión del ingeniero de FPGA. Luego, crea el código Verilog en segundo plano, lo pasa a APIO, que lo verifica y sintetiza, realiza la función de ubicación y ruta, crea un archivo de bits y finalmente programa el dispositivo FPGA.
Por lo tanto, si se desea crear código para el dispositivo FPGA en la placa que ambos tienen, se podría usar un editor de texto y escribir Verilog que describa lo necesario. A continuación, el archivo de texto debería pasarse a Yosys, que verificaría que el código sea correcto y sintetizaría la lógica necesaria. Después, el código sintetizado debe pasarse a NextPNR para que la lógica se enrute al dispositivo FPGA específico. Finalmente, con el archivo de bits creado, se programa el dispositivo FPGA. Esto se vuelve muy complicado a menos que se tenga mucha experiencia en el uso de herramientas de software complejas. Con APIO, el proceso se simplifica, y con IceStudio, aún más.
Espero que esto ayude. Si alguien quiere un tutorial completo paso a paso para APIO o IceStudio, por favor, avíseme. Escribí algo similar en mi blog hace unos años, pero fue escrito para un dispositivo FPGA diferente.
Alex
--- In English for me mostly! ---
Good Morning
I will try and assist here as I was in a similar situation when I first started. I technically am still learning.
So lets start with the basics FPGA devices: An FPGA stands for Field Programmable Gate Array. To configure the device for a specific function an electric field is created within the device to allow internal connections to be made and broken as necessary. The connections are turned into logical blocks like the integrated circuits such as a 74LS00 - a Nand gate. If we combine nand gates together we can create very complex functions which can run at very high speeds.
To program FPGA devices we have hardware description languages - VHDL, Verilog, System Verilog - These are hardware description languages used to describe the behaviour or structure of the logic function we wish to achieve.
In order to achieve this we need some software to accept our code, turn it into logic gates and then send it to the FPGA where the electric field is applied and the device becomes the logic function we described in our programming language. There are many different vendors of FPGA devices and they all use different programming software which is proprietary. The license fees for the proprietary software development tools are very very expensive. The FPGA device on the PCB you have bought is made by Lattice Semiconductor and their proprietary software is called Diamond.
A very very clever person named Claire Wolf - formerly Clifford Wolf, reverse engineered Lattice Semiconductor's programming file and created open source programming tools for Lattice FPGA devices called Yosys and NextPNR. Yosys synthesizes the code and NextPNR places and routes the synthesized code within the FPGA device. The final software tool is called Iceprog which takes the output of nextPNR (a bitfile) and programs the FPGA device with it.
For these software tools a python project management program was created called APIO - basically APIO is a command line tool which combines verifying and synthesizing the code, placing and routing and programming into one place instead of having to call each program separately. It has nothing to do with the vegetable :)
So...where does Icestudio come in: Icestudio is a graphical front end for APIO. Instead of typing out the code required in verilog in a text editor it is possible to draw diagrams describing what is required. Icestudio allows one to do this with prebuilt code blocks. Icestudio displays the diagram which makes it easier for the FPGA engineer to understand, it then creates the verilog code in the background, passes this code to APIO which then verifies and synthesizes the code, performs the place and route function and then creates a bitfile and then finally programs the FPGA device for you.
So if one wished to create code for the FPGA device on the board you both have one could use a text editor and write verilog describing what is needed. Next the text file would need to be passed to Yosys which would verify the code is correct and synthesize the logic needed. After that the synthesized code would need to be passed to NextPNR so that the logic can be routed to the specific FPGA device, then finally with the bitfile created the FPGA device is programmed. This gets very complicated unless one is very adept at using complicated software tools. By using APIO the process is simplified and by using IceStudio the process is even more simplified.
I hope this helps. If anyone wants a complete step by step tutorial for APIO or IceStudio please let me know. I did write something similar on my blog a few years back but it was written for a different FPGA device.
Alex