Author Topic: Getting started with DSP - any suggestions?  (Read 11805 times)

0 Members and 1 Guest are viewing this topic.

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #25 on: June 17, 2018, 08:12:02 pm »
Well, IDDE and hardware Debuggers need to be in the bill. ADI hat free Sigma Studio. To be honest on the TI-devices I coudln't find a buy-option for die IDDE. In general I prefer support for opensource-software ;)

Well, it might be a good way to emulate your filters first on your computer. But what I'm really about ist getting my fingers on an DSP. So my first step will be bypassing a signal. Then some equalization, limiting, modulation-effects. It's more learning by doing, as I can't specify a usecase for a technique I'm not used to.
In the end I'd like to have a small device within the size of a stompbox that fits on my floorboard :)
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8605
  • Country: gb
Re: Getting started with DSP - any suggestions?
« Reply #26 on: June 17, 2018, 08:17:19 pm »
To be honest on the TI-devices I coudln't find a buy-option for die IDDE. In general I prefer support for opensource-software ;)
Maybe you couldn't find a buy button because the TI CCS software is a free download since version 7 came out.
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3279
  • Country: ua
Re: Getting started with DSP - any suggestions?
« Reply #27 on: June 17, 2018, 08:19:01 pm »
Quartus for Altera Cyclone FPGA is free. Evaluation board will cost from $30 to $300, depends on your needs...
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4922
  • Country: si
Re: Getting started with DSP - any suggestions?
« Reply #28 on: June 17, 2018, 08:36:53 pm »
Yep ARM can give you some pretty impressive performance these days. For example the STM32H7 family comes in a easy to solder TQFP and gives you a 400MHz ARM core with a double precision floating point unit. The Attolic Studio IDE that is provided is also easy to use.

