Side note, this might seem like stupid question, but can anyone explain what APIO[1] is (which TinyFPGA uses)? I'm kind of confused what it's used for.
Side note, this might seem like stupid question, but can anyone explain what APIO[1] is (which TinyFPGA uses)? I'm kind of confused what it's used for.
apio is a command line tool that automates installing the toolchain for your FPGA and running it. It just simplifies things, you don't have to use it if you'd rather call the individual tools for synthesis, P&R, simulation etc. It'd be reasonable to think of it as akin to a very smart Makefile combined with an automatic package manager, specialized to FPGAs (it's based on PlatformIO). It's nice when you're still kind of getting oriented, because you don't need to know how to set up and invoke the different tools... just call `apio build` or `apio simulate`.
Thank you for the explanation for APIO! Do you use it often? Or are there alternatives that people use when they get to a certain level (Like Atom/VScode --> vim)?
It feels to me like there is an enormous gap between the level of complexity in implementing a simple CPU like I did to something that would actually be useful to anyone, even something relatively small and basic. Things like integrating with other components or building up more complex designs feel outside my reach.
The resources I find are generally targeted either towards a very basic level of how electronics work or a very specific level of a particular task with a device. This seems like a really interesting area, but difficult to get comfortable with.
The best place to start is to just grab a book and an FPGA kit and go. You'll probably have to try a bunch of tutorials until you find one that clicks for you and after that it gets easier. For iCE40 you can also check out IceStudio, which is a graphical block based IDE that can be helpful for getting your feet wet. Get some hardware to give you feedback and play with, e.g. a 7-segment display and implement a driver yourself. Watch YouTube videos to get an idea of the general flow of things and eventually it'll make sense. IMO it helps a lot if you have a background in electronics, if not you're gonna be in pretty deep.
I use apio because it's convenient. Hardcore FPGA devs are going to use the manufacturer's IDE. The official Lattice tools for the iCE40 are unbelievably awful and there's not much to gain from using their iCECube2 IDE versus open source ones, but in most cases you don't have any choice in the matter and have to use the manufacturers tools. This isn't so bad though, I've had some exposure to Xilinx's ISE and Vivado and they are pretty decent, plus Xilinx gives you access to a ton of free IP cores that you can drop into your design.
Maybe even turning a brushless motor with an encoder into a servo motor.
My main idea for using FPGAs would be talking to a couple of i2c/spi sensors and reducing the data rates. Some sensors only have one or two possible i2c addresses, some require multiple requests to get a limited amount of data, reducing the polling frequency.
They are also used on the motor control side, though these days a motor control mcu may be more practical in most cases today.