background image

 

CY7C138, CY7C139

Document #: 38-06037  Rev. *D

Page 13 of 17

Architecture

The CY7C138/9 consists of an array of 4K words of 8/9 bits each

of dual-port RAM cells, I/O and address lines, and control signals

(CE, OE, R/W). These control pins permit independent access

for reads or writes to any location in memory. To handle simulta-

neous writes and reads to the same location, a BUSY pin is

provided on each port. Two interrupt (INT) pins can be used for

port–to–port communication. Two semaphore (SEM) control

pins are used for allocating shared resources. With the M/S pin,

the CY7C138/9 can function as a master (BUSY pins are

outputs) or as a slave (BUSY pins are inputs). The CY7C138/9

has an automatic power down feature controlled by CE. Each

port is provided with its own output enable control (OE), which

enables 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 guarantee a valid write. A write operation is

controlled by either the OE pin (see Write Cycle No. 1 waveform)

or the R/W pin (see Write Cycle No. 2 waveform). Data can be

written to the device t

HZOE

 after the OE is deasserted or t

HZWE

after the falling edge of R/W. Required inputs for non-contention

operations are summarized in 

Table 3

.

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

must be met before the data is read on the output; otherwise the

data read is not deterministic. Data is valid 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. Data is available t

ACE

 after CE or t

DOE

 after OE is

asserted. If the user of the CY7C138/9 wishes to access a

semaphore flag, then the SEM pin must be asserted instead of

the CE pin.

Interrupts

The interrupt flag (INT) permits communications between

ports.When the left port writes to location FFF, the right port’s

interrupt flag (INT

R

) is set. This flag is cleared when the right port

reads that same location. Setting the left port’s interrupt flag

(INT

L

) is accomplished when the right port writes to location FFE.

This flag is cleared when the left port reads location FFE. The

message at FFF or FFE is user-defined. See 

Table 4

 for input

requirements for INT. INT

R

 and INT

L

 are push-pull outputs and

do not require pull-up resistors to operate. BUSY

L

 and BUSY

R

in master mode are push-pull outputs and do not require pull-up

resistors to operate.

Busy

The CY7C138/9 provides on-chip arbitration to alleviate simulta-

neous memory location access (contention). If both ports’ CEs

are asserted and an address match occurs within t

PS

 of each

other the Busy logic determines which port has access. If t

PS

 is

violated, one port definitely gains permission to the location, but

it is not guaranteed which one. 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 config-

uring the device as either a master or a slave. The BUSY output

of the master is connected to the BUSY input of the slave. This

enables the device to interface to a master device with no

external components.Writing of slave devices must be delayed

until after the BUSY input has settled. Otherwise, the slave chip

may begin a write cycle during a contention situation.When

presented as a HIGH input, the M/S pin allows the device to be

used as a master and therefore the BUSY line is an output.

BUSY can then be used to send the arbitration outcome to a

slave.

Semaphore Operation

The CY7C138/9 provides eight semaphore latches, which are

separate from the dual-port memory locations. Semaphores are

used to reserve resources that are shared between the two

ports.The state of the semaphore indicates that a resource is in

use. For example, if the left port wants to request a given

resource, it sets a latch by writing a zero to a semaphore location.

The left port then verifies its success in setting the latch by

reading it. After writing to the semaphore, SEM or OE must be

deasserted for t

SOP

 before attempting to read the semaphore.

The semaphore value is available t

SWRD

 + t

DOE

 after the rising

edge of the semaphore write. If the left port was successful

(reads a zero), it assumes control over the shared resource,

otherwise (reads a one) it assumes the right port has control and

continues to poll the semaphore.When the right side has relin-

quished control of the semaphore (by writing a one), the left side

succeeds in gaining control of the a semaphore.If the left side no

longer requires the semaphore, a 1 is written to cancel its

request.
Semaphores are accessed by asserting SEM LOW. The SEM

pin functions as a chip enable 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 unused semaphore, a one will appear

at the same semaphore address on the right port. That

semaphore can now only be modified by the side showing zero

(the left port in this case). If the left port now relinquishes control

by writing a one to the semaphore, the semaphore is set to 1 for

both sides. However, if the right port had requested the

semaphore (written a zero) while the left port had control, the

right port immediately owns the semaphore after the left port

releases it. 

Table 5

 

shows sample semaphore operations. 

When reading a semaphore, all eight or nine data lines output

the semaphore value. The read value is latched in an output

register to prevent the semaphore from changing state during a

write from the other port. If both ports attempt to access the

semaphore within t

SPS

 of each other, the semaphore is definitely

obtained by one side or the other, but there is no guarantee which

side controls the semaphore.
Initialization of the semaphore is not automatic and must be reset

during initialization program at power up. All semaphores on both

sides should have a 1 written into them at initialization from both