If you go higher up into ARM SoC chips then you also get the Neon extensions and that pretty much gives it DSP capability. It has instructions for the common DSP math operations and can do up to 4 calculations per clock cycle(or even 16 if you don't need many bits). Combined with the high clock speeds and large number of cores, it makes them even faster than a lot of real DSP chips. But still much like with DSPs getting it to actually do multiple math operations per cycle is pretty complicated so squeezing all of the performance out of it is still pretty involved (Compiler magic, special instructions, special memory arrangements etc).

And if you want to go even faster a FPGA is the way to go. Its even more of a pain in the ass to program for since you need to do it in HDL, the algorithms need to be running with fixed point math, its dificult to debug etc. By far the hardest to make it work and the chips can get expensive but it gets you to the processing  powers of a modern PC CPU or even beyond. And a modern intel CPU is a pretty bad ass floating point DSP with the extra math instructions (And we are not even getting to GPUs for math).
 

Offline carljrb

  • Contributor
  • Posts: 24
  • Country: ca
Re: Getting started with DSP - any suggestions?
« Reply #29 on: June 17, 2018, 09:27:05 pm »
I've done a few boards with SigmaDSP's and I'm glad to have moved on. It's easy to get started if you know nothing, but then it just becomes very limiting, and everything was just too undocumented (like what values to pass to change parameters).

ARM Cortex M4F and M7 MCUs are pretty good overall. I'm moving to the STM32F7 myself. They're not quite as powerful as something like SHARC or Blackfin but it's a lot easier (not a big fan of my blackfin board really, and CCES is $1000+ too). As for FPGAs, they're a nice tool and they're quite capable, but the idea of having to convert from I2S, processing the sound (somehow translating your sound processing code into an HDL) then back into I2S -- plus configuring codecs and what not, all in HDL... seems kinda daunting to me.

Edit: you might like this comparison:
https://dspconcepts.com/sites/default/files/pd8_beckmann.pdf

Edit2: As for the TMS320C6652, good luck with that! It's a 625 pin BGA, and if you want DDR3 to go with it then that's starting to be quite an "advanced" PCB!
« Last Edit: June 17, 2018, 11:34:37 pm by carljrb »
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 708
  • Country: us
Re: Getting started with DSP - any suggestions?
« Reply #30 on: June 17, 2018, 10:06:11 pm »
You don't really say what your level of experience is with embedded SW dev.  If you don't already have a good working familiarity with an embedded architecture (ARM, a DSP, or otherwise), you'd be crazy to dive into writing DSP code as a "gateway drug".  I strongly endorse the initial reply, to "do it in Octave first," except in place of Octave, I might prefer Python with numpy/scipy.  Whatever is most comfortable for you.  But you really want to get things working in an enviroment where you can plot waveforms on the screen, halt, single-step, and debug at will.  None of that is easy on an embedded target when you are sampling signals in real time.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Getting started with DSP - any suggestions?
« Reply #31 on: June 17, 2018, 11:11:24 pm »
How about the Analog Devices Blackfin?  It is intended for DSP.  It lacks an MMU so it has to run uClinux if an OS is even needed.
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1963
  • Country: us
Re: Getting started with DSP - any suggestions?
« Reply #32 on: June 17, 2018, 11:22:57 pm »
Yet another option is an xmos uC. They are primarily used for audio stuff these days and you can get a dev board with everything(or almost)you usually need. I use them for robotics so I'm not entirely sure but that is what they market them as. Sort of a cross between dsp and standard uc.
 

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #33 on: June 18, 2018, 12:08:39 am »
I spent lots of time on AtMegas and AtTinys and I developed an own PCB for nRF51. I'm more the hardware-guy - but I wanna lern the softwarepart as well ;)
I was always excited about learning how microcontrollers and electronics in general work - now as I understand them and I can use them I wanna get to a higher level. That's where DSPs come in.

To be honest: I would like to solder a TMS320C6652's BGA myself :D We got a Ersa PL550 at work - but first I'd give it a shoot on a cheap asian 300 bucks reworkstation.
But first I need to choose a device and master the softwareside - that's what I'd like to learn.

Blackfin is on my list, have to read some specs about it. Xmos I've never heard.

 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Re: Getting started with DSP - any suggestions?
« Reply #34 on: June 18, 2018, 12:23:46 am »
I spent lots of time on AtMegas and AtTinys and I developed an own PCB for nRF51. I'm more the hardware-guy - but I wanna lern the softwarepart as well ;)
I was always excited about learning how microcontrollers and electronics in general work - now as I understand them and I can use them I wanna get to a higher level. That's where DSPs come in.

To be honest: I would like to solder a TMS320C6652's BGA myself :D We got a Ersa PL550 at work - but first I'd give it a shoot on a cheap asian 300 bucks reworkstation.
But first I need to choose a device and master the softwareside - that's what I'd like to learn.

Blackfin is on my list, have to read some specs about it. Xmos I've never heard.
Again: work out the algorithm first and then choose the hardware. Trust me: debugging code on an embedded platform just sucks even with a $500k in circuit emulator/debugger. It will never give you the freedom and features you have for free on a PC. I get that you want to get your hands dirty on some hardware but then the goal of your project has to be tinkering with DSP hardware and not creating an actual project.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6692
  • Country: nl
Re: Getting started with DSP - any suggestions?
« Reply #35 on: June 18, 2018, 12:35:39 am »
you'd be crazy to dive into writing DSP code as a "gateway drug".

If he wants to understand the field of audio DSP and knows enough algebra I'd direct him to read back issues of Computer Music Journal and some books on the topic. Tinkering in Matlab/Octave isn't going to teach him.

None of the effects he mentioned are worth reimplementing if you understand the algorithms, there's a million implementations already, just copy paste code from Csound or something. If he wants to know how to create a flexible, low cost, low latency DSP system to run audio DSP code, that's entirely orthogonal ... and something which actually hasn't been done outside Bela. I think there is room for more products. There are certainly lower cost hardware platforms than the Beaglebone Black.

I think a platform based on an Allwinner H2+/H3 board would be interesting. Can't compete with the prices of that hardware. Use Xen to run Linux on one core and run FreeRTOS on the other 3 to do audio I/O and processing. Simpler said than done, but most of the building blocks are there (Xen supports H2+/H3, FreeRTOS supports Xen and Arm). Ideally it would be able to run Carla and have the LV2 plugins and audio I/O run in the FreeRTOS realms ... even less simply done, but would give you access to a huge library of audio effects and a GUI to configure them.
« Last Edit: June 18, 2018, 12:42:04 am by Marco »
 

Offline carljrb

  • Contributor
  • Posts: 24
  • Country: ca
Re: Getting started with DSP - any suggestions?
« Reply #36 on: June 18, 2018, 01:19:40 am »
I spent lots of time on AtMegas and AtTinys and I developed an own PCB for nRF51.
I hate to say this, but this old 8 bitter stuff (blinking LEDs and such) is beginner-level and it has little to nothing to do with this DSP stuff... You'll need a LOT more knowledge in terms of software and math.

To be honest: I would like to solder a TMS320C6652's BGA myself :D We got a Ersa PL550 at work - but first I'd give it a shoot on a cheap asian 300 bucks reworkstation.
Soldering this part will be the easiest part of the project by far! The problem with this BGA isn't the soldering, it's the whole 10 layer PCB with micro vias, ~4mil traces and the like (a batch of proto PCBs will likely cost you $1000, and many places will cost you more than that in NRE fees!) Months of work floor planning the PCB, escape routing, length matching, calculating controlled impedances for your own stackup for everything, PDN planning, making sure there won't be EMI/EMC/SI problems and the like... You'll need to have access to fairly pricey and advanced tools, to be very good at something like Allegro and much more. It's a job for a small team of experienced engineers with a sizeable budget. Then of course there's the math/audio/DSP part too which can take many years by itself...

Octave/Mathlab/python can be good options to learn. If anything, you should look into how it all works first. Chances are you'll completely change your mind, or go with something more beginner-friendly like SigmaDSP.

A couple good options:
https://www.coursera.org/learn/audio-signal-processing
http://www.eas.uccs.edu/~mwickert/ece5655/
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: Getting started with DSP - any suggestions?
« Reply #37 on: June 18, 2018, 02:50:30 am »
I spent 30 years in the oil industry doing DSP at scales you cannot imagine ( e.g. 10,000 Xeon cores for 2 weeks).  Listen to nctnico.  Develop your algorithms first using Octave and  a WAV file as input.  R is not a good fit for what you want to do.  R is for statistical analysis.  Octave is for linear algebra.   You want to do linear algebra.  After you have the algorithm developed figure out what you need for hardware.  A Zynq is pretty much ideal.  A Zybo Z7 has audio I/O all set up ready to go.  You've got dual ARM cores with NEON FPUs and an FPGA for the heavy lifting.  I can make a recording in your shower sound like Carnegie hall with one.  Well, at least once I learn to program the FPGA ;-)

You're going to find that the mathematics of DSP require a significant amount of effort to master.  And there is no way to avoid it.

Get copies of:

Principles of Digital Audio
Ken C. Pohlmann

and

DAFX: Digital Audio Effects
ed Udo Zolzer

I've not read either of these.  I bought them because they looked like good treatments of a niche subject.  I can do anything in them from scratch.  I  bought them because I'm lazy and if I can get something going in an hour or two just one time using a book it's a bargain relative to spending a day working it out from first principles.
 
The following users thanked this post: apblog

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3279
  • Country: ua
Re: Getting started with DSP - any suggestions?
« Reply #38 on: June 18, 2018, 03:31:54 am »
here is nice and small board to start: https://www.amazon.com/TERASIC-TECHNOLOGIES-CYCLONE-EP4CE22F17C6N-DE0-NANO/dp/B00MEKRXAE

Also, if you want budget solution, you can get these modules:
1) FPGA module + USB Blaster: https://www.aliexpress.com/item/fpga-development-board-EP4CE22E22C8N-board-altera-fpga-board-altera-board-USB-Blaster/32834582202.html
2) Sound module: https://www.aliexpress.com/item/FREE-SHIPPING-Wm8731-module-audio-module-mcu-fpga-music/1674210328.html

