You are required to read and agree to the below before accessing a full-text version of an article in the IDE article repository.

The full-text document you are about to access is subject to national and international copyright laws. In most cases (but not necessarily all) the consequence is that personal use is allowed given that the copyright owner is duly acknowledged and respected. All other use (typically) require an explicit permission (often in writing) by the copyright owner.

For the reports in this repository we specifically note that

  • the use of articles under IEEE copyright is governed by the IEEE copyright policy (available at
  • the use of articles under ACM copyright is governed by the ACM copyright policy (available at
  • technical reports and other articles issued by M‰lardalen University is free for personal use. For other use, the explicit consent of the authors is required
  • in other cases, please contact the copyright owner for detailed information

By accepting I agree to acknowledge and respect the rights of the copyright owner of the document I am about to access.

If you are in doubt, feel free to contact

An Application Programming Interface for Hardware and Software Threads



Publication Type:

Licentiate Thesis


Mälardalen University Press


Modern embedded computer systems contain an increasing number of software and hardware components. The most common way to communicate between these components is to interrupt the processor (CPU) and let the operating system manage the communication. In almost any operating system, the arrival of an interrupt event causes the execution of a service routine (which could be a device driver handling some external I/O). The advantage of this method is that it encapsulates all hardware details of the I/O device. In many cases these interrupt driven service routines interfere with the real-time behavior. In cases where the interrupt routine is not handled properly, priority inversion and unbounded delays of process execution can be introduced. The real time problem with software device drivers and the development of Field Programmable Gate Array (FPGA) technology motivate research on communication and synchronization between hardware and software components. This thesis presents an application interface called VCB (Virtual Communication Bus), which provides a standardized interface for communication and synchronization between hardware and software without the need to execute any driver software. The interface provides six different system calls; connect, disconnect, send, receive, send&wait, and broadcast. The VCB also has functions to avoid priority inversion problems. The interface is fully implemented in hardware, meaning that no software is used during communication and that several system-calls can be made simultaneously. This makes the system easier to analyze and design. The thesis presents the VCB concept, its implementation architecture and definition of hardware threads. Furthermore, the VCB is demonstrated and evaluated in a case study with device drivers that manage a Universal Asynchronous Receiver Transmit (UART). The two main contributions of this research are (1) that it shows that it is possible to design a uniform interface for communication between hardware and software threads, and (2) that this interface can be used to design device drivers in hardware that introduce almost zero overhead for the software system to manage the external device.


author = {Peter Nygren},
title = {An Application Programming Interface for Hardware and Software Threads},
number = {33},
month = {September},
year = {2004},
publisher = {M{\"a}lardalen University Press},
url = {}