SCAMP-5c Vision System  1.0.0
An image sensor with a parallel processor on focal plane
SCAMP-5 -- An Image Sensor with Focal Plane Parallel Processing Array


Notice

All information in this documentation is obsolete. For recent information, Please visit: https://scamp.gitlab.io/scamp5d_doc/

Introduction

SCAMP-5 is a vision chip built in 0.18 um CMOS technology with 256x256 processing elements (PEs). Each element incorporates 7 analogue memories and a relative plethora of digital memories, while reducing the processing element size to less than half its area. A diagram of the functional elements of the system and processor array is shown in figure 1. Within a single processing element, the process of reading or writing these memories to common buses allows sequential, simple computations that can implement complex algorithms. With many PEs operating in parallel in an SIMD (single instruction multiple data) architecture, high speed image processing is made possible.

Documentation of the SPI library for the arm linux environment: Here


Development Environment


File List


Getting Started

1. Development Environment Setup

The SCAMP-5c system has its own programming language with a customized toolchain. The toolchain compiles source code into machine code (ICW file). A software called APRON is used to load the machine code into the system as well as host the system on PC through a GUI. Alternatively, a source code can be executed as a simulation in APRON directly. The source code is edited using Crimson Editor as it has the shortcut for the toolchain. The hardware implemention of SCAMP-5c is partially based on a FPGA development board from Opal-Kelly, so the coresspoonding driver is required.

One can follow the steps in Development Environment Setup to setup the development environment.

Development Environment Guide introduces the development environment.

2. The "Hello World!" Example

The following program simply makes the SCAMP-5c into a webcam, which sends every frame captured to the host PC without any significant image processing.

1 
2 // Host Configuration Section
3 apron.config_begin
4  sim.pix_source_webcam
5  host.template('scamp5c_host_template.txt')
6  host.firmware('ok_s5c_ipu.bit')
7  host.set_frame_rate(25)
8  window_1 = host.add_display('HalfRange')
9  window_2 = host.add_display('FullRange')
10 apron.config_end
11 
12 // SCAMP-5c Program Section
13 #start
14  ipu.wait_frame_trigger
15 
16  rpix(B,C)
17 
18  usb.aout(B,window_1)
19 
20  usb.aout(C,window_2)
21 
22 _jump(#start)
23 
24 apron.genereate_host
25 apron.compile_host

To run this program, following these steps:

  1. copy the code and save in a text file with .aps extension.
  2. make a copy of "ok_s5c_ipu.bit" in "./examples" folder and put it alongside the aps file.
  3. make a copy of "scamp5c_host_template.txt" in "./examples" folder and put it alongside the aps file.
  4. open the aps file in Crimson Editor.
  5. compile the file using "Tools" -> "SCAMP5-c Compile ICW" (or with hotkey Ctrl-3)
  6. launch the program in APRON using "Tools" -> "SCAMP5-c Host ICW" (or with hotkey Ctrl-4)
  7. in APRON, click "Run" in the toolbar.

As indicated by the comment lines, there are two sections in the sourcecode: the host configuration and the scamp5c program. If modification has been done to the host configuration section, APRON need to be restarted. If only the program section has been changed, APRON will automatically update the program for the system when the compilation (Ctrl-3) is finished.

Note, the location of the bit file and template file can be varied, as long as they are correctly located in line #5 and line #6 in the above code.

3. More Examples and Documentation

Example Guideline introduces all of the examples provided in the repository. To learn the functions in the source code , it is recommanded to search the function name with '.' replaced by '_'. For example, to get an idea of what "usb.aout" is, search for "usb_aout". For those functions with no perfix (e.g. "rpix"), one should search for "pe_" + the function name (e.g. "pe_rpix").