
CY7C331
3
I/O Resources (continued)
The D-type flip-flop that is fed from the array (i.e., the state
flip-flop) has a logical XOR function on its input that combines
a single product term with a sum(OR) of a number of product
terms. The single product term is used to set the polarity of the
output or to implement toggling (by including the current output
in the product term).
The R and S inputs to the flip-flops override the current setting
of the ‘Q’ output. The S input sets ‘Q’ true and the R input
resets ‘Q’ (sets it false). If both R and S are asserted (true) at
once, then the output will follow the input (‘Q’ = ‘D’) (see
Table 1).
Shared Input Multiplexer
The input associated with each pair of macrocells may be con-
figured by the shared input multiplexer to come from either
macrocell; the ‘Q’ output of the flip-flop coming from the I/O pin
is used as the input signal source (see
Figure 2).
Product Term Distribution
The product terms are distributed to the macrocells such that
32 product terms are distributed between two adjacent mac-
rocells.
The pairing of macrocells is the same as it is for the shared
inputs. Eight of the product terms are used in each macrocell
for set, reset, clock, output enable, and the upper part of the
XOR gate. This leaves 16 product terms per pair of macrocells
to be divided between the sum-of-products inputs to the two
state registers. The following table shows the I/O pin pairing
for shared inputs, and the product term (PT) allocation to mac-
rocells associated with the I/O pins (see
Table 2).
The CY7C331 is configured by three arrays of configuration
bits (C0, C1, C2). For each macrocell, there is one C0 bit and
one C1 bit. For each pair of macrocells there is one C2 bit.
There are twelve C0 bits, one for each macrocell. If C0 is pro-
grammed for a macrocell, then the three-state enable (OE) will
be controlled by pin 14 (the global OE). If C0 is not pro-
grammed, then the OE product term for that macrocell will be
used.
There are twelve C1 bits, one for each macrocell. The C1 bit
selects inputs for the product term (PT) array from either the
state register (if the bit is unprogrammed) or the input register
(if the bit is programmed).
There are six C2 bits, providing one C2 bit for each pair of
macrocells. The C2 bit controls the shared input multiplexer; if
the C2 bit is not programmed, then the input to the product
term array comes from the upper macrocell (A). If the C2 bit is
programmed, then the input comes from the lower macrocell
(B).
The timing diagrams for the CY7C331 cover state register, in-
put register, and various combinational delays. Since internal
clocks are the outputs of product terms, all timing is from the
transition of the inputs causing the clock transition.
Table 1. RS Truth Table
R
S
Q
1
0
1
0
1
1
0
1
D
Table 2. . Product Term Distribution
Macrocell
Pin Number
Product Terms
0
1
2
3
4
5
6
7
8
9
10
11
28
27
26
25
24
23
20
19
18
17
16
15
4
12
6
10
8
8
8
8
10
6
12
4
Figure 2. Shared Input Multiplexer
C331–4
MACROCELL A
MACRO–
CELL
INPUT
MUX
C3
1
0
I/O
PIN
Q– OUTPUT FROM
INPUT REGISTEROF
I/O MACROCELL A
Q– OUTPUT FROM
INPUT REGISTEROF
I/O MACROCELL B
OUTPUT FROM
LOGIC ARRAY
FEEDBACK TO
LOGIC ARRAY
INPUT TO
LOGIC ARRAY
OUTPUT FROM
LOGIC ARRAY
FEEDBACK TO
LOGIC ARRAY
MACROCELL B
I/O
PIN