FPGA-Based DSP Options


#1

Every now and then, among the struggles and the giggles, axoman manages to shock the community by looking a heck of a lot more intelligent on the forum than he could ever manage in the flesh. Today is such a momentous occasion, for today, axoman talks about FPGAs, something which axoman believes the ideal Axoloti should be based around.

As a user, ask yourself, how many times have you wanted to do something but are quickly brought down to earth when you realise that your expectations greatly exceed the physical capabilities of the hardware? And how many times, I wonder, has @johannes sat there scratching his head thinking, hey ARM, that was a really dumbass way to design a processor, cause it would have been so much better if you had dedicated this to more outputs and that to something else.

Well, the answer to all these problems appears to be FPGA technology. FPGA stands for Field Programmable Gate Array, which for those of you not as intelligent as axoman, basically means it's a completely programmable chip architecture. It's an IC that becomes whatever you program it to become, be it a processor, amplifier, anything, absolutely anything you want it to be. It's kinda like being AMD, ARM, ATMEL or INTEL, you get to completely design what the IC does!

So it arrives completely dumb, it doesn't do anything until programmed to be something, and that means you get to decide which pins are input pins, which pins are output pins, and everything that sits between those pins. And because FPGAs are effectively realtime, they don't have the burden of working like a standard processor that processes intructions one at a time in a serial fashion. FPGAs can do processing in parallel, in realtime, at truly insane frequencies if you design them that way.

So what I'm getting at here is that rather than settle for off-the-shelf components and designing Axoloti around a STM32F427, you could program your entire system into a custom microprocessor chip, where the very architecture of the chip is designed by yourself to do exactly what you want it to do. I think that's amazing, really amazing, and apparently the only thing you need to learn in order to design and use an FPGA, is to learn the Varilog/HDL language, which is basically special language used for programming your custom structure into the FPGA.

I honestly recommend everyone watch this video, even those of you with no interest in the actual electronics side of things, because I think his enthusiasm alone will make you realise why devices such as these are the future even though they're already with us, and have been for some time:


#2

How much do they cost?


#3

To make a freely patchable and user-moddable modular synth in an FPGA you'd need to perform the logic synthesis - that is, the multiple step transformation from a HDL (such as Verilog or VHDL) to an actual configuration for the FPGA. This is currently performed by very advanced software suites from the FPGA vendors.

If Johannes were to do that, he'd have to develop all the software needed to synthesize a collection of HDL modules and interconnections into an FPGA configuration bitstream. You could liken that to writing the currently used ARM compiler and all the associated tools, only much bigger and more complex. That would be in addition to all the other software he is actually developing now. It would be orders of magnitude more work than what currently goes into Axoloti.

Also, user contributions would have to be written in highly conforming chunks of HDL - that's nothing that the majority of currently contributing people could easily do.

By using off the shelf CPUs and tool chains, one can get something like Axoloti up and running in a reasonable amount of time and within a reasonable budget. Johannes "only" have to write the firmware, the patcher and a base library of factory modules. Then users can easily contribute modules - you don't even have to actually know C/C++ programming as long as you grasp a few essentials.

It's exactly employing an off the shelf CPU and the associated tool chain that makes Axoloti possible.


#4

Was just looking into it, they range from under a few Dollars/Euros/Pounds, but price depends on how sophisticated the FPGA is, how much complexity it can hold etc.

I know what you mean, but there are many ways those FPGAs can be programmed and put to use. In the video he pointed out at least three things that I think make FPGA a very viable solution. Notice how he mentions that you can program your own CPU into it, or you can use a ready made one that would effectively run as a "Soft Core". That means, for example, that in a single FPGA you could load a complete STM32F427 microcontroller into it, or you could load two, or four, or eight! This means the programming would work just the same, but the benefit is that because it's now a "Soft Core", it means Johannes could change the specification of the STM32F427 wherever he feels it would be done better in a different way. For example, he could leave in all the specs of the processor he currently uses as they are right now, but change unused pins to extra output pins. He could change the voltage specifications of any pin, he could arrange his own virtual RAM, he could access storage cards at speeds that are completely impossible otherwise.

All within a single chip!

If you don't want to create your processor own from scratch, simply load in a "Soft Core" version of a ready made processor and edit it to your own spec. Amazing, you can even design electronic circuits using standard circuit design software, and the FPGA software will convert it into an actual electronic circuit that runs inside the FPGA.

