Forum Discussion
Altera_Forum
Honored Contributor
16 years agoVictor,
I have some experience in this area as of late. You will need to do these things: 1. Build a SOPC project with an Avalon MM Tri-State bridge and a CFI (common flash interface) component. You will need this to store the NIOS program and to boot it up after hardware config. There is a tool for this in the NIOS IDE. 2. Compile hardware and place in serial configuration device (if you have one on the board). If not, I have included an app note for using the PFL (parallel flash loader) to store your hardware bitstream and the NIOS program both in flash. 3. You will need to write some sort of GUI or console application in your choice of Windows (I assume) development system. I created such an application using sample code posted on the NIOS forum website. I had to recompile the DLL for use with MS Visual Studio because it was created with the dlltool.exe in Cygwin. You don't have to use MS Visual Studio, you can use Cygwin and hack the attached code if you like, but most people are familiar with MSVC. I have also attached a cheat-sheet on how to convert the Cygwin created DLL and convert it to a MSVC dll for implicit calling. There are three (3) software projects that I have included using the jtag_atlantic.dll. One of these downloads images to the board, the other two are useful for learning how to create applications that talk to the jtag uart such as what you are suggesting. All of this assumes that you know the functionality of your board such as type of fpga configuration devices, memory, and switch settings, and most importantly, using SOPC Builder to build a NIOS system with peripherals. Unfortunately, I know of no one document that can explicitly tell you how to do what you are asking for. You will need to 'kluge' it together yourself using as much of the code that I have included as examples. The image download demo also includes the hardware configuration code. It was compiled recently in v9.1 of Quartus. This should give you a good idea on how a SOPC system is put together as well with the CFI and tri-state bridge components. I hope the SW helps. Rick