![]() |
SCAMP-5c Vision System
1.0.0
An image sensor with a parallel processor on focal plane
|
PE operations are issued by the IPU to all of the 256x256 PEs simultaneously while each of the PE executes the operation with its own registers.
Each of the PEs has 7 analogue registers, 13 digital registers and 3 special registers.
A, B, C, D, E, F, NEWS.
Among these registers:
R0, R1, R2, ... R11, R12.
Among these registers:
R0
is reserved for macros.R12
is masked by R0
.R1
, R2
, R3
, R4
are used in some of the PE Asynchronous Processing macros.R5
- R11
is totally free to use.PIX, IN, FLAG
PIX
is the photodiode. It acts as a read-only analogue registers.IN
is the global analogue input. It acts as a read-only analogue registers.FLAG
is the analog operation mask. Any analogue operation will not be executed if FLAG is 0 for the PEFLAG
can only be modified using 'where'
and 'all'
.FLAG
can be read into any digital register. e.g. "R5 = FLAG"
.Native PE arthematic statement is written as "<list of destination registers> = <list of source registers>", which means divide the sum of the source registers equally into the destination registers. Such a statements can thus achieve addition and division of analogue registers, as well as performing logical OR of digital registers. For the analogue case, the result in the left side of the "="
is the negative copy of the supposed result. For instance, "A = B C"
mathematically achieves "A = -(B + C)"
, while "A = B"
is "A = -B"
. Note, statment written like these cannot be executed as simulation. Furthermore, they do not handle the error occured in native operations.
More examples:
Add B
and C
into A:
Add B
, C
and D
into A:
Divide C
in to A
and B
:
Digital OR:
Constant value can be written directly into digital registers:
Some of the speical operations need to be done using the native PE instructions listed in the following table:
Instruction | Example | Functionaility |
---|---|---|
respix | "respix" | reset PIX to lowest level (-127) |
res | "res(A)" | reset an AREG to 0 |
load* | "A = load(B,C)" | native arthematic operation "A = B C" |
where | "where(A)" | set FLAG at where A > 0 |
where | "where(R1)" | set FLAG according to R1 |
all | "all" | set FLAG |
not | "R1 = not(R2)" | logical NOT for digital registers |
(*) Simulation support for "load"
has not been finished yet, but it is planned to be used when a native arthematic operation need to be used.
Each of the analogue registers stores a signed value using current. When the value of an analogue register need to be read by any digital device (such as the PC host), it is digitized an 8-bit integer with range [-128,127] while maximum and minimum represent the min max value inherited from the sources of all values (IN
and PIX
). However, after arthmatic operations are applied, the value store in a analogue register can go beyond that range.
For example, the following addition will result a value around 150 to be stored in A:
However, when A
is read out, the value will still be 127 as it is the maximum value the ADC can provide.
The exact value stored internally can be checked by dividing the result of an addition:
After the above code, 'D'
and E
will be roughly 75 which implies A
holds a value around 150.
Nevertheless, the internal value will start diminishing when it is too big. However, there is not a hard threshould.
(TODO: soft saturation plot)