You could mix and match multiple ready-made processors to create a multicore processor, and load them all into a single FPGA, all interconnected internally within a single FPGA providing it's large enough for the task. The technology is bleeding edge and daunting, but at least there are ways to make it accessible, there's even videos out there for complete beginners, was just watching this one for example:


#5

Looks like the DE0-Nano is a good entry into this stuff, nice little board and a good software bundle, a complete hardware development environment, pretty damn cool, I might even be daring and get one :stuck_out_tongue_winking_eye:


#6

A bit off-topic, but I used to do a bit of FPGA programming in VHDL and own some dev boards. I remember I loved messing with that stuff. A couple of friends and I made a 16bit game console on one of them. But I don’t remember much anymore, unfortunately.


#7

This topic has been touched on before.
At this stage, I think Johannes comments on this make aloty of sense.
I would guess if the FPGA route was decided apon the first time it was suggested on the forum, that nothing would have progressed any further and we could still be waiting for a completed product. If I understand correctly, you cannot just add a soft core for STM32F427 mc, and expect it to work the same. You would have better replacing it with a faster arm like STM32F7 or the STM32H7, with a bit of luck much of it may be compatible and won't require too much re-work.
I have read quite alot about FPGA's, tempted to get one and try my luck with verilog, after all I have been hobby programming for many many years, surely it can't be that difficult.... :stuck_out_tongue_winking_eye: Yeah Right, what tree did I climb out of... programming in FPGA is nothing like C, Basic, python etc, etc, etc,, you are literaly programming gates, so you need to understanding the timming sequences and ensure the relevant gates take full advantage of the sequence. In another way, I would expect mimicking an STM32F427 with an FPGA is just going to slow it down and prevent you from taking full advantage of it.
I have read on "newelectronics" however that there are future designs underway by some FPGA and Microcontroller manufacturers that will bridge this gap with new type of hardware and supporting software, but I guess like most things, it takes a while for these things to become available for hobbiests.

There is one thing I am curious about though, and that is the axoloti patcher itself, I do wonder if a version of it could be used as a graphical programming environment for FPGA's. I am not even a novice when it comes to programming gates but I do wonder wether the patcher is able to capture some of the concepts visualy.

:thinking:


#8

@Abhoth
Not in the least bit off-topic, sounds very cool. What I personally like about these chips is that you can replace a whole bunch of stuff and just run it inside the FPGA, so even a basic project like an Arduino could be simplified further still. You could load a "Soft Core" version of the ATMEL into it, for example, and create a custom display driver for your Axoloti using an Arduino. Sure, you could just use and Arduino, but the point is, in an FPGA you could take the ATMEL chip as well as all the external logic IC's you would normally require to drive a display, and sort of 'Host' all of those ICs on a single FPGA connected to Axoloti.

@Gavin
Wasn't aware it was brought up before. I only just discovered these things and am really fascinated by them. I would definitely buy one if I were you Gav, cause the stuff you would be able to do in order to interface with an Axoloti would be incredible. I've been doing some heavy research into it, and I've already come to the conclusion that it's no coincidence both Dave Jones and Ben Heck both chose to demonstrate using the DE0-Nano. It appears to be the best designed board cause it has the programmer built in, doesn't take up all the IO, comes with all needed connection, and a complete commercial grade suite of development software for it as well.

Even axoman can understand the user manual for it (to an extent) so it can't be that bad or too hard to get into. Here's the manual for the kit, so read it and want it :stuck_out_tongue_winking_eye:

And it's not too pricey to get into, either (Around £60 for the complete kit/hardware/software suite):
http://uk.farnell.com/terasic-technologies/p0082/ep4ce22f17c6n-de0-nano-dev-kit/dp/2076463


#9

If you want ARM cores, single or multiple, it's more efficient, cheaper and easier to just use several ARMs or a multicore ARM. A few extra output pins could be made with some very cheap register chips.

As an example of cost, an ARM Cortex M0 can be had as a soft IP core with a $40.000 license fee for commercial use (ARM press release). The M0 core has no DSP extension (a necessity for Axoloti) and no floating point (used in Axoloti). The FPGA resources to run this core is significant and costs more than a dedicated silicon version. The M4 core used in the Axoloti is several stages advanced from the M0 core. I haven't found a soft core M4 with floating point - don't know if it exists (perhaps someone into ARM soft cores can tell us more).

