Deep-learning FPGA. How did you?

Started by SpiderKenny 8 months ago6 replieslatest reply 8 months ago91 views

Maybe I'm one of the worst people to be learning FPGAs because I've been a firmware developer on embedded CPUs and an application developer on Mac / Windows for many years. My primary skill is in electronics design, but more and more you need to be a code developer too.

All this firmware/app development in C and C++ etc probably means I have a mental preference for procedural coding and need to get my head around the hardware definition language of FPGAs.

I've been self-teaching for a couple of years, and actually have a few working FPGA projects under my belt.

But I wonder... what's the best way to deep learn FPGA development?

As a comparison: When I was first learning C and C++ I bought loads of books, and took on night classes at Glasgow University in 1986. At the end of it, I was an expert in copying code from books into compilers and getting it to work. But sit me down infront of a new project and I was still a wee bit in the dark. Later on I discovered (the late) David J. Kruglinski's fabulous book "Inside Visual C" and my learning took off. That book actually taught proper c/c++ and didn't just lead you through some copy/paste exercises.

So I'm wondering if there's some similar books or tutorials which are considered the best in the world of FPGAs?

I have a few FPGA dev kits, including Altera DE1 and DE0, and Xilinx Arty-A7 and find that I can get things done, but when I compare my Verilog to other peoples it's pretty bad! 

So any suggestions on a great book or tutorial that really get's the job done, and doesn't just get me to copy/paste?

[ - ]
Reply by PtorruApril 1, 2022

Hi there, I am afraid I have not got a specific tutorial/content in mind. My journey was that of learning by doing a lot. I was lucky to find a Job as an FPGA developer and that certainly allowed me to keep on practicing my skills and deep-learning the technology.

Something that did change my view of the design process was when I realised that you can automate a lot of things by using the different language facilities, eg, instead of copying the code to describe 4 registers using a for loop to describe this. Maybe this was revolutionary to me because of my background (electronics).

I would like to start creating content around this actually. 

Do you have more questions that I could use to steer my writing?

[ - ]
Reply by SpiderKennyApril 1, 2022

Thanks for your reply. I appreciate that.

I don;t have any specific questions at the moment. I think mainly because I don't know what I don't know. If you see what I mean!

Really I want to avoid the mistakes that I made in my early C/C++ career and make sure I'm following best practice. In the C world Kernigan and Ritchie would be considered a good place to start. I was hoping there'd be some well thumbed books for Verilog too ;-)

So I've set myself a task to build a an HDMI matrix - 4 HDMI inputs and 4 HDMI outputs, with any input being able to be switched to any output[s], using a frame buffer to ensure no breakup in the image when switching. That's my end goal for my first 'big' project.

[ - ]
Reply by PtorruApril 4, 2022

Not a prob!

I totally understand what you say about not knowing what you don't know.

I will try to think on something that I can produce to help with that. It would be great if you could review for me any early versions!

A HDMI matrix! that is certainly going to the 'big' end of the spectrum, specially for a one-person band. A quick word of advice if I may, not sure if you have reached this point already but do consider implementing only HDMI 1.4, at least on the first go. Going up to 2.0 will require you to have some extra facilities, among other things you will need at least something like a small MCU to serve some metadata for your inputs. For 1.4 you can have a dummy switcher. Staying on the lower rates should also make it easier for your HW to meet timing, eg, correct rates on your Xvers or easier PCB requirements if you are laying out a board.

I think there is a direct-message facility here, feel free to reach out for any other off-topic questions, or create another post for them :).

[ - ]
Reply by SpiderKennyApril 6, 2022

I just found this fantastic youtube primer on getting to grips with the Arty platform (Xilinx Artix and Spartan 7-Series FPGAs)

Whilst it doesn't teach HDL, it got me further with the actual platform in 90 minutes, than hours of following the official tutorials.

It made me feel quite a bit more comfortable with the Arty platform, which is what I'm using for my learning process!

[ - ]
Reply by PtorruApril 11, 2022

Oh wow! that's a super cool find! Thank you!

[ - ]
Reply by SpiderKennyApril 4, 2022

Thanks again!

I'd be more than happy to review your early versions etc. 

Yeah - for HDMI I don't intend to be decoding the raw HDMI signals myself, inside the FPGA, but will use something like the ADV7610 which breaks out the component signals. I will maybe have to emulate the EEPROM from within the FPGA. 

I have a specific use-case in mind, and will only be supporting broadcast resolutions up to 1080p/25

I will probably use my Artix-7 'ARTY' board to start with, as it uses the same FPGA as a number of existing HDMI switchers (Like ATEM Mini) but they are not matrices.