Vision Processing with the Canny Edge Detection Reference Design

ID 683433
Date 2/14/2015
Public
Document Table of Contents

1.5.4. Operating System and Video Driver

The Canny edge reference design operating system (OS) provides important function calls such as file read and write that the design uses to export important information, such as a frame dump, out of the ARM processor via Ethernet. The design implements the entire Ethernet stack in the OS for communication with the ARM processor.

The frame buffer resides in the physical address space. To access this data in userspace, map the physical address space of the frame buffer to the user address space. A user-space device driver accesses the in-built Linux kernel module /dev/mem to execute the physical to user-space address mapping. This driver is based on Linux’s Windows X server real-time video driver. The custom written user-space device driver also provides easy application programming interface (API) function calls for the programmer to read and write a video frame:

 while(1){//vid1 is video handle returned by driver 
get_vframe(&vid1,storage,get_fPixCount(&vid1)); //Get 1 stable input video frame 
edge_link(storage,get_fLength(&vid1),get_fPixCount(&vid1)); //Perform image processing on 1 video frame 
dump_vframe(&vid1,storage,get_fPixCount(&vid1)); //Output 1 video frame} //Loop for continuous video processing

The driver handles all control signaling and data transfer to/from the FPGA hardware. The user-space device driver also provides a simple function to continuously measure the average output frame rate dynamically.