If your DSP needs a lot of memory, there is another module with SDRAM on the board: https://www.aliexpress.com/item/cyclone-iv-board-E22-core-board-altera-fpga-board-altera-board-fpga-development-board-EP4CE22f17C8N/32853228751.html

If you want to buy cheap entry level FPGA just to start, here it is: https://www.aliexpress.com/store/product/xilinx-fpga-development-board-spartan6-xilinx-spartan-6-XC6SLX45-xilinx-board-xilinx-spartan-6/620372_967529392.html
If you don't have USB-Blaster, you can buy it together: https://www.aliexpress.com/item/EP4CE6-altera-fpga-development-board-USB-Blaster-fpga-kit-altera-kit-fpga-board-altera-board/32812957811.html
It's power pretty enough to implement some DSP filters and effects.
But if you're planning to implement high quality and very heavy filters, it's better to buy more powerful FPGA...

But note, these Chinese USB-Blasters is not original, it may not works with the latest drivers. If it doesn't works, you will need to install old USB Blaster drivers from Quartus 13

So, you can buy 6k FPGA module and sound module just for $35. Also you will need 5V power supply and some wires in order to connect it together and start learning Verilog language and implement your first FPGA design. The seller can provide you with some examples to start... When you learn FPGA basics you can start implementing your first DSP...

