We'll have to check and see if the SD card reader is using logic elements as a data buffer, or ram blocks. You should only be at ~65% full. Using LE for data buffer eats up so many.
The project stats without my SignalTap instance:
39,451 / 49,760 LEs (79%)
24135 registers
796,392 / 1,677,312 memory bits (47%)
According to Quartus, the SD controller is using 2,449 combinational ALUTs, 1,785 dedicated logic registers, 1,024 memory bits, 2 DSP elements and one DSP 18x18...
As for a Z80 softcore, we are talking something like 1k logic elements.
Audio will be around 1-2k LE depending on how you do it and how many features and channels, like 16bit stereo, 16 channels would eat ~2k LE.
This is a subject for a whole other thread, or section of this one, but as you've mentioned it:
Initially at least, my requirements for audio are very limited - just a straight simulation of the AY-3-8910 PSG is all I want.
I have a Verilog module that does just that - but it has three analogue outputs (like the real chip), which ideally would be output directly to an audio amp, so I am glacially slowly researching how I would interface it's outputs to the audio DAC on the DECA board.
EDIT: I've just found a
YM2149 project (essentially the same as the AY) with a 14-bit PCM output - the only downside is it's in VHDL, but so long as it works then that shouldn't be a problem. It's a bit annoying that there aren't a lot of DECA projects out there, and most (if not all) of the example projects supplied for the DECA all use a NIOS core, making reverse-engineering how the audio works an opaque and difficult process that I have little time for at the moment. I'll be going to the datasheet for the DAC chip and seeing if I can work out how to send data to it.
I'm actually really surprised at how 'simple' the module is to emulate the PSG. I don't understand any of it - analogue electronics and music is a dark art to me at the best of times - but it surprises me how apparently basic the HDL is to replicate an (admittedly very basic) programmable sound generator chip.
What else do you want to put in there.
RS232 Com ports are something like 150LE.
Old fashioned joystick ports are something 20 LE.
I don't know about USB. I guess it depends on the USB interface chip.
USB won't take up many LEs at all - it'll be around 150LE like the RS232 com ports you've quoted, as I'm likely to use a CH559 as the USB host chip and link this to the FPGA via serial (or SPI if I ever get time to really put some effort into researching/working on the CH559 more). I have created dev boards to test out the RP2040, SAMD21 (boards already exist for these two, I know, but they all have mini/micro USB ports and I like designing and making boards!
) and CH559 and the CH559 seems to be winning out thanks to simplicity, cost and requiring least supporting components. It also supports two USB slave ports 'out of the box', so attaching a keyboard and mouse would be simples. I just need more hours in the day to work on all this stuff.