Addendum to Lab 2 working with Qsys by Tim Johnson, 5/22/2013.

For those students who havenít pined out their project here is the look at the project and the pins.The Guide for pins is the DE2 User Manual starting on page 31.If you only used 4 input pins, no problem.

Figure 1 Using the Pin Planner to make the assignments, double-click on the cell in the Location column and just type the letter(s) & number of the pin then hit enter.PIN is added automatically.

Figure 2 The pins start showing up even though the project hasn't been compiled yet.Please do so now.

The compilation report took 10 minutes.I made a cup of tea while waiting. The results:

Figure 3 Main focus is on errors which are zero.

Figure 4 These are the warnings which total 14, one less than the error report which is counted as an error to make 15.

Two (in purple) relate to features not available with the web edition, 4 about IF statements that evaluate to a constant value, output pins readings not changing, hierarchies with connectivity warning for features not connected, 3 about clock assignments missing, output pins without loads, and finally unused pins are defaulted to ground. Double-checking the clocks in the Qsys module shows every one of them connected so we can dismiss the report of their missing an associated clock assignment.

Check that the *.sopcinfo file is present in the project folder and open it up.

Figure 5 File structure after compilation showing *.sopcinfo.

 

Figure 6 Sample of contents of *.sopcinfo

This file contains 6,266 words in XML format.XML format is a sequential database where the sequence position of the data has meaning without reference to columns and rows as in an Excel spreadsheet.It is easier to send an XML data document over the Internet than a table and convey the graphical images from Quartus II to Eclipse.

AT THIS POINT, follow the instruction in Lab 2 until your reach the following error after clicking Finish in Step 9. An alternate method of starting Eclipse is go to on the main menu and select: in the pull down menu.

Figure 7 1st Qsys problem of our day

Iíve thought long and hard about this problem and as usual with Quartus II and Nios II there are several ways to solve the error. My first hunch is that Altera hasnít upgraded its examples for Qsys because the software weíre using as our template still is written for SOPC names.†† This was incorrect after I read the messages (scroll up) on the bottom of the console for Nios II:

SEVERE: CPU "nios2_qsys_0" reset memory "jtag_uart_0" has no matching memory region.

 

 

When you are looking for solving problems, read the messages and start with the first error encountered by the machine, not the ones closer to the bottom of the narrative because the first error creates other problems that you donít need to solve.

This problem was related to the Reset and Exceptions Vectors which I had you set to Absolute as we did in SOPC Builder.After tying a few of the other choices it finally occurred to me what they meant by Absolute (the memory value not the vodka).In the SOPC Builder the memory was usually at the top of the stack at 0x0000 and that is an absolute value.So Absolute works for SOPC but not Qsys.However, the pull down menu allows you to point to the on-chip memory (Ta-da, insert light bulb image here).

Figure 8 The correct settings for the Reset and Exception Vectors.

When you finish this task in the hardware (over in Quartus II), generate a new processor and let it update whatever it wants.Then compile the hardware again.This will kill a quarter of an hour.

Next, close Eclipse and let it save an update to the project.

Next, go to the folder workspace for Nios II (the folder for Lab1_Demo_v13) and delete the subfolder created by Nios II called software and all the subfolders in it.

Figure 9 Delete the software folder created by Nios II.

This is the only way Iíve been able to figure out how to eliminate some Nios II problems and the only way I know to get Eclipse to read the new *.sopcinfo file again.

You can start Lab 2 over again at this point only this time youíll get past this hardware error.As the lab goes on, we most likely will run into other errors, but youíll tackle them one at a time.You might have missed a step, setting of one option.Compare what you have with someone that has gone past where you are.Write everything down, capture screen shots, and record what you do in your trials in your reports.Itís the rare student that doesnít get an error.So donít sit there and wait for me.Be proactive, capture the error report, read the messages, look at your options, and record what you do so that when that effort fails you can take a different path along the way that might be the solution.Heck, there are only 6,266 parameters according to the *.sopcinfo file...for the hardware. †††Some combination of hardware and software will work. Thatís why this class is called project learning.††