TinyFPGA audio project board


#1

Hello! New here

For fun I would quite like to see what I can do with audio on the ICE40 (B2 B2X) because of the limited pins I am trying to do it with I2S. I have never done any proper FPGA work, know if there are enough LUT’s to do anything useful or written an I2S interface but hey! I thought jumping in the deep end may be interesting!

I forked the B2 computer project board and picked a PCM1803 ADC and PCM1754 ADC as they were on the simpler side of the converters I could find on TI’s website. It might be a bit noisy but this is where I am so far.! I know perhaps I need to fit in some kind of RAM e.g if I want to do a delay as the internal ram a bit too small for say 1 second of delay @ 96kbps. Also the inputs and outputs have quite crude passive filters, may need something active.

WIP


#2

Nice project!

Unfortunatly the ICE40LP FPGA is not well suited for Audio processing, because it has no multipliers or DSP blocks. The UltraPlus parts from Lattice are much better with 8 DSP blocks and a big internal RAM (128 kByte).

I would add a user interface on such a board - some buttons an LCD, maybe also potis or encoders.


#3

I’m not a DSP expert, but I thought that the sample rate of audio would be slow enough that serial-parallel multipliers would be plenty fast. At 16-bits they would take 16 clocks, but an audio sample rate of even 192KHz would only require a system clock of about 3MHz to keep up. On the other hand, the lack of large RAMs could make longer delays harder, but QSPI SRAM is fast enough to keep up.


#4

Nice! thanks @mnemonix I didn’t read the UltraPlus page! cool and it seems like there is some progress supporting it in Icestorm. It has MIDI input so that is where the controls come from. To be honest this is just an experiment so keeping it quite simple for now.

@lukevalenty the DAC/ADC converters do have many modes so I could see how low I need to go. I found this good list of different ways to implement a multiplier could be fun to see if any of them are suitable, I see that a lot of them rely of serial methods that could make them quite slow.

http://www.andraka.com/multipli.php


#5

You would want to use the serial method. It will be more than fast enough for audio DSP applications. If you use the 16MHz clock as-is without scaling it up or down with the PLL, one 16-bit serial-parallel multiplier could multiply 1 megasample/second. You could then pipeline many of these multipliers together to create filters. When pipelined, they will still run at the same throughput. Each serial/parallel multiplier will take up about 2x the logic resources of an adder the same size. You should be able to fit a lot of these multipliers in 8k LUTs.


#6

Thanks to David Shah, UltraPlus support in Icestorm is in good shape.
Much better than on Lattices IceCube2, which for example limits the configuration of the multipliers, and is way too optimistic in the timing report.

The TinyFPGA B2 or Bx is for sure also usable for audio, as Luke says, with some custom made MAC modules. It will be a bit unbalanced, if the multiply takes 16 clocks and the following ADD only one clock (but that gives time for a saturation unit).
For single voices or effects, like delays, a (Q)SPI RAM is fast enough, for a polyphonic synthesizer maybe not.


#7

I’m also working on a TinyFPGA EX that has more RAM and uses an ECP5 FPGA with excellent DSP resources. https://hackaday.io/project/28266-tinyfpga-e-series


#8

E Series: I am happy to port the J-Core SoC platform to this, and bring Linux up on it.
http://www.j-core.org


#9

tl:dr is using a Codec connected to i2s the best approach to this or it’s better to work with DAC ADC chips?
I hope Luke makes a slim version of the EX too without SD Card and USB

I know I am coming super late to this party and I am really looking forward for the TinyFPGA EX because of its DSP cores as I want to get into digital audio.
Till now I just found tinyFPGA and UPDuino (It should have an UltraPlus chip based on their description but other sources where pointing out the A1 is a better board - I am really new to this world :confused: ) boards as something economically accessible and to be potentially integrated into stomp pedals without having to be an industrial circuit designer but just a perfboard dude.
I am going to get a BX board to start learning Verilog. I just hope that Luke is going to make a reduced version of the EX too - without SD Card or USB programmer to keep the product as standalone as possible and less of an evaluation board.