June 22, 2008
June 22, 2008
June 25, 2008
Computers in Education
13.1328.1 - 13.1328.12
Using an Educational Microprocessor Architecture and FPGA Implementation to Introduce Interrupts Abstract
The use of interrupts is an important topic in the use of computers. Interrupts provide the means for a computer to quickly respond to significant real-world events. Unlike polling, which is suitable for interfacing slow peripherals, interrupts provide a more efficient means to interface with devices. Interrupts are generally considered to be advanced and unfortunately, the topic can be a challenge to present to students. In computer architecture in particular, the topic of interrupts is often overly abstracted, which can make learning about interrupts difficult for students.
Following a trigger event, an interrupt service routine (ISR) is invoked to provide service. Such an event could be the arrival of data on a serial communications port, or a signal that the brakes in an automobile have been applied. The latency is the actual time for the system to respond. Interrupts are a critical part of the hardware-software interface. With a serial port, it is necessary to quickly process received data, to avoid it being overwritten by more recently received data. Likewise, with brakes there is a constraint on the time the controller has to respond to the external event. Interrupts are also useful in debugging software.
To go beyond the discussion of a generalized abstraction, it is necessary to consider an actual microprocessor. This paper discusses the use of the nod4 soft core microprocessor to introduce the concept of interrupts to undergraduate students. But to strike some kind of balance, nod4 exception handling is fairly generic roughly following the discussion in Tanenenbaum1 and it also borrows concepts from other processors as well. Apart from the implementation, nod4 is classic accumulator based Von Neumann style architecture and as such is similar to many other processors. This implementation is called soft as it is implemented with a Field Programmable Gate Array (FPGA). The FPGA and modern computer aided design tools provide new opportunities in teaching computer architecture. The grand vision is expressed neatly in the motto that the nod4 processor is a simple yet non-trivial processor designed to be a tool for teaching introductory computer architecture principles to undergraduates.
From a computer user’s point of view, interrupts simply provide a means for a computer to quickly respond to significant real-world events. From a programmer’s point of view, interrupts provide a means for the hardware to almost magically invoke a subroutine to service a device as necessary, freeing up resources that might otherwise be used for polling. Unlike polling, which is generally suitable for interfacing slow peripherals, interrupts provide a more efficient means to interface with devices. Traps such as the software interrupt instruction (swi) are similar to interrupts and are invoked with the same mechanism. The swi instruction is typically used to implement break points for use in program debugging.
Hill, J. (2008, June), Using An Educational Microprocessor Architecture And Fpga Implementation To Introduce Interrupts Paper presented at 2008 Annual Conference & Exposition, Pittsburgh, Pennsylvania. 10.18260/1-2--4173
ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2008 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015