There is another option though, even if not in Axoloti territory cost wise, and that's a SoC (System On a Chip) like the Xilinx Zynq family. These combine one or more dedicated fast (600+ MHz) silicon ARM9 or better cores and an FPGA on the same chip. The FPGA fabric can be used for specialized co processors, advanced IO modules and so on. As you can imagine these chips are expensive. BTW, the new Valkyrie synthesizer (fixed architecture) is based on a single Zynq 7020 (two ARM9s and a fairly large FPGA for its 1280 oscillators and 256 filters).

Actually implementing a variable architecture modular synth directly in FPGA is too much work and too expensive, and just using a soft core ARM in FPGA to run the current Axoloti doesn't really add anything apart from cost and complexity. Remember, the Axoloti is meant to be cheap and easy to use and develop for.


#10

Wow, I had no idea it worked like that. Certainly the use of a Soft Core is out of the question for most people and even companies then. I do agree it would be better to just use a ready made core. I'm still extremely fascinated by FPGA technology though, and funny thing is, now that you just brought me back down to earth, its still really the attraction of being able to design whatever is required, that reels me in. You'll probably laugh your knackers off when I say this, but I only happened to stumble upon these things after following various projects on YouTube on how to design a computer from scratch using transistors. Not out of any insane belief that I could create my own supercomputer, but really just to get a thorough understanding.

The whole "Logic" thing has really grabbed me now, and being able to program massive arrays of them into a chip like that is bloody fantastic! Technically, I can already create my own very primitive computer from scratch, no kidding, and it's just awesome to think that these devices actually miniaturise what would be, let's face it, otherwise huge logic circuits into a single IC, is pretty damn awesome!

It's always pissed me off that consumer electronics are burdened by the designs and codecs set-out by technology and electronics giants. But something as simple as understanding how transistors can be used to design any parallel-capable hardware you want, totally vaporises those limitations and feels (is) very liberating! I'm already thinking about creading my own arrays of RGB LEDs to act as a display, and how they can be driven directly by raw data that does not involve codecs or compression of any description.

Once I get that down, I'll do the same with audio, with the intention of being able to create complete audio-video-capable systems by combining the various systems I come up with. I scare myself sometimes, but fact is it's actually a lot easier to create something from scratch (bare transistor logic), than it is to learn something that some other person or company has developed.

So I'm very much obsessed with this (to me) new toy that I have found, and will definitely be buying that NE0-Nano to play around with, but I do understand why Johannes has not used one in Axoloti now that you've explained this stuff, so thanks for that, I appreciate the discussion.

On a more humourous note, it's just as well FPGA technology exists, it can save a lot of messy development work. For example, an FPGA workflow has the ability to allow Axoman Industries to develop a quality product and stop our state-of-the-art development lab producing stuff that looks almost as good as this one!

And before anyone thinks, yeah, typical China eBay product, think again, cause the label suggests its a very fine German product indeed (oh and check-out the close-up of the power supply board) :open_mouth: :stuck_out_tongue_winking_eye:

Actually though, while I laughed at the video, I really like it. I like the intuition and determination of whoever produced it, cause at the end of the day, it could have been produced be the poorest guy on earth, someone who had managed to pull-off an early specialist Windows XP touch screen tablet and market them to specialist commercial users (in this case hospitals), hahaha, good for him (or her) :grin:

But even a super-basic, single FPGA could have saved a whole bunch of mess in that enclosure!


#11

maybe it would be much more interesting to use an fpga to try and replicate the famous neural network synthesizer of david tudor:
https://davidtudor.org/Articles/warthman.html
more detail here:
http://www.warthman.com/projects-Dr-Dobbs-A-Neural-Network-Audio-Synthesizer.htm

for a quick listen, youtube has excerpts of it.(the released double cd is binaural originally though):


#12

This new "Virus lookalike synth" Valkyrie uses FPGA technique and dual A9 ARM cores:
128 voices 32X oversampled architecture
24 bit 96 khz Audio over USB.
Etc......

Pretty heavy spec'ed.

Sounds like a dream but pretty much "standard" synth.