sides to assure that they are free when needed.

[+] Feedback 

Содержание CY7C138

Страница 1: ...9 bit dual port static RAM or multiple devices can be combined to function as a 16 18 bit or wider master slave dual port static RAM An M S pin is provided for implementing 16 18 bit or wider memory a...

Страница 2: ...leared when right port reads location FFF BUSYL BUSYR Busy Flag M S Master or Slave Select VCC Power GND Ground 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 67 60 59 58 57 56 55 54 53 52 51 50 49 48 3...

Страница 3: ...4 0 mA 0 4 0 4 V VIH 2 2 2 2 V VIL Input LOW Voltage 0 8 0 8 V IIX Input Leakage Current GND VI VCC 10 10 10 10 A IOZ Output Leakage Current Output Disabled GND VO VCC 10 10 10 10 A ICC Operating Curr...

Страница 4: ...uts Disabled Commercial 160 160 mA Industrial 180 180 ISB1 Standby Current Both Ports TTL Levels CEL and CER VIH f fMAX 7 Commercial 30 30 mA Industrial 40 40 ISB2 Standby Current One Port TTL Level C...

Страница 5: ...Max Min Max READ CYCLE tRC Read Cycle Time 15 25 35 55 ns tAA Address to Data Valid 15 25 35 55 ns tOHA Output Hold From Address Change 3 3 3 3 ns tACE CE LOW to Data Valid 15 25 35 55 ns tDOE OE LOW...

Страница 6: ...indow 5 5 5 5 ns Switching Characteristics Over the Operating Range 9 continued Parameter Description 7C138 15 7C139 15 7C138 25 7C139 25 7C138 35 7C139 35 7C138 55 7C139 55 Unit Min Max Min Max Min M...

Страница 7: ...HZCE DATA VALID DATA OUT SEM or CE OE tLZCE tPU ICC ISB tPD VALID tDDD tWDD MATCH MATCH R WR DATA INR DATAOUTL tWC ADDRESSR t PWE VALID t SD t HD ADDRESSL Notes 16 R W is HIGH for read cycle 17 Device...

Страница 8: ...e time of the memory is defined by the overlap of CE or SEM LOW and R W LOW Both signals must be LOW to initiate a write and either signal can terminate a write by going HIGH The data input set up and...

Страница 9: ...ntinued tSOP tAA SEM R W OE I O0 VALID ADDRESS VALID ADDRESS tHD DATAIN VALID DATAOUT VALID tOHA A0 A 2 tAW tHA tACE tSOP tSCE tSD tSA tPWE tSWRD tDOE WRITE CYCLE READ CYCLE MATCH tSPS A0L A2L MATCH R...

Страница 10: ...ts at cycle start 29 If tSPS is violated the semaphore will definitely be obtained by one side or the other but there is no guarantee which side will control the semaphore Figure 12 Busy Timing Diagra...

Страница 11: ...n which side BUSY will be asserted Switching Waveforms continued ADDRESS MATCH tPS tBLC tBHC ADDRESS MATCH tPS tBLC tBHC ADDRESSL R BUSYR CEL CER BUSY L CER CEL ADDRESSL R CEL Valid First CER Valid Fi...

Страница 12: ...nds on which enable pin CEL or R WL is asserted last Switching Waveforms continued WRITE FFF tWC tHA READ FFF tRC tINR WRITE FFE tWC READ FFE tINR tRC ADDRESSR CE L R WL INTL OE L ADDRESSR R WR CER IN...

Страница 13: ...g the device as either a master or a slave The BUSY output of the master is connected to the BUSY input of the slave This enables the device to interface to a master device with no external components...

Страница 14: ...X L L FFF H Table 5 Semaphore Operation Example Function I O0 7 8 Left I O0 7 8 Right Status No action 1 1 Semaphore free Left port writes semaphore 0 1 Left port obtains semaphore Right port writes...

Страница 15: ...1 0 0 9 4 0 4 5 5 0 5 5 6 0 NORMALIZED t AA SUPPLY VOLTAGE V NORMALIZED ACCESS TIME vs SUPPLY VOLTAGE 120 140 100 60 40 20 0 0 1 0 2 0 3 0 4 0 OUTPUT SINK CURRENT mA 0 80 OUTPUT VOLTAGE V OUTPUT SINK...

Страница 16: ...ercial CY7C138 25JXC J81 68 Lead Pb Free Plastic Leaded Chip Carrier CY7C138 25JI J81 68 Lead Plastic Leaded Chip Carrier Industrial CY7C138 25JXI J81 68 Lead Pb Free Plastic Leaded Chip Carrier 35 CY...

Страница 17: ...Y OF ANY KIND EXPRESS OR IMPLIED WITH REGARD TO THIS MATERIAL INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE Cypress reserves the right to...

Отзывы: