Digital Fuzzy Co-processor8-bit I/O
HighSpeed Rules Processing
4 Input, 2 Output,32 Rules in 33.1µs
Upto 256Rules(4 Antecedents,1 Consequent)
Up to 8 Input ConfigurableVariables
Up to 16 MembershipFunctions for an Input
Variable
AntecedentMembershipFunctions with
Triangular and TrapezoidalShape
Up to 4 Output Variables
Up to 256 MembershipFunctionsfor all
Consequents
SingletonConsequentMembership Functions
Defuzzification on chip
MaximumClock Frequency40MHz
A/D Start Convertion Pulse presettable
Direct Interfaceto all popular microprocessor
HandshakingSignal Polarity presettable
Operates”STANDALONE” (without µP) if
desired
Standard+5V Supply Voltage
SoftwareTools and EmulatorsAvailability
Pinnumber: 52
68-leadPlastic Leaded Chip Carrierpackage.
W.A.R.P.2.0
8-BIT FUZZY CO-PROCESSOR
PRELIMINARYDATA
PLCC68
Figure1. Logic Diagram.
MCLKWAIT
VSS VDD
I0-I7
SIS0-SIS2
LASTIN
OE
AUTO
RD
READY
8
3
ERR
W.A.R. P .
2.0
PRESET
12
O0-O11
2
OC0-OC1
DS
ENDOFL
BUSYOFL
Figure2. SimplifiedBlock Diagram.
8
Input Port
with
HANDSHAKE
ANTECEDENT
MEMORY
March 1996
This isadvance informationon a new product now in development or undergoing evaluation. Details are subject to changewithoutnotice.
ALPHA
CALCULATOR
PROGRAM &
CONSEQUENT
MEMORY
INFERENCE
UNIT
INTERNALBUS
DEFUZZIFIER
PROGRAMMABLEA/D
OUTPUT PULSE
8
Ouput Port
with
HANDSHAKE
1/28
W.A.R.P.2.0
Figure3. Pin Connections
ncncI7I6I5I4I3I2VSSI1I0
VSS
VDD
MCLK
PRESET
OFL
AUTO
LASTIN
TEST
ENDOFL
ERR
BUSY
READY
VSS
VDD
Note:nc = Not Connected.
9 8 7 6 5 4 3 2 1 68 67 66 65 64 63 62 61
16 15 14 13 12 1110
OE
RD
DS
26 25 24 23 22 21 20 19 18 17
2728 29 30 31 32 33 34 35 36 37 3839 40 41 42 43
ncncnc
W.A.R.P. 2.0
VSS
OC1
VDD
GENERAL DESCRIPTION
W.A.R.P.2.0is a memberof the W.A.R.P. family of
fuzzy microprocessors, completelydevelopedand
producedbySGS-THOMSONMicroelectronicsusing the high performance, reliable HCMOS4T
(O.7µm)process.
W.A.R.P.2.0can beused bothas a Fuzzy Co-proc-
essor or as a stand-alone microcontroller. In the
former case, it can work together with standard
micros which shall perform normal control tasks
whileW.A.R.P.2.0 willbeindipendentlyresponsible
for all the fuzzy related computing.
W.A.R.P.2.0 core includes the fuzzifier (ALPHA
calculator),the inference unit, and the defuzzifier.
The I/O capabilities demandedby microprocessor
applicationsarefulfilledbyW.A.R.P.2.0with 8Input
and 4 Output lines which can be supported by
handshakingsignals.
The capability of preset the polarity of the handshaking signals simplifies the interface with the
host processor.
An internal Start Conversion pulse is provided to
allow simple use for waveform generation which
canbe directly applied to drivean A/D converter.
The output 3-STATE buffer can be temporarily
frozen in order to synchronize W.A.R.P.2.0 with
slower devices.
Running W.A.R.P.2.0 involves a downloading
phase and an On-Line phase. The downloading
phase allows thesetting of the processor,in terms
of I/O number,universeof discourse,Membership
Functions (MFs) and rules. During this phase
W.A.R.P.2.0 preparesits internal memoriesfor the
On-Line elaboration phase and loads the microcodeinitsprogrammemory.Thismicrocode,which
drives the On-Line phase, is generated by the
Compiler (see FUZZYSTUDIO2.0 User Manual).AfterthatW.A.R.P.2.0isreadytorun (On-Line
phase) processing inputs and producing the related outputsaccordingto theconfigurationloaded
in the downloading phase. It is also possible to
provide the processor with inputs in any order by
specifyingtheir identificationnumbers.
Two basic memories are available in W.A.R.P.2.0 :
the Anteced ent Memory (AM) and the Program/Consequent Memory (PCM). The antecedentMFs,portrayedbyaresolutionof 2
are stored in the AM (256 bytes). W.A.R.P.2.0
exploits a SGS-THOMSON patented strategy to
store the MFs in the AM.
The informationaboutRules andConsequentMFs
are stored in the PCM (1.4 Kbyte).
FUZZYSTUDIO2.0 is a powerful development
environment consisting of board and software allowsan easyconfigurationanduse ofW.A.R.P.2.0.
8
elements,
2/28
Table 1. Pin Description
Pin AssignmentNamePins TypeFunction
11,26,31,40,48,57VDD-Power Supply
1,10,25,30,39,47,56VSS-Ground
19TESTITesting(It must be connected to VSS)
12MCLKIMaster Clock (up to 40 MHz)
13PRESETIPreset
15AUTOIAuto/Manual-Boot
65SIS0I
64SIS1I
63SIS2I
67I0IData Input bit 0
68I1IData Input bit 1
2I2IData Input bit 2
3I3IData Input bit 3
4I4IData Input bit 4
5I5IData Input bit 5
6I6IData Input bit 6
7I7IData Input bit 7
14OFLIOff-Line/On-Line Switch
18RDIHandshaking Read Ready
16LASTINILast Input (Start Elaboration) bit
17OEIOutput Enable/3-STATEbit
66WAITITemporary Output Processing Stop
24READYOHandshaking Output Signal
21ENDOFLOOffline Phase (external memory downloading) End
23BUSYOElaboration Phase Indicator
20DSOData Strobe (Output Ready Signal)
22ERROErrorFlag
33OC0OOutput Identifier bit 0
32OC1OOutput Identifier bit 1
55O0OExternal Memory Address/Defuzzified Output bit 0
54O1OExternal Memory Address/Defuzzified Output bit 1
53O2OExternal Memory Address/Defuzzified Output bit 2
52O3OExternal Memory Address/Defuzzified Output bit 3
51O4OExternal Memory Address/Defuzzified Output bit 4
50O5OExternal Memory Address/Defuzzified Output bit 5
49O6OExternal Memory Address/Defuzzified Output bit 6
38O7OExternal Memory Address/Defuzzified Output bit 7
37O8O
36O9O
35O10O
34O11O
Auto-Boot Speed (Ext. Memory Support AccessTime) /
Input Selection bit 0
Auto-Boot Speed (Ext. Memory Support Access Time) /
Input Selection bit 1
Auto-Boot Speed (Ext. Memory Support Access Time) /
Input Selection bit 2
ExternalMemory Address bit 8 /
Next Input Progressive Number bit 0
ExternalMemory Address bit 9 /
Next Input Progressive Number bit 1
External Memory Address bit 10 /
Next Input Progressive Number bit 2
External Memory Address bit 11 /
Start Conversion for the externalA/D
W.A.R.P.2.0
3/28
W.A.R.P.2.0
PINDESCRIPTION
Signals READY, RD, WAIT, DS, BUSY, LASTIN
and O11 ( external A/D Start Conversion) have
programmable polarity, see table 6 for default
values.
V
,VSS. Power is supplied to W.A.R.P. using
DD
these pins.V
isthe powerconnectionand VSSis
DD
the ground connection;multi-connectionsare necessary.
MCLK.
Master Clock
(Input): This is the input
master clock whose frequency can reach up to
40MHz(MAX).
During the Off-Line phase with AUTO High, the
MCLKis internallydividedto utilize boot memories
workingwitha slowerfrequency.Theaccessspeed
is presettableby means of SIS0-SIS2pins.
PRESET.
Preset
(Input, active Low) : This is the
restart pin of W.A.R.P.. It is possible to restart the
work during the computation (On-Line phase) or
before the writing of internal memories (Off-Line
phase). In both cases it must be put Low at least
for a clock period. After PRESET Low the processor remainsin the resetstatus 3 MCLK pulses.
AUTO.
Auto-Boot:
(Input,activeHigh): During the
Off-Linephase AUTOHigh enables the automatic
bootof W.A.R.P.2.0 whereas AUTO Lowvalidates
the manual downloading.The manualboot has to
be performed using the handshaking signals
RD/READY.
During the On-Line phase AUTO High disables
the generation of the Start A/D conversion (O11)
signal.
SIS0-SIS2.
Speed& Input Selection
(Inputs): DuringtheOff-Linephase withAUTOHigh(Auto-Boot)
SISbus allowstochoosethespeedofdownloading
fromthe externalmemorywhich containsthestartupconfigurationof W.A.R.P.2.0.In thatcase (AutoBoot)MCLKisinternallydividedtoprovideaslower
sinchronizationsignal which is automaticallyused
asRDfor thereadingof theexternalmemory.Table
2 shows how to preset the frequency of thissynchronizationsignal.
During the On-Line phase in Slave mode (see
RegisterBench description,Tab.5)SIS bus allows
to provide W.A.R.P.2.0with inputs in any order by
specifying their identification number. The input
and its identification number (SIS0-SIS2) will be
acquired at the next active RD so they must be
already stable when RD is given.
Table2. DownloadingSpeed
SIS0SIS1SIS2
LowLowLowMCLK/32
HighLowLowMCLK/16
Internal Synchronization
Signal Frequency
I0-I7.
Input bus
(Input): During the Off-Linephase
these 8 data inputpins acceptaddresses anddata
from the e xte rna l boot memory cont aining
W.A.R.P.2.0 configuration. This start-up memory
(which can be a ZERO-POWER,the host processor memory, an EPROM, a Flash,the PC Memory,
etc.) contains the fuzzy project built by means of
FUZZYSTUDIO2.0.
In On-Linemodethisbuscarriestheinputvariables
accordingto the prefixedorder.
OFL.
Offline
(Input, active High): When this pin is
High,the chipisenabledtoloaddataintheinternal
RAMs (Off-Linephase). It must be Low when the
fuzzy controller is waiting for input values and
during the processingphase (On-Linephase).
When OFL changes its status the processor remains presettedfor 3 clockpulses.
LASTIN.
Last Input
(Input, default active High):
During the On-Line phase in slave mode (see
RegisterBench description,table 5) LASTINHigh
indicates no other inputs have to be provided so
W.A.R.P.2.0 canstart the processing phase.
W.A.R.P.2.0 inputs are those in the input interface
so if some variables do not need to be acquired
again (because they change slower than others)
they remainstored and no extra time isrequired to
acquire them again.
OE.
Output Enable
(Input, active Low): OE Low
enables O0-011output bus or (if High) put it in
3-STATE.
Wait
WAIT.
(Input, default active High): This pin
High stops the output processing. When WAIT is
enabled W.A.R.P.2.0 finishes to compute the current output variable but it does not give it on the
output bus until WAIT becomes Low. This signal
allows to synchronize W.A.R.P.2.0with slower devices.
RD.
Read
(Input, default active High): Both in
Off-Line and in On-Line mode RD indicates data
are ready tobe acquired from the input bus I0-I7.
READY.
Ready
(Output,default active High): Both
in Off-Lineand in On-Linemode RDindicates data
have been acquired from the input bus I0-I7 and
are now stored in W.A.R.P.2.0 internal registers.
ENDOFL.
End of Off-Line phase
(Output, active
High): This pin indicates the end of the downloading phase (Off-Line) so the content of the boot
memory is already stored in W.A.R.P.2.0 internal
memories.After ENDOFLis activetheusercan put
OFL Low so the On-Linephase canstart.
BUSY.
BusySignal
(Output, defaultactive High):
When the elaborationphase is running this pin is
active. When W.A.R.P.2.0finishesto compute the
last output variable, it puts BUSY Low and waits
for new inputs.
4/28
W.A.R.P.2.0
DS.
DataStrobe
strobe pin enables the user to utilize the output.
Whenthispin is High itindicatesthat a new output
variablehas beencalculatedand it is ready on the
output bus (O0-O7). This signal synchronizes the
external devices and in particular the interfaces
with the controlledprocesses (On-Line mode).
Error
ERR.
active,W.A.R.P.2.0has incurredin an internalerror
condition.
OC0-OC1.
output bus provides the output variables with a
progressivenumber during the On-Line phase.As
a consequence it is possible to know to which
variablecorrespond thedata thatare onthe output
data bus (O0-O7). The dimension of OC bus is
connected with the maximum number of output
variables(4).
(Output, defaultactive High): The
(Output, activeLow): When this pin is
Output Counter
(Output): This 2 bit
O0-O11.
phasethese pins providethe addresses (12bit) for
its internalmemories and send those addresses to
theexternalmemorysupportwheredatatoloadare
located. These addresses sent on O0-O11 bus
allow to identify the data that have to be loaded in
W.A.R.P.2.0internal memories.
In the On-Line phase O0-O7 carrie out the output
values. When the DS is High, one output variable
can be read by external devices. The resolution
of output variables is 256 points (8 bit). If there is
more than one output, the output variables are
calculated one by one and they are provided in
the sequence stabilized during the editing phase
(see FUZZYSTUDIO 2.0 User Manual).
In On-Line mode O8-O10 provide the progressive
numberof the next variable to be acquired. These
pinscan beused to select the next input to provide
on I0-I7 bus.
Stillinon-line modeO11allows toprovideapresettablesignal whichcan beusedasStart-Conversion
for an A/D converter after (about 400 ns) OFL or
BUSY fall.
Output Bus
(Output): In the Off-Line
5/28
W.A.R.P.2.0
FUNCTIONAL DESCRIPTION
W.A.R.P.2.0 works in two modedependingon the
OFL controlsignal level (see table 3) :
Off-line MODE (OFL High)
On-line MODE(OFL Low)
OFF-LINE MODE
All W.A.R.P. memories are loadedduring the OffLine phase. The membershipfunctions are written
insidetheir relatedmemories andthe processcontrol rules are loaded inside the PCM.
The addresses of the words to be written in the
memories, are internally generated while the addresses of the external memory locations to be
readaredirectlyprovidedbyW.A.R.P.2.0bymeans
of O0-O11output pins.
Data must be loaded 8 bit a time in the data bus
and can be read from an external non volatile
memoryor loaded by an host processor.
Figure 4. Off-Linephase:Auto-Boot
Auto-Boot Enable
AUTO=HIGH
Off-linePhase Enable
OFL=HIGH
External Memory
Access Time SETTING
SIS0-SIS2=LowLow...
DownloadingFrom
External Memory
OFFLINEPHASE ENDS
ENDOFL=HIGH
The Off-Line phase can be performed automatically (see figure4) or manually(see figure 5).
When the auto-boot is chosen (AUTO = High)it is
possibleto configurethereadingaccesstimeof the
externalmemory. Theauto-bootendis indicatedby
the ENDOFLsignal.
The downloadingphase requires:
F*NWordsDatabaseclock pulses,
where F is 16 or 32 (see table 2).
NWordsDatabaseis the number of wordsstoredin
the boot-memory (see register bench description,
table 5).
When the manual-boot is chosen (AUTO = Low)
datahave to beprovidedby usingthe handshaking
signals (RD/READY). In this way it is possible to
updateonly aportionofthe databaseorchangethe
processorconfiguration.
The time required from the manual boot depends
on the efficiency of the communication handled
with the handshakingsignals.
OFLAUTO
HH
I0-I7
BOOT
MEMORY
O0-O11
W.A.R.P.2.0
SIS0-SIS2
ENDOFL
Figure 5. Off-LinePhase: Slave Downloading
Manual-Boot Enable
AUTO=LOW
Off-linePhase Enable
OFL=HIGH
Downloading with
Handshaking Signals
RD/READY
6/28
OFFLINE PHASE ENDS
BOOT
MEMORY
I0-I7
O0-O11
OFLAUTO
LH
W.A.R.P.2.0
READY
RD
W.A.R.P.2.0
ON-LINEMODE
In On-line mode (see figure 7) W.A.R.P.2.0 is enabled to elaborate input values and calculate outputs according to the fuzzy rules stored into the
microprogram. W.A.R.P.2.0 reads the inputvalues
one a time in the input data bus using the
RD/READY signals. If the processor is workingin
SLAVE mode (see register bench description in
table5) the user has toprovidethe inputswith their
identificationnumbers(bymeansofSIS0-SIS2),so
it is possible to provide inputs in any order. In
SLAVE mode it is also po ssible to force
W.A.R.P.2.0 to start the elaboration phase (by
means of LASTIN) without providing all inputs, for
instancewhen inputvariableschangewithdifferent
speed. In this case the outputs that have not be
providedin this cycle,but sampled in the previous
ones, are recoveredfrom the internalbuffers.
When all inputs are given or a LASTIN signal is
given, the elaboration phase starts. The elaboration phase is divided in two main parts. During the
first one the input values are read and the correspondingALPHAvalues(activationlevels)are calculated.In thesecond part the computation of the
fuzzy rules and the defuzzification are implemented.
W.A.R.P.2.0 acquires each input in 8 clock pulses
(min). Sincethe acquisition phase is performedby
the user by means of the handshaking signals, 8
clock pulses per input are referred to the most
efficient case. In figure 6 are shown the perform-
Figure6. W.A.R.P.2.0 performances
Numbe r of Clock Pu ls e s
8.000
6.000
4.000
2.000
0
064128192256
Numbe r of Rule s
Numb er of I np u t s = 8
ances in case of 8 inputs. If you are using less
inputs you have to subtract 8 clock pulsesfor each
of them. The elaboration time for rule requires 32
clockpulses.
For instance if W.A.R.P.2.0 is working at a frequency of 40 MHz (25ns period)with 8 inputs and
128 rules globally(forall outputs) thetime required
Notes: 1. This table uses default active handshaking signal polarity (see table 6), X = don’t care.
2. If AUTO is High pulse in O11 is absent.
3. LASTIN and WAIT pulses are optional.
4. Same operation is obtained whenpositive and negative OFL transactions occour.
INTERNAL STRUCTURE
The blockdiagram shown in figure 2 describesthe
structure of W.A.R.P.2.0 (a more detailed block
diagramis shown in fig. 11).
Input Port. This internal block performs the input
datarouting.Dataareread onebytea timefrom the
input data bus, internally stored, and sent to the
ALPHA calculator following the rules loaded in the
ProgramMemory. Input data resolution is 8 bit.
The cycle starts when all inputs or a LASTIN High
have been provided and continues until BUSY is
active or a PRESET signal is given. When BUSY
becomesinactiveanewacquisitionphasecanstart.
V
IH
V
IH
V
(2)
(4)
IH
V
IH
V
IH
V
V
V
V
XXVILXXXHi-ZX
XXXX XXVOLV
V
IH
V
IH
X
IL
X
IL
XData InXXXXX
IL
Clock
V
IH
(2)
(2)
Data InX
IH
V
Data InX
IH
V
Data In
IH
Rate
Selection
Code
Input
Selection
rules can be only joined with the OR connective.
InferenceUnit structure is shown in figure9.
Defuzzifier. It generates the output crisp values
implementingthe consequentpart of the rules.
In thismethod consequentMFs are multiplied by a
weight value Ω (OMEGA), which is calculated on
the basis of antecedentMFsand logicaloperators.
The processing of fuzzy rules produces, for each
output variable, a resulting membership function.
Each MF related to the processed output variable
is firstly modifiedby arule weight.
Outputvalue (Y)isdeduced fromthe centroids(X
and the modified MFs (Ω
Alpha Calculator. This block calculates the intersection (ALPHA weight) between an Antecedent
MembershipFunction and the correspondingcrisp
input (see figure 8).
InferenceUnit. Thanksto the Theta Operator,the
InferenceUnitgenerates theTHETA weightswhich
are used to manipulate the consequentMFs.
n
Ωi∗
∑
1
Y
=
n
Ω
∑
1
This is a calculation of the maximum and/or minimumperformed onALPHA values accordingto the
logical connectivesof fuzzy rules. It is possible to
utilize the AND/OR connectivesand to directly exploit ALPHA weights or the negated values. The
numberof THETA weights depends onthe number
of rules.
The rules can have at maximum four ALPHA
weights(howevertheyareconnected).Twoormore
n = number of MFs of the Output Variable.
X
=absciss ofthe MFicentroid.
i
Ω
=membership degree of the output MFi.
i
Two parallel blocks calculate the numerator and
denominator values to implement the centroids
formula.A finaldivision blockcalculatestheoutput
values (see figure10).
External Memory
Addresses
Data
Out
Data
Out
X
i
i
X
(2)
(2)
OL
Output
Selection
Output
Selection
V
OL
Next
Input
X
V
OL
) byusing the formula:
i
)
i
8/28
W.A.R.P.2.0
Output Port. This block provides the output data
supported by handshaking signals. Ouput data
resolutionis 8 bit.
An output ready on the bus O0-O7 is indicated by
a DS pulse and by its identificationnumber (OC0OC1). WAIT active temporarily stops the elaborationphaseallowingthesynchronizationwithslower
devices.
Programmable A/D output pulse. This block allowsto programthe widthof the pulse providedon
O11(only in On-Line mode)that can beused as a
StartConversion foran externalA/D. Thewidth of
this pulse can be configured by means of the
related register (see register bench description)
followingthe table 4.