$35 is just one lunch and a couple of bottles of beer, I think this is no so expensive to start learning FPGA and DSP   :)
« Last Edit: June 18, 2018, 04:02:59 am by radiolistener »
 

Offline carljrb

  • Contributor
  • Posts: 24
  • Country: ca
Re: Getting started with DSP - any suggestions?
« Reply #39 on: June 18, 2018, 04:04:44 am »
these Chinese USB-Blasters is not original, it may not works with the latest drivers
They still work fine with the drivers from Quartus 18 located in C:\intelFPGA_lite\18.0\quartus\drivers or similar.
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6692
  • Country: nl
Re: Getting started with DSP - any suggestions?
« Reply #40 on: June 18, 2018, 04:05:13 am »
Fixed point programming on a FPGA ... well that's a surefire way to never implement a whole lot. Implementing one or two effect algorithms on a FPGA are a good way to motivate yourself to learn FPGA programming, but FPGA's don't make a lick of sense for an audio DSP platform.
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3279
  • Country: ua
Re: Getting started with DSP - any suggestions?
« Reply #41 on: June 18, 2018, 04:20:27 am »
FPGA's don't make a lick of sense for an audio DSP platform.

with FPGA you can do things which is impossible on classic processors...
You can even create your own ARM core processor inside FPGA to execute some code...  :)
Very high speed, extreme low latency and high quality realtime DSP... This is FPGA  8)

They still work fine with the drivers from Quartus 18 located in C:\intelFPGA_lite\18.0\quartus\drivers or similar.

As I know, they send different versions in the same box (with different controller PIC, STM32 and Cypress).
Some versions works ok with the latest driver, but some other require old drivers...
« Last Edit: June 18, 2018, 04:50:25 am by radiolistener »
 

Offline carljrb

  • Contributor
  • Posts: 24
  • Country: ca
Re: Getting started with DSP - any suggestions?
« Reply #42 on: June 18, 2018, 04:51:28 am »
It can do a lot, but now you just expected him to pick up FPGAs as a preliminary topic on top of everything else. Why not design your own softcore CPU with that indeed? This will only add a few more years to his project, along with the necessary math and DSP knowledge. Coding audio effects and filters in VHDL/Verilog (while talking to a codec over I2S + config over I2C no less) isn't exactly beginner level... I mean, I already use FPGAs and do audio DSP work and it's still beyond my current skills.
 

Offline NewestRigolUserTopic starter

  • Contributor
  • Posts: 18
  • Country: de
Re: Getting started with DSP - any suggestions?
« Reply #43 on: June 18, 2018, 05:12:37 am »
FPGA sounds quite nice - but it's hardware to emulate other hardware to do calculations for softwareI wanted to use.
I'd like to understand FPGA as well as DSP. But it seems that timt is the limiting factor.
I'd be glad to spend month or even years on this hobbyproject. But learning HDL plus learning DSP plus implementind DSP on FPGA plus playing around with this seems to be a lot more than what should be needed at the beginning.

I need it to be ready to forward a signal from input to output, really soon. If I can't see any success it won't be fun working with it. So maybe the SigmaSDPs are what I want.
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3279
  • Country: ua
