The generated .vhd is intended to be used by Quartus compiler in sopc system synthesis. So it exposes an Avalon MM slave interface. Anyway, even if your vhdl module provides an Avalon master port (as I proposed in solution# 2 above), I really don't know if you are allowed to use this vhd code externally to sopc builder. Probably more undisclosed 'library' modules are required. So you probably must integrate your VHDL function into sopc builder by creating a custom component in order to do this. This is not very difficult, but I wouldn't recommend it to a beginner, since it requires some expertise.
Regarding solution# 1, i.e. converting to C and executing into Nios, I forgot to mention that HDL implementation is usually much faster than processor code execution. So you must carefully evaluate this tradeoff between simplicity (C) and performance (VHDL)