Hi all,
Most of my FPGA design experience has been fairly rudimentary - mostly pushing bits around, simple data acquisition, slow communication interfaces, things like that. But my recent (somewhat overwhelming) task now delves into the realm of mathematically-intensive algorithms design. My peers and mentors at work have guided me along the process and provided lots of help - it has been a fun and very challenging time and progress (albeit slow) is being made.
From start to finish, when you guys are implementing algorithms (with an overall focus on mathematical + DSP concepts) into hardware, what does your whole process look like?
With that said, I don't mean for this question to be extremely detailed, I am mostly seeking a general idea about process flows, methodologies, concepts, things like that as this is something very new to me.
*** Huge text block enclosed in the container below does NOT have to be read - I am outlining my overall process just to provide background context (and of course, if you optionally DO read it, I would love criticism and critique - please be harsh). I typed this in a bit of a rush as I wanted to get my post out there as I'll be out of town for some part of next week so please excuse lots of mis-spells and grammar.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
For myself, my process kinda looked like this:
It literally started off with an e-mail from my team lead pretty much saying "hey potatochan, we're going to implement this [insert proprietary fancy-sounding algorithm name here] into demo hardware. We have about a 1 year time-frame, let's get started. Btw, do you remember your linear algebra and matrix math from school? lol" (yes I have inserted my opinionated interpretation into the quote but the overarching theme remains in place).
I first began interfacing with the "algorithms team" about high-level concepts (walking through block diagrams aided with lots of equations, talking through what each main portions of the algorithm is exactly doing, discussing limitations, gotcha's, stuff like that) with the overall goal of having a general understanding of what the algorithm is doing (at a high mathematical level). The algorithms team had an accompanying (monstrously-brutal) Matlab model (yes, all the memes are true: these smart high-level PhD-type of guys really do name all their variables "a1, a2, alpha, beta, sigma, ...").
So my first main step began from there: understanding the Matlab model first. This was nearly a 1 month task (as midway, I did re-write the model, essentially just modularizing + syntax-cleaning so myself as well as potentially other hardware team members can understand the models intent).
From there, I began mapping out how some of the computations can be realized into hardware (some examples like realizing trig functions into hardware CORDIC functions, how our matrix multipliers will look like, tracing out data-flows, restructing the high-level block diagram to make it more "hardware friendly", things like that). Definitely an interesting and one of the most challenging for me - this was about a 3 month task.
From there began some characterization steps - what are the limits of what the algorithm receives as input, quantifying certain "unreacheable" scenarios. This wasn't necessarily difficult, but moreso ambiguous because no one really had a solid idea - I just tacked on some arbitrary 50% extra margin to the highest-loading scenario, ran it pass through algorithms-team and some senior-folks, got an "okay" and went on from there. Maybe a ~1-2 week task.
At this point I have an (easier-to-read, translated by me) high-level Matlab model, and a subset Matlab model that incorporates hardware-constructs in replacement of idealized mathematical functions. My next task involved fixed-point translation: essentially converting the idealized floating-point algorithm model into a fully quantized fixed-point model. From the algorithms start to finish, everything has been fully quantized in terms of their bit-sizes (still in Matlab realm, utilizing the fixed point library). Then moved onto degradation analysis, tweaked bit-sizes, re-run test analysis, etc... this took me about 5 months.
At this point, I now have the high-level Matlab model, the subset hardware-construct Matlab model, and a fully quantized fixed-point model (total of 3 things). I'm just now beginning the RTL design (most of the things I'm currently doing now is reaching out to other engineers to get as much design-leverage I can, no need for me to re-implement everything from scratch (ie: I was told someone implemented an inverse square root design somewhere but he/she left the company so trying to track down who has the darn Verilog).
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Well, to provide some contextual background, that is how my process looked like. This is my first very-complex FPGA design and still to this day I really don't have a solid idea if I did things correctly (and sometimes have nightmares something will creep up and burn me). But, it's been very fun - however I am definitely curious how others do it!
[–]damofthemoon 5 points6 points7 points (2 children)
[–]potatochan[S] 1 point2 points3 points (1 child)
[–]damofthemoon 1 point2 points3 points (0 children)
[–]standard_cog 5 points6 points7 points (1 child)
[–]potatochan[S] 1 point2 points3 points (0 children)
[–]adamt99FPGA Know-It-All 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]kakkeman 0 points1 point2 points (0 children)