Datasheet
68 PSoC Designer IDE Guide, Document # 001-42655 Rev *B
System-Level Editor
3.6.1.4 PriorityEncoder
A PriorityEncoder provides a method to generate a single output value using only the highest priority
true input. PriorityEncoders are often used to combine multiple hierarchical input states into a single
valuator. For example, use a PriorityEncoder to command a fan to turn at the certain speed com-
manded by multiple temperature input sensors. A PriorityEncoder operation is similar to the following
pseudo code:
If x1 then y1
Else If x2 then y2
Else If x3 then y3
Else If x4 then y4
3.6.1.5 StatusEncoder
A StatusEncoder provides a method to generate a single output value using one or many inputs,
while allowing multiple simultaneous valid expressions. StatusEncoders are often used to combine
multiple input states into a single valuator used for interface communication. A StatusEncoder oper-
ation is similar to the following pseudo code:
If x1 then y1
If x2 then y2
If x3 then y3
If x4 then y4
3.6.1.6 TableLookup
The TableLookup transfer function maps every possible combination of input values to output values
in a one-to-one relationship. The TableLookup has additional flexibility by allowing the outputs to be
expressions rather than just constant values. Input combinations that are not mapped to an output
result in no change to the previously existing output value.
An example application of the table lookup is to turn a fan on when a button is pushed, and to turn
the fan off when the button is released.
3.6.1.7 LiteralCode
Each instance of the LiteralCode transfer function allows you to write a single function using a subset
of the C language. The following subset of the C language is supported:
Repetition structures:
do
while
for
break
continue
Selection structures:
if
else
switch
Standard C operators.
Table 3-1. C Operators Supported in the LiteralCode Transfer Function
Operator Type Supported Operators
Assignment =+=–=*=/=%=&=|=^=<<=>>=