Sound examples, not really my style of music, but damn quality is superb:


#13

No laughs here! FPGAs are indeed fascinating and ideal for prototyping and learning as well as for specialized and/or low volume commercial projects. I highly recommend playing with an FPGA eval board for anyone interested :+1:

@jaffasplaffa: The Valkyrie was my go-to example of a fixed architecture FPGA based synth above - a very impressive project indeed :slight_smile:


#14

@DrJustice

Ahh Yes i see now, didnt read through it all.

Yeah its very impressive. The quality seems pretty up there :slight_smile:

Man, I LOVE all the new digital technology we are getting these days. All the extra power we get, means better quality, "warmer" sound, etc....... Whats not to love about it? :slight_smile:

I remember reading a post by the guys from Make Noise, that they posted from Namm. Mr. Buchla himself visited their booth and they said that he had no interest in all the analog stuff they made, but he was a lot more fascinated by the digital stuff.

And he even stated that with the technology we have now a days, he dont see any point in making analog devices anymore. Anyway, just loving new techologies, like FPGA and whatever we have coming, not trying to start a digital/analog warfare.


#15

@hwk I'm going to enjoy looking into that in more depth. Took a quick look at various areas of the website and it does indeed look as if an FPGA would be perfect for such projects as that!

@jaffasplaffa Hey, you know me, I have no fear of analogue/digital warfare, simply because you all got owned by axoman last time there was such a discussion, and as far as I'm aware, the laws of physics have not changed since then, so axoman still owns (and analogue is still the daddy) :grin:

Actually though, you'll notice that in the very first video posted in this thread, Dave points out that you cannot do analogue with these devices. Well technically that's true, you cannot do analogue with an FPGA. However, there is currently a product under development called Scanalog, which is a device known as an FPAA (Field Programmable Analogue Array). It's not available yet, but man, can you imagine, you'd be able to program the most enourmous analogue modular synthesizers into a chip (real analogue)!

Wouldn't stop there, either, cause it means you could program analogue parametric EQs, analogue compressors, analogue mixers, basically a complete analogue studio (real analogue), all inside a chip!

Here's a few videos I found on what's being developed, basically the analogue equivelent of an FPGA:

And a more in-depth discussion on the FPAA-based product that is being developed:

@DrJustice Thanks for the encouragement, and yup, you bet I'll be playing with this stuff. Just imagining what would be possible by combining an FPGA and FPAA on a single circuit board is absolutely insane, man, the stuff that can be done with it. And taking, for example, an FPAA and interfacing it with Axoloti would enable the production of real analogue synthesizers controlled by Axoloti logic and MIDI etc.

My brain is in overdrive, and is rapidly reaching meltdown just thinking about it :heart_eyes:


#16

This simple chip combine FPGA FPAA MCU and DSP. Little resources but low price and big fun :slight_smile:
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-and


#17

@JLS Wow, this just gets better, thanks for posting that!!!

Just took a quick look, and while I have my doubts about the analogue side of it, it still looks to be an amazing product and the price is incredibly good, lol, just $10 for all that. Damn, lot of documetation for it so I'll look for a few videos on YouTube about it first, see if I can get a better understanding of what they mean by "Analogue". I get the slightest feeling that they are talking about analogue in the same way the Arduino peeps do, that being PWM. You can use PWM to generate an anlogue signal by connecting components, and I think perhaps that's what they mean by analogue. If not, and the blocks inside are actual analogue as they are in the Scanalog system, then all I can say is double-wow, that's bloody amazing!


#18

I guess that's all a matter of perspective :slight_smile:

Anyway, we have good things coming for us :slight_smile: Lets see what the clever people can come up with, this is a bit over my head, but non the less interesting.


#19

No no, it's just a matter of real-world physics :yum:

Anyway, no point getting into that stuff, especially not right now while I'm currently reveling in the wonders of digital logic and stuff. It's amazing how, even with the internet, it's taken me so long to stumble across this stuff, and now that I have, even more of it is coming thick and fast!

Yup, interesting stuff :slightly_smiling_face:


#20

Regarding FPAAs, the Paradigm Synthesizer uses 4 Anadigm FPAAs. GS thread here. There isn't a vast amount of resources on those chips, but they can be reconfigured to cover different voice modes.