

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Information for students in a microprocessors lab course during week 8. The focus is on interrupts, their implementation, and handling in the context of altera debug client and assembler. Students will also learn about interrupts in the nios ide and c programming language, as well as altera's software interrupt facilities. Understanding the interrupt process and its differences across platforms is essential.
Typology: Lab Reports
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Interruptions happen… Virtually all computer systems must deal with interruptions. Larger systems have sophisticated software that deals with interrupts with all of the details hidden from the developer.
We’ll be dealing with the issue of interrupts for both this week’s and next week’s labs. This week we’ll be using the Altera Debug Client and assembler in order to get a better understanding of the low level details of interrupts. Next week we’ll return to the NIOS IDE and the C programming language to see how to deal with interrupts in that environment. Lastly, we’ll look at Altera’s implementation of these concepts and how to utilize the software interrupt facilities that they’ve provided.
Though generally you should utilize the facilities provided by a platform vendor, it’s useful to dig into the implementation provided to get a better understanding of how a particular platform works. The interrupt process is not the same on all platforms, so remember that we’ll be working with a specific architecture and other platforms will vary in how they implement interrupts. This means that for each platform you deal with, you need to search for, read, filter out and understand documentation on the implementation details specific to that particular platform.
To get an idea of the general concept of interrupts, read Section 6.4 from your text book. Note that the example in Figure 6.10 is for illustration purposes only; the practice shown in Step 4(a) of the example - doing I/O for a separate device not related to the device associated with the current ISR - causes a delay and therefore should be evaluated very carefully. The amount of time spent servicing an interrupt should be kept to an absolute minimum to avoid missing any other interrupts that may happen during the servicing time. Introducing any delays, either intentional or incidental, is the major cause of problems associated with interrupt service routines. As you recall, writing to the LCD device in Lab05 required the introduction of delays. Such delays should not be put into ISRs, as they can lead to hard-to-detect problems.
Interrupts can be divided into several general steps:
Review the following documentation, paying special attention to Interrupt behavior, Register Map and any other information dealing with ISRs. (Ignore any issues that discuss HAL usage, as HAL utilization will be discussed at a later time.)
New instructions: rdctl wrctl trap callr eret