CM1K Hardware User’s Manual
26
Example
Let’s take the example of a knowledge composed of neurons with 100 components each.
Sequence
Write CM_NSR, 16
Write CM_RESETCHAIN, 0
Read CM_NCOUNT, Ncount
For (i=0; i<Ncount; i++)
{
Read CM_NCR, context
For (i = 0; i<100, i++) Read CM_COMP,
Vector1(i);
Read CM_AIF, aif
Read CM_MINIF, minif
Read CM_CAT, cat
}
3.5.6
Reading the contents of a single specific neuron
Reading the contents of a specific neuron is made in the following order:
-
The first operation consists of setting the CM1K chip in Save_and_Restore mode and pointing to the first
neuron of the chain
-
In order to point to the i
th
neuron in the chain, (i-1) consecutives Read CM_CAT are necessary
-
You can then read the i
th
neuron’s components, context, minimum influence field and active influence
field in any order. The category register must be read last because the instruction automatically points to
the next neuron in the chain.
-
Finally, the last operation consists of setting the CM1K chip back to the normal mode.
Let’s take the example of the neuron #Index
Sequence
Write CM_NSR, 16
Write CM_RESETCHAIN, 0
For (i=0; i<Index-1; i++) Read CM_CAT, cat
Read CM_NCR, context
For (i = 0; i<100, i++) Read CM_COMP, Vector1(i);
Read CM_AIF, aif
Read CM_CAT, cat
Write CM_NSR, 0