CY7C024AV/025AV/026AV
CY7C0241AV/0251AV/036AV
15
PRELIMINARY
Architecture
The CY7C024AV/025AV/026AV and CY7C0241AV/0251AV/
036AV consi st of an arr ay of 4K, 8K, and 16K w ords of 16 and
18 bits eac h of dua l-p ort RAM cel ls , I/ O an d addr es s li ne s, and
control sign al s (CE
, OE, R/W). These control pins permit independent access for reads or writes to any location in memory.
To handle simultaneous writes/reads to the same location, a
BUSY
pin is prov ided on eac h port. T wo Int errupt (INT) pins can
be utilized for port-to-port communication. Two Semaphore
(SEM
) control pins are used for allocating shared resources.
With the M/S
pin, the devices can function as a mas ter (BUSY
pins a re ou tputs) or as a slave (BU SY pins are inputs). The
dev ices also ha v e an au t omat ic p o wer- do wn fe at ure c ontr ol led
by CE
. Each port is provided with its own output enable control
(OE
), which allows data to be read from the device.
Functional Description
Write Operation
Data must be set up for a duration of t
SD
before the rising edge
of R/W
in order to gu arant ee a valid w rite. A w rite opera tion is
controlled by either the R/W
pin (see Wr ite Cycle N o. 1 wave-
form) or the CE
pin (see Write Cycle No . 2 w av ef orm). Requi red
inputs for non-contention operations are summarized in T able 1.
If a location is being written to by one port and the opposite
port attempts to read that location, a port-to-port flowthrough
delay m ust occur before t he data is read on the output; othe rwise the data read is not det erministic. Data will be v alid on the
port t
DDD
after the data is presented on the other port.
Read Operation
When reading the device, the user must assert both the OE
and CE pins. Dat a will be available t
ACE
after CE or t
DOE
after
OE
is asserted. If the user wi shes to acces s a semaphore flag,
then the SEM
pin must be asserted instea d of the CE pi n, and
OE
must also be asserted.
Interrupts
The upper two memory locations may be used for message
passing. The highest memory location (FFF for the
CY7C024AV/41AV, 1FFF for the CY7C025AV/51AV, 3FFF for
the CY7C026A V/36AV) is the mailbox for the righ t port and the
second-highest memory location (FFE for the CY7C024AV/
41AV, 1FFE for the CY7C025AV/51AV, 3FFE for the
CY7C026AV/36AV) is the mailbox for the left port. When one
port writes to the other port’s mailbo x, an interrupt is gener ated
to the owner. The interrupt is reset when the owner reads the
contents of the mailbox. The message is user defined.
Each port can read the other port’s mailbox without resetting
the interrupt. The active state of the busy signal (to a port)
preve nts the port from setti ng the in terrupt to the winni ng port.
Also, an active busy to a por t prevents that port from reading
its own mailbox and, thus, resetting the interrupt to it.
If an application does not require message passing, do not connect the interrupt pin to the processor’s interrupt request input pin.
The operation of the interrupts and their interaction with Busy
are summarized in Table 2.
Busy
The CY7C024AV/025AV/026AV and CY7C0241AV/0251AV/
036AV provide on-chip arbitration to resolve simultaneous
memory location access (contention). If both ports’ CE
s are
asserted and an address match occurs within t
PS
of each oth-
er, the busy logic will determine which port has access. If t
PS
is violated, one port will definitely gain permission to the loca tion, but it is not predict able whic h port will get that permiss ion.
BUSY
will be asserted t
BLA
after an address match or t
BLC
after CE is taken LOW.
Master/Slave
A M/S
pin is provided in order to expand the word width by
configuring the d evice as either a master or a slav e. The BUSY
output of the master is connected to the BUSY input of the
slave . This wil l allo w the de vice to interface to a master device
with no external componen ts. Writi ng to slav e devi ces must be
delayed until after the BUSY
input has settled (t
BLC
or t
BLA
),
otherwise, the slav e chip ma y begin a writ e cycle during a con tention situation. When tied HIGH, the M/S
pin allows the de-
vice to be used as a master and, therefore, the BUSY
line is
an output. BUSY
can then be used to send the arbitr ati on out-
come to a slave.
Semaphore Operation
The CY7C024AV/025AV/026AV and CY7C0241AV/0251AV/
036AV provide eight semaphore latches, which are separate
from the dual-port memory loc ations. Sem aphores are used to
reserve resources t hat are share d between the two p orts. The
state of the semaphor e indic ates that a resourc e is in use . Fo r
example, if the left port wants to request a given resource, it
sets a latch b y writing a z ero to a semap hore location. The lef t
port then verifies its success in setting the latch by reading it.
After writing to the semaphore , SEM
or OE must be deassert-
ed for t
SOP
before attempting to read the semaphore. The
semaphore va lue will be available t
SWRD
+ t
DOE
after t he ri sing
edge of the semaphore write. If the left port was successful
(reads a zero) , it assum es contr ol of t he sha red reso urce, oth erwise (reads a one) it assumes the right port has cont rol and
continues to poll the semaphore. When the right side has relinquished contr ol of the semaphore (b y writi ng a one), the left
side will succee d in gaini ng control of the semaph ore. If the lef t
side no longer requires the semaphore, a one is written to
cancel its request.
Semaphores are accessed by asserting SEM
LOW. The SEM
pin functions as a chip select for the semaphore latches (CE
must remain HIGH during SEM LOW). A
0–2
represents the
semaphore address. OE
and R/W are used in the same manner as a normal memory access. When writing or reading a
semaphore, the other address pins have no effect.
When writing to the semaphore, only I/O
0
is used. If a zero is
written to the left port of an available semaphore, a one will
appear at the same semaphor e address on the right port. That
semaphore can now only be modifi ed by the side showing zero
(the left port in this case). If the lef t port now relinq uishes con trol by writing a one to the semaphore, the semaphore will be
set to one f or both sides. Howe ver , i f the right p ort had request ed the semaphore (written a zero) while the left port had control, the right port would immediately own the semaphore as
soon as the left port released it. Table 3 shows sample semaphore operatio ns.
When reading a semaphore, all sixteen/eighteen data lines
output the semaphore value. The read value is latched in an
output register t o prevent the semaphore from changing state
during a write from the other port. If both ports attempt to access the sem aphore within t
SPS
of each other, the semaphore
will defini tel y be obtained by one side or the othe r, but there is
no guarantee which side wil l control the semaphore.