Re: Getting started with DSP - any suggestions?
« Reply #44 on: June 18, 2018, 05:15:15 am »
carljrb: ok, I agree, audio processing with simple effects is a not big deal and can be done on DSP or some kind of raspberry pi.
Actually it can be done on any modern notebook, and there is no need to deal with microcontrollers, DSP or FPGA at all...
But if I understand correctly, NewestRigolUser interesting to learn something fast and powerful...
And I think FPGA is a good starting point for that...  :)

Here is source code for FPGA-based multi-effects system for the electric guitar (from video above):
https://github.com/Vladilit/fpga-multi-effect

You can found nice document here: https://github.com/Vladilit/fpga-multi-effect/blob/master/FPGA%20Design%20and%20Implementation%20of%20Electric%20Guitar%20Audio%20Effects%20-%20Project%20Report.pdf

Using it you can reproduce this project with no programming at all... Just buy this Zedboard Zynq 7000 demoboard and use provided source code and manual. There is detailed information about different effects, how it works, etc...

You can found some measurements, latency time (with all effects enabled) is just 1.1 ms... Incredible!  :-+
« Last Edit: June 18, 2018, 06:09:26 am by radiolistener »
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6692
  • Country: nl
Re: Getting started with DSP - any suggestions?
« Reply #45 on: June 18, 2018, 06:06:57 am »
A 10$ SBC has >10 GFLOPs of programmable power not even counting the GPU ... a cheap FPGA isn't even going to equal that.
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3279
  • Country: ua
Re: Getting started with DSP - any suggestions?
« Reply #46 on: June 18, 2018, 06:28:27 am »
A 10$ SBC has >10 GFLOPs of programmable power not even counting the GPU ... a cheap FPGA isn't even going to equal that.

Zynq-7000 FPGA (used for guitar effect project from link above) has floating-point performance 778 GFLOPs and fixed-point performance 2622 GMACS.
Arria 10 FPGA are rated to 1500 GFLOPs.
Stratix 10 FPGA are rated to 10000 GFLOPs.
Cheap Cyclone IV FPGA has for about 27 GFLOPs.

Here is performance comparison graph for TI DSP and Altera FPGA:

« Last Edit: June 18, 2018, 07:16:51 am by radiolistener »
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6692
  • Country: nl
Re: Getting started with DSP - any suggestions?
« Reply #47 on: June 18, 2018, 06:55:13 am »
That's padded by a factor of 4 simply because they count it based on adders instead of FMA, throw in some more optimistic estimation and it decreases by 5-10. A Zynq or Cyclone V also costs about 10x what a H2+/H3 IC cost. The cheap FPGA's are small Spartans and ICE40s.

More importantly, any effect you could implement in the FPGA you could implement just as well on the ARM cores in them and be done a whole lot faster. Audio just isn't all that much data, you run out of ways to spend cycles. Unless you do stupid things like implementing a long impulse response filter with pure time domain processing.

PS. the 444K LC version that GFLOPs number is for is more like a 1000x more expensive than a H2+/H3.
« Last Edit: June 18, 2018, 07:02:43 am by Marco »
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3279
  • Country: ua
Re: Getting started with DSP - any suggestions?
« Reply #48 on: June 18, 2018, 07:10:44 am »
A Zynq or Cyclone V also costs about 10x what a H2+/H3 IC cost.

Cheap Cyclone IV evaluation board costs for about $15...$30 on aliexpress.
Yes, there is no peripherals, just FPGA, several LEDs and buttons.
But I think this is pretty cheap price for entry level board  :)
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4922
  • Country: si
Re: Getting started with DSP - any suggestions?
« Reply #49 on: June 18, 2018, 07:18:47 am »
This is why running things with fixed point math is often a requirement on FPGAs. It gives a massive boost to math performance (Even more so if you count add/substract as part of those math operations). On CPUs with hardware FPUs there is usually little difference between 32bit fixed point and single precision float.

Okay FPGAs still will cost more but will deliver fixed point math performance far beyond most CPU and do it while burning single digit watts of power. But it takes a LOT of work to make it run inside it.

If you are going for raw GFLOPS performance then by far the best performance per price is simply getting a cheap PC and putting a $200 graphics card in it. Its big, it uses a lot of power, but its cheap and gives performance orders of magnitude faster than anything else.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf