Heterogeneous computing with spiking-neural-network acceleration in a RISC-V-based system-on-chip