title: How to detect on which Altera FPGA I am from software running on NIOS2 processor
body: <p>I think my title says it all.
  I am running a software on a NIOS2 processor on an Altera FPGA.
  Is there some way to detect which is the FPGA that the software is running on?</p>
  
  <p>To answer the question in the comment: Why do I care which FPGA I am on?
  For production we use a design with EPCS controller to program everything. This programming flow is not sensitive to Quartus versions, unlike the .jic flow using Quartus programmer. 
  Unfortunately, for new EPCQ devices you have to correctly program the non-volatile register of the EPCQ with the proper wait states and addressing mode so that the FPGA will configure correctly.
  The NIOS shell tools don't have the capability to do that (Quartus programmer with .jic flow does it) so I wrote a small piece of software that does that. 
  There is a table in the EPCQ datasheet that says what the wait states should be according to FPGA family and size of EPCQ.
  Size of EPCQ I can ask the EPCQ. FPGA family I don't know who to ask. Thus, now for each project I have its personal piece of software with data hard coded to FPGA type. I want the software to be generic and not FPGA specific thus I need to know which FPGA I am on.</p>