CM1K Hardware User’s Manual
17
3.4
Test Registers
The following registers are used solely for the purpose of testing the memory of all the neurons in a minimum
number of clock cycles. TESTCOMP allows filling the memory of all the neurons in a chain in 256 cycles (i.e. one per
component). TESTCAT allows committing all the neurons in a chain in one cycle.
3.4.1
Description
Description
Addr
8-bit
Normal
mode
SR
mode
Data 16-bit
/Default
TESTCOMP
Test Component
Write the pointed component of all neurons
with the input value. Useful for test routines.
0x08
n/a
W
0x0000
TESTCAT
Test Category
Write the same category to all the neurons.
Useful for test routines.
Writing the value 0 to this register is equivalent
to writing the FORGET register except that it
does not reset the neuron count.
0x09
n/a
W
0x0000
3.4.2
Usage
The Write TESTCOMP and Write TESTCAT commands are used in the test benches written to test the CM1K HDL
design.
A typical usage example is the counting of the number of neurons in a chain of CM1K
Part 1: Commit all the neurons in 2 cycles
-
Write NSR 0x10
Set the SR mode
-
Write TESTCAT Value
Commit all the neurons with a same category value
Part2: Read the category of the neurons until end of chain is reached
-
Write RESETCHAIN
Point to the 1
st
neuron in chain
-
Ncount=0
-
Do Loop
o
Read CAT, cat
o
+
-
Until cat=0xFFFF
(
Ncount-1) is the number of neurons in the chain
-
Write NSR 0x00
Cancel the SR mode