Tools> Qsys > Basic Functions > On-chip Memory > Altera Onchip FlashIt will generate the verilog files once you go through selecting how you would like to configure the flash.
Altera has put several videos on YouTube about the MAX 10. Several deal with the flash. Essentially, you add a component for it to your QSYS system. It is particular to the MAX 10.
Both Altera and Terasic have videos on how to use QSYS. I've seen them with QSYS as the top level module and with QSYS integrated with other modules. They were made for FPGAs but the process is the same for the MAX 10, you just need to use the MAX 10 flash component.There are also step by step written instructions available on the Altera web site.