To generate a square wave, you can use a counter with a compare tacked on. Adjust the compare value to change the duty cycle, and change the value that gets loaded into the counter to adjust the frequency (so you have 2 registers sitting outside of the NIOS to control the wave generation, and around 20-40 LEs of hardware for the wave generation). You will have to figure out duty cycles based on the frequency since you are loading clock cycles and not Hz into this thing, but that'll just be simple math (multiply and divide).
I have seen software based generation, however you will not be clock cycle accurate if you take that route so I would splurge and use up logic to make one in hardware (you can make it accurate to within one clock cycle).
Cheers.