Add SoC variant that implements rv32imafc extensions (with FPU and compressed instructions).
As a demo of this new variant, add a macro_osc top-level bitstream that does some expensive DSP in a softcore using the FPU and streams it glitch-free to the audio outputs.
The top-level comment in top.py is repeated here:
'Macro-Oscillator' runs a downsampled version of the DSP code from a
famous Eurorack module (credits below), on a softcore, to demonstrate the
compute capabilities available if you do everything in software.
20 of 23 original engines are available for tweaking and patching via the UI.
A couple of engines use a bit more compute and may cause the UI to
slow down, so these ones are disabled for now.
A scope and vectorscope is included and hooked up to the oscillator
outputs so you can visualize exactly what the softcore is spitting out.
The original module was designed to run at 48kHz. Here, we instantiate
a powerful (rv32imafc) softcore (this one includes an FPU), which
is enough to run most engines at ~24kHz-48kHz, however with the video
and menu system running simultaneously, it's necessary to clock
this down to 12kHz. Surprisingly, most engines still sound reasonable.
The resampling from 12kHz <-> 48kHz is performed in hardware below.
Jack mapping:
In0: frequency modulation
In1: trigger
In2: timbre modulation
In3: morph modulation
Out2: 'out' output
Out3: 'aux' output
There is quite some heavy compute here and RAM usage, as a result,
the firmware and buffers are too big to fit in BRAM. In this demo,
the firmware is in memory-mapped SPI flash and the DSP buffers are
allocated from external PSRAM.
Credits to Emilie Gillet for the original Plaits module and firmware.
rv32imafc
extensions (with FPU and compressed instructions).macro_osc
top-level bitstream that does some expensive DSP in a softcore using the FPU and streams it glitch-free to the audio outputs.top.py
is repeated here:A scope and vectorscope is included and hooked up to the oscillator outputs so you can visualize exactly what the softcore is spitting out. The original module was designed to run at 48kHz. Here, we instantiate a powerful (rv32imafc) softcore (this one includes an FPU), which is enough to run most engines at ~24kHz-48kHz, however with the video and menu system running simultaneously, it's necessary to clock this down to 12kHz. Surprisingly, most engines still sound reasonable. The resampling from 12kHz <-> 48kHz is performed in hardware below.
Jack mapping:
There is quite some heavy compute here and RAM usage, as a result, the firmware and buffers are too big to fit in BRAM. In this demo, the firmware is in memory-mapped SPI flash and the DSP buffers are allocated from external PSRAM.
Credits to Emilie Gillet for the original Plaits module and firmware.
Credits to Oliver Rockstedt for the Rust port of said firmware: https://github.com/sourcebox/mi-plaits-dsp-rs
The Rust port is what is running on this softcore.