Advanced Micro Devices reserves the right to make changes in its products
without notice in order to improve design or performance characteristics.
This publication neither states nor implies any warranty of any kind, including but not limited to implied warrants of merchantability or fitness
for a particular application. AMD
®
assumes no responsibility for the use of any circuitry other than the circuitry in an AMD product.
The information in this publication is believed to be accurate in all respects at the time of publication, but is subject to change without notice.
AMD assumes no responsibility for any errors or omissions, and disclaims responsibility for any consequences resulting from the use of the
information included herein. Additionally, AMD assumes no responsibility for the functioning of undescribed features or parameters.
Trademarks
AMD is a registered trademark of Advanced Micro Devices, Inc.
SCSI and GLITCH EATER are trademarks of Advanced Micro Devices, Inc.
PC
Microsoft is a registered trademark of Microsoft Corporation.
Windows NT Miniport is a trademark of Microsoft Corporation.
Product names used in this publication are for identification purposes only and may be trademarks of their respective companies.
This chapter is included in the technical specification for the PCI family of AMD SCSI
solutions because of the nature of these devices. Each SCSI chip is effectively a
complete solution for integrating SCSI on a PCI adapter card or onto the motherboard of
a PCI based system. All of the logic required for a SCSI port is included in the PCI SCSI
device. Because AMD also furnishes the software solution for PC operating systems,
users are (for the first time) looking at SCSI as a standard I/O solution, but may have
little experience in the basics of the standard. This introduction will provide a basic
understanding of the relevant information so that users can quickly integrate and use the
SCSI interface.
Before the SCSI standard was defined, in the 1979 time frame, the typical introduction
of new peripheral technology required 18 to 24 months. The tasks consisted of:
1. Designing a disk controller board
2. Designing a host adapter board
3. Changing system software to accommodate new device characteristics
4. Testing the new configuration
Disk drive manufacturers were faced with a delay that severely impacted business.
If disk development required 18 months, and integration took another 18 months, the
total time to revenue was three years. Clearly, this technology bottleneck caused
problems for the disk industry. Consequently, vendors began to define logical interfaces
that could survive beyond each model, and allow integrators to preserve the majority of
their development investment. SCSI was one of these definitions that survived. Originally defined by Shugart Associates, SASI (Shugart Associates Systems Interface) was
offered as a public document by Shugart in hopes that other system vendors would use
it and establish it as a defacto standard. Within a short time, an ANSI standards group
was formed, the name was changed to Small Computer Systems Interface, and the
standardization efforts began.
With support from peripheral vendors, the document defined a logical interface to a wide
variety of peripherals. This interface would allow system vendors to attach peripherals
easily and quickly to new systems, in order to meet a fast moving market window. The
standard defined a physical level (mechanical and electrical) as well as a logical level
(commands and messages). The actual command passing protocol and the set of
peripheral command sets were defined by the standard. Using logical addressing
mechanisms, rather than physical addressing (sector 347 vs. cylinder 13, head 2,
sector 3), the standard allowed the physical details of the peripheral to be hidden from
the system software. Therefore, after the standard was defined, a typical integration
cycle was reduced to three months, and consisted of:
1. Replacing the current SCSI disk with a new model
2. Testing the new configuration for compliance
Am53C974A PCSCSI II Technical Manual
ix
AMD
The process was complicated because new peripherals offered features that were
enabled through the system software, and because vendors did not offer devices that
were compatible with other vendors. But in general, the process was much simpler and
faster than before.
Since 1979, the SCSI standard passed through several key stages as it matured into
today’s standard. These stages are:
SASI (1979 – 1982) — This was a DTC/Shugart collaboration that was a controller
board shipped with Shugart drives. Although limited in function, it highlighted the
advantages of a high level logical interface for disk drives.
SCSI-1 (1982 – 1986) — A group of companies (Shugart, Adaptec, NCR, & OMTI)
banded together and approached ANSI for permission to develop a SCSI standard.
The effort generated industry wide interest and was quickly written because of the
participants’ common interest (i.e. everyone desired quick time to market for their
products). The ANSI specification (X3.131–1986) won final approval in May of 1986.
CCS (1985 – 1986) — Upon finalization of the SCSI-1 specification, the participants
barely had time to congratulate each other before the weakness of the document
began to emerge. The number of options allowed vendors were to develop disks that
worked fine, but which were not compatible with each other. Thus system vendors
could not easily integrate disk drives from all vendors into their system. So, disk
vendors met to define an extended subset of SCSI that would (if followed closely)
permit vendors to produce compatible disk products. This document (Common Command Set) became a defacto standard and allowed further standardization of the
SCSI market.
SCSI-2 (1986 – 199X) — As soon as the CCS specification was written, the complete
SCSI community realized the benefit of these extensions and restarted the SCSI
effort to bring the benefits of CCS into the complete SCSI standard document. The
original goal was to quickly fold CCS into the disk section and expand other command sets to include CCS features. Unfortunately, the door of improvement, once
open, allowed a flood of improvements to come in. Updates were cut off by 1990 and
the specification has been finalized as of August 1990.
SCSI-3 (1990 – 199X) — The stated goal of the first two SCSI specifications was
downward compatibility, but with SCSI-3, backward compatibility was sacrificed. The
goal was to define a protocol that accommodated the new serial interfaces and
solved some of the problems of the parallel interface. The result is a family of documents being written for SCSI-3.
Basic SCSI
The standard SCSI parallel bus allows connection for 8 or 16 devices (computers or
peripherals). Each has a unique identifier that allows selection and communication
between any two devices on the SCSI bus. An Initiator is an entity on the bus that issues
a command to a Target. Note that any device on the bus, peripheral or computer
system, can initiate a command sequence. The Initiator arbitrates for and wins the SCSI
bus, selects the desired Target, and sends a command to that Target. At this point, the
Target controls the bus and directs the remainder of the command sequence. The
Initiator can always regain control by use of the attention line that signals the Target that
something is coming. But in general, the Target remains in control.
There are nine control signals on the SCSI bus that allow the complete handshake to
happen. Target or Initiator controls the Bus depending on the phase of the command
sequence. There are 8, 16, or 32 data lines with each 8 bit set having a parity line.
The data width can be negotiated for, with 8 being the default, and 16 or 32 being
x
Am53C974A PCSCSI II Technical Manual
AMD
options. Sixteen-bit SCSI devices are available but are not in widespread use, while
32-bit devices are not yet available. There is considerable inertia resisting going beyond
8-bit cables because of the physical sizes involved. There is a Fast SCSI option that
allows SCSI to transfer data at 10 mega transfers per second, thus allowing 10 MB/sec
on 8-bit cables. This configuration is the clear winner in today’s market, because it
allows faster transfers with no change in the physical environment. Single ended SCSI
is by far the most popular implementation and the specification allows 6 meter cables in
this environment. Fast SCSI is not defined for single-ended cables, however, vendors
are providing silicon that will allow data to be transferred at the higher speeds.
The SCSI protocol defines the phases required to complete a SCSI I/O. The Message
phase allows short transfers of protocol related information to be sent across the bus to
establish and control the logical connection between an Initiator and a Target. The
Command phase allows the Initiator to tell the Target what action must be performed.
Read, write, rewind, etc. are all SCSI commands. User data is transferred during the
Data phase, allowing the data to be sent into or out from the Initiator. This data can be
written to the media, or it can be control information that is used to communicate
operating modes or sensed information to(from) the peripheral. Status information (one
byte only) is sent to the Initiator from the Target at the end of the complete SCSI
command sequence. If an error occurred, the Initiator must request the details of the
problem with a subsequent SCSI command.
The basic SCSI command sequence follows:
Bus is free and any device is allowed to arbitrate for ownership
An Initiator arbitrates for the bus and selects a Target device
The Target, after sensing selection, goes to Message Out phase and receives a one
byte ID message from the Initiator that establishes which physical device the Initiator
wants to communicate with
After switching to Command phase, the Target receives the SCSI command.
Changing to the appropriate Data phase (in/out) the Target handshakes the data
across the bus
A single status byte is sent to the Initiator
A command complete message is sent to the Initiator to signal completion of the
SCSI I/O
The Target then physically disconnects from the SCSI bus, and it is free for the next
device to use
Any time after the ID message is sent, the Target controls the sequence and directs the
Initiator’s next step. The Target is allowed to disconnect, temporarily get off the bus and
reselect later. In this manner, data can be multiplexed from various peripherals to the
host computer, in support of overlapped physical actions at the peripheral and multithreaded I/O in the operating system.
SCSI-1 provided the basic protocol functionality that supported the original goals of
device connectability, allowing 8 bit buses and a limited protocol flexibility. As noted
above, the plug and play aspects of the specification were not quickly realized because
of the large set of options. The CCS specification defined the extended subset of the
SCSI-1 document that allowed multiple disk vendors to work in one system environment
without compatibility issues in the host software. The main SCSI-2 features were:
Compatibility –– There must be an evolutionary growth, and mixed environments
were permitted. Requirements in SCSI-2 were popular options in SCSI-1.
Am53C974A PCSCSI II Technical Manual
xi
AMD
High Performance –– The original 5 MB/sec limit was pushed to 40 MB/sec using a
combination of 32-bit buses and 10 Mega transfers per second. The maximum cable
limits were still set at 6 (single ended) and 25 (differential) meters. Eight devices were
allowed on the bus, but a working paper described how sixteen devices could be
attached.
Hardware Requirements –– Parity on the bus is required for data integrity, and dis-
connect/reconnect is required for multiplexing the SCSI bus. SCSI-1 had no requirement for messages (all were optional) because of compatibility with SASI, but SCSI-2
required certain messages to make SCSI more usable in a complex systems
environment.
Logical interface improvements –– A group of features were defined to generally
improve SCSI. Features included were queueing of 256 commands at the peripheral,
more detailed definition for all control data used to change device characteristics
(or report information about the device), cache support for direct access devices, and
tape partition support.
New Command Sets –– New device command sets were for scanners, optical
memory devices, medium changers, and communication devices.
These changes dramatically increased the size of the SCSI-2 specification, and moved
the definition into a more high performance system environment.
SCSI-3 has given SCSI a totally new set of capabilities. The basic desire was to
increase the functionality to cover all the physical interfaces and allow the architecture to
be extended to the future requirements with few restrictions for compatibility. The
standard was divided into multiple documents to ease the pain of an editor. There are
four transport layers:
Standard parallel interface for 8- and 16-bit cables
Fiber channel for 100 MB/sec, full duplex transfers
Serial Storage Architecture in support of high performance (20 MB/sec) disks
P1394 allows 400 Mb/sec isochronous transfers
Five protocols:
Interlocked
Fiber channel
SSA
Serial bus
Generic packetized
Five command sets:
Primary
Block
Stream
Graphics
Medium Changer
xii
The target release date for these set of documents is 1994, but if the past is any
indication, SCSI-3 will require many years of work before being ready for official release.
The delay will not stop products from emerging however, because products with the new
interfaces and features are already appearing in the marketplace.
Am53C974A PCSCSI II Technical Manual
AMD
Before SCSI could penetrate the PC market, a critical piece of technology was required:
I/O software drivers to support the SCSI capabilities in the PC operating system
environments. As the first vendors introduced host adapter boards that connected SCSI
devices to the PC, the user quickly learned the importance of software. Consider the
following scenario:
User buys a SCSI disk with host adapter
A tape drive is required to back up the disk
User buys a tape drive
The tape can be connected, but there is no software to drive the device
User buys a host adapter to drive the tape
The tape works now, but there is no software to move data to/from the disk
Point solutions became available, but general solutions were not available until 1991.
Although the hardware was available and certain systems vendors were able to make
SCSI work, there was no guarantee that a user could find an off-the-shelf solution for the
DOS/Windows environment. Host adapter companies quickly began to offer limited
software capabilities that allowed several devices to be used in the PC.
Several defacto interfaces were available and in the interest of standardization, a
Common Access Method (CAM) committee was formed to standardize access to the
SCSI interface for each PC operating system environment. Unfortunately, once software
was running, users were reluctant to change. Therefore, the CAM specification,
although technically sound, has never been widely accepted as a standard. The
Advanced SCSI Programming Interface (ASPI) instead became a defacto standard
interface for I/O application software such as CD-ROM and tape backup utilities.
Consequently, ASPI seems to be entrenched as the interface of choice for DOS/
Windows.
However, more sophisticated operating systems already have a logical I/O interface
defined and do not share the same limitations as DOS. As the new operating systems
become more widely used in PCs and DOS I/O gradually becomes buried in an
emulation mode, the critical driver issues for the PC will disappear. Until then (as Yogi
Berra says, “Tomorrow isn’t here yet”), highly integrated SCSI chips must be supplied
with SCSI I/O drivers for the operating systems that execute on a PC. The drivers must
be architected carefully so as to require minimal change when the SCSI device
changes. Known as a two layer software interface, a good architecture will isolate
changes in the operating system from changes in the SCSI interface. Software technology like this allows SCSI to be commonly available in the PC environment.
Another key element in the I/O performance saga is the availability of bus mastering in
the PC environment. Rather inexpensive 32 bit bus mastering SCSI chips with FIFO’s in
the chip have taken high performance I/O to new levels. The combination of bus
mastering on the chip, extremely high performance system processors and increasing
levels of silicon integration have combined recently to result in high performance low
cost solutions in a single chip.
Performance that was once only available as a host adapter board (with a separate
processor, SCSI chip, RAM, and system interface) is now achieved using a single chip.
System processors offer a level of MIPS on the motherboard that can easily support I/O
silicon on the motherboard, thus simplifying the SCSI port dramatically. This new level of
cost effective silicon, combined with a complete software solution will no doubt enable
SCSI in a new environment and drive the industry to another level of capability.
Am53C974A PCSCSI II Technical Manual
xiii
AMD
xiv
Am53C974A PCSCSI II Technical Manual
GENERAL INFORMATION
1
1.1INTRODUCTION
The Am53C974A from Advanced Micro Devices was developed in response to the PC
industry’s need for a hardware solution which harnessed the speed and flexibility of high
bandwidth local and I/O buses. Combining the performance of the PCI local bus with the
intelligence of the SCSI I/O bus, Advanced Micro Devices offers this Bus Mastering
SCSI Controller for PCI systems. The Am53C974A is one member of a family of AMD’s
plug compatible PCI products which share a common software solution. These products
are compliant with PCI specification rev 2.0; the Am53C974A also complies with ANSI
standards X3.131–1986 (SCSI-1) and X3.131–199X (SCSI-2).
The Am53C974A offers a glueless interface to the PCI Bus, making it an ideal choice for
motherboard as well as adapter card designs. The on-chip state machine which controls
SCSI sequences in hardware is coupled with a bus-mastering DMA engine to eliminate
the need for an additional RISC processor. The result is a PCI-SCSI controller with a
superior price/performance advantage. Furthermore, AMD’s value-added proposition for
the Am53C974A offering is a complete, licensable solution to minimize your time to
market.
Distinctive Features:
PCI Bus Interface Unit
PCI specification rev 2.0 compliant interface
32-bit address/data bus master DMA Host interface
Glueless interface to 33 MHz 32-bit PCI Bus
96-byte DMA FIFO for low bus latency
SCSI Controller Features
Single chip PCI to SCSI interface
Boot ROM support
Level 1 SCAM support
SCSI-2 compliant, 8-bit Fast SCSI interface
Supports single-ended SCSI bus
48 mA SCSI drivers
Performance
10 MByte/s synchronous and 7 MByte/s asynchronous transfer rates on the SCSI bus
132 MByte/s burst DMA transfer rate
Supports Scatter-Gather data transfers
Power Management
Sleep mode capability for Fast SCSI block –– Power down for SCSI receivers
General Information
1-1
AMD
SCSI activity monitoring pin and status bit
Fully static design for low frequency operation
SCSI clock disconnect capability
SCSI Bus Reliability
AMD’s patented Programmable GLITCH EATER Circuitry on REQ and ACK inputs
Programmable Active Negation on REQ, ACK and data lines
Other Features
132-pin PQFP
Uses state of the art advanced CMOS technology
The Am53C974A hardware solution is complemented by an extensive software package
for all major operating systems. The software solution incorporates AMD’s portable
SCSI software which is based in part on the Microsoft
1.2 HARDWARE
The Am53C974A is a high performance PCI local bus-SCSI controller. It is comprised of
the PCI Bus Interface Unit (BIU), a Fast SCSI block, and a bus master DMA engine. The
PCI BIU consists of configuration space and a PCI master/slave interface as defined in
rev 2.0 of the PCI specification. Figure 1-1 shows the basic interface block diagram of
the Am53C974A.
Windows NT Miniport model.
Figure 1-1PCI-DMA-SCSI Interface Block Diagram
Fast SCSI Block
Data
CNTL
DMA
Engine
Data
CNTL
DREQ
DACK
PCI^REQ
PCI^GNT
PCI Bus Interface Unit
ADDR
CNTL
19113A-1
1-2
General Information
1.2.1 Fast SCSI Block
The Am53C974A’s Fast SCSI block supports SCSI transfer rates of up to 10 MBytes/s
synchronously, and up to 7 MByte/s asynchronously. The Am53C974A combines this
functionality with features such as programmable Active Negation, and a 24-bit transfer
counter. AMD’s proprietary features such as power-down mode for SCSI receivers and
programmable GLITCH EATER Circuitry are also included for improved product
performance.
The Am53C974A has an 8-bit SCSI data interface and can operate as either an Initiator
or a Target to support all SCSI applications. The SCSI block is designed to minimize
host intervention by implementing common SCSI sequences in hardware. Selection,
Reselection, Information Transfer and Disconnection commands are directly supported.
For example, functions such as Target Selection/Initiator Reselection, Command,
Message, and data transfers between the SCSI bus and the SCSI FIFO are internal
processes that the Am53C974A handles without microprocessor intervention. An
on-chip state machine reduces protocol overhead by performing the required sequences
in response to a single command from the host.
Additionally, a 16-byte SCSI FIFO further assists in minimizing host involvement. The
FIFO provides a temporary storage for all command, data, status and message bytes as
they are transferred between the 32-bit host data bus and the 8-bit SCSI data bus.
Parity checking on data received from the SCSI bus is optional. Parity is generated in
the SCSI block as data is loaded into the SCSI FIFO. Data transfers between the SCSI
bus and the SCSI FIFO are internal processes that the Am53C974A also handles
without microprocessor intervention.
AMD
1.2.1.1 Features
Key features in the Am53C974A Fast SCSI block are highlighted below:
1.2.1.1.1 Access FIFO Command
The Target command set for the Am53C974A includes the Access FIFO command. This
command allows the host or DMA controller to remove remaining FIFO data following
the host’s issuance of a Target abort DMA command, or following an abort due to parity
error. This command facilitates data recovery and thereby minimizes the need to
re-transmit data. For more details, refer to the Target Command Set.
1.2.1.1.2 Reduced Power Mode
AMD’s exclusive power-down feature can be enabled to help reduce power consumption. The receivers on the SCSI bus may be turned off to eliminate current flow due to
termination power (~3 V) near the trip point of the input buffers. Additionally, the clock to
the SCSI core can be disconnected for further power reduction.
1.2.1.1.3 Programmable GLITCH EATER Circuitry
The patented GLITCH EATER Circuitry in the Am53C974A PCSCSI II Controller can be
programmed to filter glitches with widths up to 35 ns. It is designed to dramatically
increase system reliability by detecting and removing glitches that may cause system
failure. The GLITCH EATER Circuitry is implemented on the REQ and ACK inputs since
these lines are most susceptible to electrical anomalies such as reflections and voltage
spikes. Such signal inconsistencies can trigger false REQ/ACK handshaking, false data
transfers, addition of random data, and double clocking. AMD’s GLITCH EATER
Circuitry therefore maintains system performance and improves reliability. The following
diagram illustrates this circuit’s operation.
General Information
1-3
AMD
Figure 1-2GLITCH EATER Circuitry Operation
>15 ns<15 ns
SCSI Environment
Valid SignalGlitches
Device without the
GLITCH EATER Circuit
AMD’s Device with the
GLITCH EATER Circuit
By default, this feature is enabled and will filter glitches with widths up to 12 ns. When
this feature is implemented, the setup and hold times for the following parameters are
modified. However, they are still compliant with the SCSI-2 specification and have no
effect on the Am53C974A’s ability to meet Fast SCSI timings.
Data to REQ or ACK Setup Time:
Fast SCSI ANSI Requirement: 25 ns
Normal SCSI ANSI Requirement: 55 ns
Data to REQ Setup Time
(Async Initiator Receive Mode): 0 ns12 ns
Data to ACK Setup Time
(Async Target Receive Mode): 0 ns12 ns
Data to REQ or ACK Setup Time
(Sync Initiator/Target Receive Mode): 5 ns12 ns
ACK or
REQ Input
ACK or
REQ Input
Valid Signal Passes
Glitches pass through as valid signals
Glitches Filtered
19113A-2
0 ns12 ns
WindowWindow
1.2.1.1.4 Programmable Active Negation
AMD offers programmable active negation, a feature which, when implemented, will
actively drive the REQ, ACK and SCSI Data lines to a high state. This feature is
especially helpful for reducing SCSI Bus noise and improving data reliability. By actively
driving these signals to their high state, Active Negation eliminates unwanted signal
transitions and associated data double-clocking.
This feature is controlled by bits 3:2 in the SCSI Control Register Four ((B)+34h), and
may be implemented on REQ and ACK, or on REQ, ACK, and data lines during all SCSI
Bus phases except Arbitration and Selection. For more information on programming
options, refer to Control Register Four ((B)+34h) bit level descriptions.
1-4
General Information
1.2.2 DMA Engine
The Am53C974A bridges the PCI and SCSI buses by providing a buffer for these buses.
A 96-byte DMA FIFO (24 Double Words) internally interfaces with the 16-byte SCSI
FIFO to provide temporary storage for command, data, status, and message bytes as
they are transferred between the two buses.
The DMA engine is also capable of handling block type transfers (4 KB pages) during
scatter-gather operations. Odd/even boundary conditions are handled through hardware
to minimize software overhead.
1.3 SOFTWARE
To minimize your time to market, AMD offers a complete software solution for the
Am53C974A. This combination represents a powerful PCI systems solution which
enhances the flexibility of your system.
1.3.1 AMD’s PCSCSI II Software Solution
AMD’s PCSCSI II Software maximizes reusability and portability of SCSI protocol chip and
device driver source code across multiple operating system platforms. The software
architecture was based in part on the Microsoft Windows NT SCSI Miniport Driver
model.
AMD’s SCSI Software architecture supports the following features:
AMD
Device level overlapped/multithreaded operation
Tagged-queuing
Automatic request sense
Scatter-gather operations
Synchronous Transfers (including Fast SCSI)
General Information
1-5
AMD
1-6
General Information
SIGNAL DESCRIPTIONS
2
2.1LOGIC SYMBOL
Figure 2-1Am53C974A Logic Symbol
PCI Interface
AD [31:0]
C/BE [3:0]
PAR
FRAME
TRDY
IRDY
STOP
DEVSEL
IDSEL
PCI^REQ
PCI^GNT
CLK
PCI^RST
INTA
LOCK
PERR
SERR
PC
SCSI
(Am53C974A)
SD [7:0]
SDP
MSG
C/D
I/O
ATN
BSY
SEL
SCSI^RST
REQ
ACK
BA [7:0]
BD [7:0]
OE
LCK
BOOT
SCSI
Bus
Boot ROM
Support
VDDVSS
Signal Descriptions
SCSI CLK1
RES_DNC
PWDN
BUSY
Miscellaneous
Power
Management
Signals
19113A-3
2-1
AMD
2.2QUICK REFERENCE PIN DESCRIPTIONS
Pin NamePin TypeDescription
PCI
AD [31:00]IN/OUTAddress/Data Bus
C/BE [3:0]IN/OUTCommand/Byte Enable signals
PARIN/OUTParity Signal
SCSI CLK1INSCSI Core Clock
RES_DNCINReserved, DO NOT CONNECT
Power Management
PWDNINPower Down Indicator
BUSYOUTSCSI Bus Activity Pin
Power Supply
VDD+5 V
VSSGND
VDDB+5 V (Buffer)
VSSBGND (Buffer)
VDD3B+5 V (PCI)
VSS3BGND (5 V PCI)
2-2
Signal Descriptions
2.3SIGNAL DESCRIPTIONS
2.3.1Address and Data Pins
AD (31:00)
Address/Data
Address and Data are multiplexed on the same PCI pins. During the first clock of a
transaction the AD (31:00) contains the physical address (32 bits). During
subsequent clocks AD (31:00) may contain data. Little-endian byte ordering is used.
AD (07:00) is defined as least significant byte and AD (31:24) is defined as the most
significant byte.
When PCI^RST is active, AD(31:00) are inputs for NAND tree testing.
C/BE (3:0)
Bus Command/Byte Enable
Command and Byte Enables are multiplexed on the same PCI pins. During the
address phase of the transaction, C/BE(3:0) define the bus command. During the
data phase C/BE(3:0) are used as Byte Enables. The Byte Enables define which byte
lanes carry meaningful data. C/BE(0) applies to the least significant byte (byte 0) and
C/BE(3) applies to the most significant byte (byte 3).
When PCI^RST is active, C/BE (3:0) are inputs for NAND tree testing.
(Input/Output, Active High)
(Input/Output, Active Low)
AMD
PAR
Parity
(Input/Output, Active High)
Parity is even across AD(31:00) and C/BE (3:0). Parity is generated and driven
during Master Address Cycle, Memory Write, I/O Read, and Configuration Read
cycles. Parity is checked during Slave Address Cycle, Memory Read, I/O Write, and
Configuration Write cycles.
When PCI^RST is active, PAR is an input for NAND tree testing.
2.3.2PCI Interface Control Pins
FRAME
Cycle Frame
This signal is driven by the Am53C974A when it is the bus master to indicate the
beginning and duration of the access. FRAME is asserted to indicate that bus
transaction is beginning. FRAME is asserted while data transfers continue. FRAME is
driven high when the transaction is in the final data phase.
When PCI^RST is active, FRAME is an input for NAND tree testing.
TRDY
Target Ready
When the Am53C974A is selected as a slave, it will drive(low) this signal to indicate
its ability to complete the current data phase of the transaction. As a master, this
signal is an input to the Am53C974A from the selected (slave) device.
(Input/Output, Active Low)
(Input/Output, Active Low)
TRDY is used in conjunction with IRDY to indicate completion of the data phase.
The data phase is complete (on any clock) when both TRDY and IRDY are sampled
asserted. During a read transaction, TRDY is asserted when valid data is present on
AD (31:00), while during a write transaction, TRDY asserted indicates the target is
prepared to accept data. Wait cycles are inserted until both IRDY and TRDY are
asserted together.
When PCI^RST is active, TRDY is an input for NAND tree testing.
Signal Descriptions
2-3
AMD
IRDY
Initiator Ready
(Input/Output, Active Low)
When the Am53C974A is the initiator (master), it will drive (low) this signal to indicate
its ability to complete the current data phase of the transaction. As a slave, this signal
is an input to the Am53C974A from the initiating (master) device.
IRDY is used in conjunction with TRDY to indicate completion of the data phase. The
data phase is complete (on any clock) when both IRDY and TRDY are sampled
asserted. During a read transaction, IRDY asserted indicates the master is prepared
to accept data, while during a write transaction, IRDY is asserted to indicate that valid
data is present on AD (31:00). Wait cycles are inserted until both IRDY and TRDY
are asserted together.
When PCI^RST is active, IRDY is an input for NAND tree testing.
STOP
Stop
(Input/Output, Active Low)
In the slave role the Am53C974A drives the STOP signal to indicate to the bus
master to stop the current transaction. In the bus master role the Am53C974A
receives the STOP signal and stops the current transaction.
When PCI^RST is active, STOP is an input for NAND tree testing.
LOCK
Lock
(Input/Output, Active Low)
In the master role the Am53C974A drives the LOCK signal to indicate to the slave
device that multiple transactions may be necessary to complete an operation. When
LOCK is asserted, non-exclusive transactions may proceed. Control of LOCK is
obtained under its own protocol in conjunction with PCI^GNT. In the slave role the
Am53C974A receives the LOCK signal from the master.
When PCI^RST is active, LOCK is an input for NAND tree testing.
Note: In the current implementation, the Am53C974A as a master will never generate a
LOCK
. However in slave role, the chip will respond to a
LOCK
asserted by a master.
IDSEL
Initialization Device Select
(Input, Active High)
This signal is used as a chip select for the Am53C974A in lieu of the 24 address lines
during configuration read and write transaction.
When PCI^RST is active, IDSEL is an input for NAND tree testing.
DEVSEL
Device Select
(Input/Output, Active Low)
This signal when actively driven by the Am53C974A as a slave device signals to the
master device that it has decoded its address as the target of the current access. As
an input it indicates whether any device on the bus has been selected.
When PCI^RST is active, DEVSEL is an input for NAND tree testing.
2-4
Signal Descriptions
2.3.3Arbitration Pins
PCI^REQ
PCI Request
(Output, Active Low, Tristate)
This signal indicates to the arbiter that the Am53C974A desires use of the bus. This
is a point to point signal. Every master has its own equivalent of PCI^REQ, which will
be tristated after a power-up or a chip reset.
When PCI^RST is active, PCI^REQ is an input for NAND tree testing.
PCI^GNT
PCI Grant
(Input, Active Low)
This signal indicates that the access to the bus has been granted to the Am53C974A.
This is a point to point signal. Every master has its own equivalent of PCI^GNT.
When PCI^RST is active, PCI^GNT is an input for NAND tree testing.
2.3.4System Pins
CLK
Clock
(Input)
This signal provides timing for all the transactions on the PCI bus and all PCI devices
on the bus including the Am53C974A. All signals are sampled on the rising edge of
CLK and all parameters are defined with respect to this edge. The Am53C974A
operates up to 33 MHz.
AMD
When PCI^RST is active, CLK is an input for NAND tree testing.
PCI^RST
PCI Reset
(Input, Active Low)
This signal forces the Am53C974A sequencer to a known state. All Three-State
bi-directional signals are forced to a high impedance state and all Sustained Open
Drain signals are allowed to float high. The Am53C974A will tristate PCI^REQ, and
completely reset the Am53C974A. PCI^RST may be asynchronous to the CLK when
asserted or driven low. It is recommended that the deassertion be synchronous to
guarantee a clean and bounce free edge.
When PCI^RST is active, NAND tree testing is enabled. All PCI interface pins are
input mode. The result of the NAND tree testing can be observed on the BUSY
output (pin 62).
2.3.5Error Reporting Pins
PERR
Parity Error
(Input/Output, Active Low)
This signal may be pulsed by the Am53C974A when it detects a parity error during
any data phase when its AD (31:00) and C/BE (3:0) lines are inputs. The
Am53C974A monitors the PERR input during a bus master write cycle. It will assert
the Data Parity Reported bit in the Status Register of the PCI Configuration Space
when a parity error is reported by the target device.
When PCI^RST is active, PERR is an input for NAND tree testing.
Signal Descriptions
2-5
AMD
SERR
System Error
(Output, Active Low, Open Drain)
This signal may be pulsed by the Am53C974A for reporting address parity errors
when AD(31:00) are inputs.
When PCI^RST is active, SERR is an input for NAND tree testing.
2.3.6Interrupt Request Pins
INTA
Interrupt Request
(Output, Active Low, Open Drain)
This signal combines the interrupt request from both the DMA engine and the SCSI
block. The interrupt source can be determined by reading the DMA Status register
((B)+70). Interrupts caused by the DMA engine may be cleared in two ways. When
the Write Erase feature is not set in the SBAC register ((B)+54), the INTA signal will
be cleared when the Status Register ((B)+54) is read. When the Write Erase feature
is set, the INTA signal will only be cleared when a ‘1’ is written to the bit associated
with the interrupting condition. For those interrupts generated by the SCSI block, the
SCSI interrupt register must be serviced in order to clear the interrupt.
When PCI^RST is active, INTA is an input for NAND tree testing.
2.3.7SCSI Interface Signals
SD (7:0)
SCSI Data
(Input/Output, Active Low, Schmitt Trigger, Open Drain/Active Negation)
These pins are defined as bi-directional SCSI data bus.
SDP
SCSI Data Parity
(Input/Output, Active Low, Schmitt Trigger, Open Drain/Active Negation)
This pin is defined as bi-directional SCSI data parity.
MSG
Message
(Input/Output, Active Low, Schmitt Trigger, Open Drain)
MSG is a bi-directional signal which is asserted during a MESSAGE phase. It is a
schmitt triggered input in the Initiator role and an output with a 48 mA driver in the
Target role.
C/D
Command/Data
(Input/Output, Active Low, Schmitt Trigger, Open Drain)
C/D is a bi-directional signal which is used to indicate whether CONTROL or DATA
information is on the SCSI data bus. It is a schmitt trigger input in the Initiator role
and an output with a 48 mA driver in the Target role.
I/O
Input/Output
(Input/Output, Active Low, Schmitt Trigger, Open Drain)
I/O is a bi-directional signal which controls the direction of data movement on the
SCSI data bus with respect to the initiator. It is a schmitt triggered input in the Initiator
role and an output with a 48 mA driver in the Target role.
2-6
Signal Descriptions
AMD
ATN
Attention
ATN is a bi-directional signal which is used to indicate the ATTENTION condition. It is
a schmitt triggered input in the Target role and an output with a 48 mA driver in the
Initiator role.
BSY
Busy
BSY is a bi-directional signal which is asserted when the Am53C974A is arbitrating
for the SCSI bus or when it is connected as a Target. As an input it has a schmitt
trigger and as an output it has a 48 mA driver.
SEL
Select
SEL is a bi-directional signal which is asserted when the Am53C974A is attempting
to select or reselect another SCSI device. As an input it has a schmitt trigger and as
an output it has a 48 mA driver.
SCSI RST
Reset
SCSI RST is a bi-directional SCSI bus reset signal. As a schmitt triggered input to the
Am53C974A, this signal when asserted will reset portions of the SCSI logic (see Soft
Reset). As a 48 mA output driver, this signal when asserted will cause all other
devices on the SCSI bus to be reset. The Reset SCSI command will also cause the
SCSI RST pin to be driven active for 25–40 ms, depending on the SCSI clock
frequency and conversion factor.
(Input/Output, Active Low, Schmitt Trigger, Open Drain)
(Input/Output, Active Low, Schmitt Trigger, Open Drain)
(Input/Output, Active Low, Schmitt Trigger, Open Drain)
(Input/Output, Active Low, Schmitt Trigger, Open Drain)
REQ
Request
ACK
Acknowledge
2.3.8Power Management Signals
PWDN
Power Down Indicator
This signal, when asserted, sets the PWDN status bit in the DMA status register and
sends an interrupt to the host.
When PCI^RST is active, PWDN is an input for NAND tree testing.
BUSY
SCSI Devices Busy
(Input/Output, Active Low, Schmitt Trigger, Open Drain)
REQ is a bi-directional SCSI bus signal which indicates a request for a REQ/ACK
data transfer. It is a schmitt triggered input in the Initiator role and an output with a
48 mA driver in the Target role.
(Input /Output, Active Low, Schmitt Trigger/Open Drain)
ACK is a bi-directional SCSI bus signal which is used to indicate an acknowledgment
for a REQ/ACK data transfer handshake. It is a schmitt triggered input in the Target
role and a output with a 48 mA driver in the Initiator role.
(Input, Active High)
(Output, Active Low)
This signal is the logical equivalent of the SCSI bus BSY ORed with SEL signals. It is
duplicated so that external logic can be connected to monitor SCSI bus activity.
Signal Descriptions
2-7
AMD
When PCI^RST is active, the results of the NAND tree testing can be observed on
BUSY. When PCI^RST is driven low, BUSY will function as described above.
2.3.9Boot ROM Support Pins
BOOT
Boot ROM Present
(Input)
The state of this pin determines whether or not the Boot ROM interface on the
Am53C974A is enabled. When this pin is connected to VCC, the interface is enabled
to support the Boot ROM feature. When this pin is connected to ground, all input
buffers on BD (7:0) are disabled, and BA (7:0), OE, and LCK pins are tri-stated.
Since this pin was VSS on the Am53C974, the Boot ROM interface on the
Am53C974A is automatically disabled in existing Am53C974 designs.
BD (7:0)
Boot ROM Data
(Input)
When the Am53C974A is configured for Boot ROM support (Pin 100 tied to VCC),
BD (7:0) carries data from the ROM to the Am53C974A. When not configured to
support a Boot ROM (Pin 100 tied to ground), the input buffers on these pins are
disabled.
BA (7:0)
ROM Address
(Output)
When the Am53C974A is configured for Boot ROM support (Pin 100 tied to VCC),
BA (7:0) carries the Boot ROM address from the Am53C974A. When Boot ROM support
is disabled (Pin 100 tied to ground), these pins are tri-stated.
OE
ROM Output Enable
(Output)
When the Am53C974A is configured for Boot ROM support (Pin 100 tied to VCC), this pin
is used as the output enable for the ROM. When Boot ROM support is disabled (Pin 100
Tied to ground), this pin is tri-stated.
LCK
Latch Clock
(Output)
When the Am53C974A is configured for Boot ROM support (Pin 100 tied to VCC), this pin
is used as a clock to latch the high byte of the ROM address. When Boot ROM support
is disabled (Pin 100 tied to ground), this pin is tri-stated.
2.3.10Miscellaneous Signals
SCSI CLK1
SCSI Clock
(Input)
The SCSI clock signal is used to generate all internal device timings. The maximum
frequency of this input is 40 MHz, while the minimum is 10 MHz to maintain SCSI bus
timing requirements. To achieve Fast SCSI timings, a 40 MHz clock must be supplied
to this input.
2-8
RES_DNC
Reserved _Do Not Connect
(Input)
This pin (#116) is reserved for factory testing. To ensure proper chip operation, it
must not be connected.
Signal Descriptions
2.3.11Power Supply Pins
VDD
+5 V
Power
(Input)
These inputs provide power necessary to operate the Am53C974A. All VDD pins must
be connected to a +5 V source.
VDDB
+5 V
Power
(Input)
These inputs are for SCSI Buffers. These pins can be connected to the VDD pins.
VDD3B
+5 V
Power
(Input)
These inputs provide power for the PCI Interface block. These pins must be
connected to a +5 V source.
VSS/VSSB/VSS3B
Ground
(Input)
These inputs provide the necessary grounds to operate the Am53C974A. The VSSB
and VSS3B can be connected to VSS provided there is a decoupling capacitor between
VSSB and VDDB and VSS3B and VDD3B.
AMD
Signal Descriptions
2-9
AMD
2.4CONNECTION DIAGRAM TABLES
2.4.1Listed by Pin Number
Pin No.Pin NamePin No.Pin NamePin No.Pin NamePin No.Pin Name
The Am53C974A PCSCSI II controller provides a NAND tree test mode to allow connectivity checking to the device on a printed circuit board. The NAND tree is built on all PCI
bus signals.
The NAND tree test is enabled by asserting PCI^RST. All PCI signals will become inputs
when PCI^RST is asserted. The result of the NAND tree test can be observed on the
BUSY pin.
Figure 2-2NAND Tree
VDD
PCI^RST
(pin 120)
INTA
(pin 117)
AMD
CLK
(pin 121)
PWDN
(pin 58)
PC
SCSI II
BUSY
B
A
MUX
S
O
BUSY
(pin 62)
19113A-5
Signal Descriptions
2-13
AMD
Pin 120 (PCI^RST) is the first input to the NAND tree. Pin 117 (INTA) is the second input
to the NAND tree, followed by pin 121 (CLK). All other PCI bus signals follow, counterclockwise, with pin 58 (PWDN) being the last. Pins labeled NC and power supply pins
are not part of the NAND tree. The table below shows the complete list of pins connected to the NAND tree.
PCI^RST must be asserted (logic low) to start a NAND tree test sequence. Initially, all
NAND tree inputs except PCI^RST should be driven high. This will result in a low output
at the BUSY pin. If the NAND tree inputs are driven low in the same order as they are
connected to build the NAND tree, BUSY will toggle every time an additional input is
driven low. BUSY will change to a ONE, when INTA is driven low and all other NAND
tree inputs stay high. BUSY will toggle back to low, when CLK is additionally driven low.
The square wave will continue until all NAND tree inputs are driven low. BUSY will be
high when all NAND tree inputs are driven low.
When testing is complete, deassert PCI^RST to exit this test mode.
Note: Some of the pins connected to the NAND tree are outputs in normal mode of
operation. They must not be driven from an external source until the PC
* Not Implemented on Am53C974A. Writes to these locations will have no effect; reads from these locations will return ‘00h’.
** Reserved for SCSI software.
SCSI Register Map
Register
AcronymAddress (Hex.)Register DescriptionType
CTCREG(B)+00Current Transfer Count Register LowR
STCREG(B)+00Start Transfer Count Register LowW
CTCREG(B)+04Current Transfer Count Register MiddleR
STCREG(B)+04Start Transfer Count Register MiddleW
FFREG(B)+08SCSI FIFO RegisterR/W
CMDREG(B)+0CSCSI Command RegisterR/W
STATREG(B)+10SCSI Status RegisterR
SDIDREG(B)+10SCSI Destination ID RegisterW
INSTREG(B)+14Interrupt Status RegisterR
STIMREG(B)+14SCSI Timeout RegisterW
ISREG(B)+18Internal State RegisterR
STPREG(B)+18Synchronous Transfer Period RegisterW
CFIREG(B)+1CCurrent FIFO/Internal State RegisterR
SOFREG1(B)+1CSynchronous Offset RegisterW
CNTLREG1(B)+20Control Register OneR/W
CLKFREG(B)+24Clock Factor RegisterW
RES(B)+28ReservedW
CNTLREG2(B)+2CControl Register TwoR/W
CNTLREG3(B)+30Control Register ThreeR/W
CNTLREG4(B)+34Control Register FourR/W
CTCREG(B)+38Current Transfer Count Register High/Part-Unique ID CodeR
STCREG(B)+38Start Current Transfer Count Register HighW
RES(B)+3CReservedW
2-16
Signal Descriptions
AMD
DMA Register Map
Register
AcronymAddress (Hex.)Register DescriptionType
CMD(B)+40Command R/W
STC(B)+44Starting Transfer Count R/W
SPA(B)+48Starting Physical Address R/W
WBC(B)+4CWorking Byte Counter R
WAC(B)+50Working Address Counter R
STATUS(B)+54Status Register R
SMDLA(B)+58Starting Memory Descriptor List (MDL) AddressR/W
WMAC(B)+5CWorking MDL CounterR
SBAC(B)+70SCSI Bus and Control*
*Certain bits are Read/Write, certain bits are Read Only. Refer to the SBAC (SCSI Bus and Control) register for more detail.
Signal Descriptions
2-17
AMD
2-18
Signal Descriptions
POWER MANAGEMENT FEATURES
3
3.1INTRODUCTION
As a leader in low-voltage technology, AMD has incorporated power-saving features into
the Am53C974A. Through hardware and software or just software alone, the
Am53C974A can be powered down to reduce consumption during chip inactivity. This
significantly reduces overall power usage, as the system and associated peripherals can
benefit from these features.
3.2 SCSI ACTIVITY INDICATORS
The SCSI Bus activity can be monitored through hardware or software. Through the
hardware, the SCSI Bus activity is reflected by the BUSY output pin. This pin, when
active, indicates that the SCSI Bus is in use and therefore the Am53C974A should not
be powered down. Similarly, the SCSI activity can also be monitored through software
by polling the SBSY bit (bit 20) in the SBAC register ((B)+70). Both these indicators are
the logical equivalent to the SCSI bus signal BSY ORed with SEL. However, they are
not physically connected to the BSY signal on the SCSI bus. To correctly identify the
Bus Free State on the SCSI bus, either the BUSY pin or the SBSY bit must be inactive
for at least 250 ms (Selection Timeout period). Once this condition is valid, the SCSI
software can safely commence the power down sequence. Note that if the BUSY pin is
used to detect SCSI bus free condition, then external logic on the host must drive the
PWDN pin to notify the SCSI software to commence the power down sequence.
3.2.1Reduced Power Mode
When the SCSI Bus is free and there are no pending commands, the Am53C974A may
be powered down by turning off the input buffers on the SCSI Bus lines. This is done by
setting bit 5 in Control Register Four (B)+34h. Additionally, for further power reduction,
the internal registers may be programmed to a predetermined state, and the clock to the
SCSI core disconnected via the PWD bit (bit 21) in the SBAC register ((B)+70). However
before disconnecting the clock from the SCSI core, the state of the SCSI bus should first
be saved. This can be done through use of the Scratch registers in the PCI configuration
space starting at address 40h.
3.3POWER DOWN PIN (PWDN Pin)
When the PWDN pin is driven active, it sets the PWDN bit in the Status Register (Bit 0,
DMA Status Register (B)+54h), signaling the Am53C974A that the host would like to
power down the SCSI interface. An interrupt is generated when this bit is set.
3.3.1Software Disk Spin-Down
Incorporated into the SCSI ROM BIOS and certain device driver’s of AMD’s software
solution is a module which physically spins down SCSI fixed disks when the host system
elects to enact power management on the SCSI system. The software module is
activated upon the ROM BIOS and/or other device driver’s receipt of an interrupt caused
by the PWDN pin being driven active. Upon receipt of this interrupt, the current software
process is suspended and software control is given to the power management module.
Power Management Features
3-1
AMD
When the power management module is activated, it checks the status of all SCSI fixed
disks on the system under its control. The SCSI fixed disks that are idle are issued a
command to spin down their media. All fixed disks that are active at the time will be
scheduled for spin down upon completion of their pending commands. Once the BIOS
and/or drivers have detected the completion of each fixed disk’s final pending commands, they are issued the command to spin down as well.
To spin down the disk drives, the power management module issues a SCSI command
(1B– Start/Stop unit). When the command is received by the drive, it spins down and
waits in an idle state. For multiple drives on the SCSI bus, the power management
driver spins down each drive individually. The drives remain in the idle state until the
BIOS and/or driver receives a command for the particular fixed disk. Once this occurs,
the drive is issued the command to spin up. When the drive has completely spun up and
is ready, the pending command is issued to the drive. Only the particular fixed disk
issued the command is instructed to spin up. All other drives will remain in the spun
down state until a command is issued to them.
Note: This sequence does not turn off the SCSI input buffers as described in the previous section.
3-2
Power Management Features
THE PCI BUS INTERFACE UNIT
4
4.1INTRODUCTION
The Am53C974A handles all PCI bus accesses through its PCI Bus Interface Unit (BIU).
The PCI BIU interprets and generates all PCI bus signals in accordance with the PCI
specification Rev 2.0. In addition to interfacing the Am53C974A with the PCI bus, the
PCI BIU also contains a 256 byte PCI configuration register which is accessible via
Configuration Read/Write cycles from the PCI bus. This chapter covers the PCI block of
the Am53C974A PCISCSI II controller. The Am53C974A’s I/O address map, PCI bus
cycles and modes supported are described in detailed as well as the function and
contents of its PCI configuration registers. For more information on the PCI bus protocol,
refer to the
4.2ADDRESSING
PCI defines three physical address spaces: Memory, I/O, and Configuration. The
memory and I/O address space are customary while configuration has been defined to
support PCI hardware. Am53C974A accesses to the memory space requires a Memory
Read/Write command to the desired memory location while host CPU accesses to the
I/O space requires an I/O Read/Write command to the location specified by the Base
Address Register of the device’s configuration space. That is, the value written to the
Base Address Register of the Configuration space defines the base I/O location of the
Am53C974A. Configuration accesses to the Am53C974A are done by issuing a
Configuration Read/Write command with the Am53C974A IDSEL line asserted.
PCI Local Bus Specification
.
4.3BUS ACQUISITION
The first step in any Am53C974A bus master transfer is to acquire ownership of the bus.
This task is handled by synchronous logic within the PCI BIU. Bus ownership is
requested with the PCI^REQ signal and ownership is granted by the arbiter through the
PCI^GNT signal. Figure 4-1 shows the Am53C974A’s bus acquisition timing. In this
figure, although bus ownership is granted on clock 3 with the assertion of PCI^GNT, the
Am53C974A will not assert FRAME (indicating the start of bus cycle) until clock 5. Note,
however, that although the Am53C974A will begin driving AD[31:0] and C/BE[3:0] prior
to clock 4, these lines will not be valid until FRAME is asserted. ADSTEP (bit 7) in the
PCI command register is set to ONE to indicate that the Am53C974A uses address
stepping. However, address stepping is only used for the first address phase of a bus
master period.
The PCI Bus Interface Unit
4-1
AMD
Figure 4-1Bus Acquisition Timing
CLK
FRAME
123456
AD
C/BE
PCI^REQ
PCI^GNT
4.4BUS CYCLE DEFINITION
The Am53C974A supports only the relevant PCI bus cycles (eight of the sixteen cycles).
These cycles are defined by the C/BE [3:0] command lines during the address phase of
each PCI bus cycle. Table 4-1 shows these bus cycles and the mode supported by the
Am53C974A. Note that Bus cycles with an asterisk (*) are ignored by the Am53C974A,
while those with double asterisks (**) are aliased to the Slave Memory read cycle.
Table 4-1PCI Bus Cycles Supported by the Am53C974A
C/BE[3:0]Bus Cycle TypeMode Supported
0000Interrupt ACK*
0001Special Cycle*
0010I/O ReadSlave
0011I/O WriteSlave
0100Reserved*
0101Reserved*
0110Memory ReadMaster, Slave
0111Memory WriteMaster, Slave***
1000Reserved*
1001Reserved*
1010Config. ReadSlave
1011Config. WriteSlave
1100Mem Read Multiple**Slave
1101Dual Address Cycle*
1110Mem Read LineMaster, **Slave
1111Mem Write & Invalidate*
* These cycles are ignored by the Am53C974A.
** Both the Slave Memory Read Line and Slave Memory Read Multiple Cycles are aliased to the Slave
Memory Read cycle.
*** Slave Memory Write commands to the Am53C974A will complete normally but the data is ignored by the
device.
ADDR
CMD
19113A-7
4-2
The PCI Bus Interface Unit
4.5BUS CYCLE DIAGRAMS
The following are samples of the Am53C974A’s bus cycles in Table 4-1. Each cycle
shows an example timing diagram along with a brief description of the cycle. Note that
the cycles shown are only typical PCI bus cycles; each cycle can be distinct because of
various factors such as Bus Latency, IRDY and TRDY timing, etc.
4.5.1Slave I/O Read
The Slave I/O Read command is used by the processor to read internal registers in the
Am53C974A. It is a single cycle, non_burst 8-bit, 16-bit, or 32-bit transfer which is
initiated by the host CPU. The Am53C974A will not produce slave I/O Read commands
while a bus master. Slave I/O Read cycles are fixed length cycles, i.e. the Am53C974A
will return TRDY on the 10th bus cycle of the transfer. Figure 4-2 shows the timing for a
Slave I/O Read bus cycle.
Figure 4-2Slave I/O Read Timing
CLK
123
FRAME
456789101112
AMD
C/BE
PAR
SERR
PERR
IRDY
TRDY
DEVSEL
AD
ADDRDATA
0010BE
PAR
SERR
PAR
PERR
19113A-8
The PCI Bus Interface Unit
4-3
AMD
4.5.2Slave I/O Write
The Slave I/O Write command is used by the processor to write the internal registers in
the Am53C974A. It is a single cycle, non-burst 8-bit, 16-bit, or 32-bit transfer which is
initiated by the host CPU. The Am53C974A will not produce Slave I/O Write commands
while a bus master. Slave I/O Write cycles are fixed length cycles, i.e. the Am53C974A
will return TRDY on the 10th bus cycle of the transfer. Figure 4-3 shows the timing for a
Slave I/O Write bus cycle.
Figure 4-3Slave I/O Write Timing
CLK
FRAME
AD
C/BE
PAR
SERR
PERR
IRDY
TRDY
123456789101112
ADDRDATA
0011BE
PARPAR
SERR
PERR
4-4
DEVSEL
19113A-9
The PCI Bus Interface Unit
4.5.3Master Memory Read
The Master Memory Read command is used by the Am53C974A when it will be reading
2 or less 32-bit locations of memory. If the device needs to read more than 2 Doublewords (Dwords) of memory, the Master Memory Read Line command is used. Figure 4-4 shows an example timing diagram for a Master Memory Read command. In this
figure, the device issues a request for the bus, is granted access, and then reads a
32-bit Dword from system memory before releasing the bus. The data phase in this
diagram takes two clock cycles, this being determined by the timing of TRDY.
Note that during a Master Memory Read, the Am53C974A will always activate all byte
enables, even though some byte lanes may not contain “valid” data. In such instances,
the Am53C974A will internally discard unnecessary bytes.
Figure 4-4Master Memory Read Timing
AMD
CLK
FRAME
AD
C/BE
PAR
SERR
PERR
IRDY
TRDY
12345678
ADDR
0110
DATA
BE
PAR
SERR
910
PAR
PERR
DEVSEL
PCI^REQ
PCI^GNT
The PCI Bus Interface Unit
19113A-10
4-5
AMD
4.5.4Slave Memory Read
The Slave Memory Read Command is used by the processor to read data from the
Am53C974A’s expansion ROM. This is a single cycle, non-burst 8-bit,16-bit, or 32-bit
transfer which is initiated by the host CPU. The Am53C974A will always respond to this
cycle by returning valid data on all byte lanes. Thus, it is the responsibility of the host to
discard any unneccessary bytes via the C/BE[3:0] lines. The Am53C974A will not
produce Slave Memory Read commands while a bus master. Slave Memory Read
cycles are fixed length cycles, i.e. the Am53C974A will return TRDY on the 54th bus
cycle of the transfer. Figure 4-5 shows the timing for a Slave Memory Read bus cycle.
Note that the Slave Memory Read Multiple and the Slave Memory Read Line commands
are aliased to the Slave Memory Read command.
Figure 4-5Slave Memory Read Timing
CLK
123455354
FRAME
AD
C/BE
PAR
SERR
PERR
IRDY
TRDY
STOP
DEVSEL
ADDR
0110
PAR
DATA
BE
PAR
SERR
PERR
19113A-11
4-6
The PCI Bus Interface Unit
4.5.5Master Memory Write
The Master Memory Write command is used by the Am53C974A when it will be writing
to memory. Figure 4-6 shows an example timing diagram for a Master Memory Write
command. In this figure, the device issues a request for the bus, is granted access, and
then writes a 32-bit Dword into system memory before releasing the bus. Note that in
this example, the data phase transfer takes 2 clock cycles. The timing of this transfer, in
this case, was controlled by TRDY.
Figure 4-6Master Memory Write Timing
AMD
CLK
FRAME
AD
C/BE
PAR
SERR
PERR
IRDY
TRDY
12345678
ADDRDATA
0111
PAR
BE
PAR
SERR
910
PERR
DEVSEL
PCI^REQ
PCI^GNT
The PCI Bus Interface Unit
19113A-12
4-7
AMD
4.5.6Slave Configuration Read
The Slave Configuration Read command is used by the host CPU to read the PCI
configuration space in the Am53C974A. This provides the host CPU with information
concerning the device and its capabilities. This is a single cycle, non-burst 8-bit, 16-bit,
or 32-bit transfer. Slave Configuration Read cycles are fixed length cycles, i.e. the
Am53C974A will return TRDY on the 5th bus cycle of the transfer. Figure 4-7 shows the
Configuration Read cycle timing.
Figure 4-7Slave Configuration Read Timing
CLK
FRAME
AD
C/BE
PAR
SERR
PERR
IRDY
TRDY
1
2345678
ADDRDATA
1010
PAR
BE
PAR
SERR
PERR
4-8
IDSEL
DEVSEL
19113A-13
The PCI Bus Interface Unit
4.5.7Slave Configuration Write
The Slave Configuration Write command is used by the host CPU to write the configuration space in the Am53C974A. This allows the host CPU to control basic activity of the
device, such as enable/disable, change I/O location, etc. This is a single cycle, nonburst 8-bit, 16-bit, or 32-bit transfer. Slave Configuration Write cycles are fixed length
cycles, i.e. the Am53C974A will return TRDY on the 5th bus cycle of the transfer. Figure
4-8 shows the Configuration Write cycle timing.
Figure 4-8Slave Configuration Write Timing
AMD
CLK
FRAME
AD
C/BE
PAR
SERR
PERR
IRDY
TRDY
1
2345678
ADDR
1011
DATA
BE
PARPAR
SERR
PERR
IDSEL
DEVSEL
The PCI Bus Interface Unit
19113A-14
4-9
AMD
4.5.8Master Memory Read Line
The Master Memory Read Line command is used by the Am53C974A when it will be
reading more than two 32-bit locations of memory. If the device needs to read less
than 2 Dwords of memory the Master Memory Read command is used. Figure 4-9
shows an example timing diagram for a Master Memory Read Line command. In this
figure, the device issues a request for the bus, is granted access, and then reads four
32-bit Dwords from system memory before releasing the bus. Note that all data phases
in this example take 2 clock cycles, this being determined by the timing of TRDY.
Figure 4-9Master Memory Read Line Timing
CLK
123456789101112
FRAME
1314
AD
C/BE
PAR
SERR
PERR
IRDY
TRDY
DEVSEL
PCI^REQ
ADDR
1110
PAR
BE
SERR
DATA
DATA
PAR
PERRPERR
DATADATA
PAR
PERR
PAR
PERR
PAR
PCI^GNT
4-10
19113A-15
The PCI Bus Interface Unit
4.6TRANSACTION TERMINATION
Termination of a PCI transaction may be initiated by either the master or the target.
During termination, the master remains in control to bring all PCI transactions to an
orderly and systematic conclusion regardless of what caused the termination. All
transactions are concluded when FRAME and IRDY are both deasserted, indicating an
IDLE cycle.
4.6.1Target Initiated Termination
When the Am53C974A is a bus master, the cycles it produces on the PCI bus may be
terminated by the target in one of three different ways: Disconnect with data transfer,
disconnect without data transfer, and target abort.
4.6.1.1Disconnect With Data Transfer
Figure 4-10 shows a disconnection in which one last data transfer occurs after the target
asserted STOP. STOP is asserted on clock 4 to start the termination sequence. Data is
still transferred during this cycle, since both IRDY and TRDY are asserted. The
Am53C974A terminates the current transfer with the deassertion of FRAME on clock 5
and then one clock cycle later with the deassertion IRDY. It finally releases the bus on
clock 6. The Am53C974A will re-request the bus after 2 clock cycles, if it wants to
transfer more data. The starting address of the new transfer will be the address of the
next untransferred data.
AMD
Figure 4-10Disconnect With Data Transfer
CLK
FRAME
AD
C/BE
PAR
IRDY
TRDY
DEVSEL
STOP
12345678
ADDR
DATADATA
i
00000111
PARPARPAR
109
ADDR +8
11
i
0111
PCI^REQ
PCI^GNT
DEVSEL
is sampled by the Am53C974A
The PCI Bus Interface Unit
19113A-16
4-11
AMD
4.6.1.2Disconnect Without Data Transfer
Figure 4-11 shows a target disconnect sequence during which no data is transferred.
STOP is asserted on clock 4 without TRDY being asserted at the same time. The
Am53C974A terminates the current transfer with the deassertion of FRAME on clock 5
and one clock cycle later with the deassertion of IRDY. It finally releases the bus on
clock 6. The Am53C974A will re-request the bus after 2 clock cycles to retry the last
transfer. The starting address of the new transfer will be the same address as the last
untransferred data.
Figure 4-11Disconnect Without Data Transfer
CLK
12345678
FRAME
109
11
AD
C/BE
PAR
IRDY
TRDY
DEVSEL
STOP
PCI^REQ
ADDRiADDRi
DATA
00000111
PARPAR
0111
PCI^GNT
4-12
DEVSEL
is sampled by the Am53C974A
19113A-17
The PCI Bus Interface Unit
4.6.1.3Target Abort
Figure 4-12 shows a target abort sequence. The target asserts DEVSEL for one clock. It
then deasserts DEVSEL and asserts STOP on clock 4. A target can use the target abort
sequence to indicate that it cannot service the data transfer and that it does not want the
transaction to be retried. Additionally, the Am53C974A cannot make any assumption
about the success of the previous data transfers in the current transaction. The
Am53C974A terminates the current transfer with the deassertion of FRAME on clock 5
and one clock cycle later with the deassertion of IRDY. It finally releases the bus on
clock 6.
Since data integrity is not guaranteed, the Am53C974A cannot recover from a target
abort event. Any on-going SCSI activity will be stopped immediately and an interrupt will
be generated. The ABORT and ERROR bits will be set in the DMA Status register. The
PCI configuration registers will not be cleared. RTABORT (bit 12) in the PCI Configuration Space Status register will be set to indicate that the Am53C974A has received a
target abort.
Figure 4-12Target Abort
CLK
AMD
123456
FRAME
C/BE
PAR
IRDY
TRDY
DEVSEL
STOP
PCI^REQ
AD
ADDR
DATA
00000111
PARPAR
PCI^GNT
DEVSEL
is sampled by the Am53C974A
The PCI Bus Interface Unit
19113A-18
4-13
AMD
4.6.2Master Initiated Termination
There are two scenarios besides normal completion of a transaction where the
Am53C974A will terminate the cycles it produces on the PCI bus. These are Preemption
and Master Abort.
4.6.2.1Preemption
The central arbiter can take PCI^GNT to the Am53C974A away if the current bus
operation takes too long. This may happen during DMA bursts. When PCI^GNT is
removed and the value in the Latency Timer register has counted to zero, the
Am53C974A will finish the current transfer and then immediately release the bus. The
Latency Timer in PCI configuration space of the Am53C974A is programmable. The
Am53C974A will keep PCI^REQ asserted to regain bus ownership as soon as possible.
Figure 4-13Preemption
CLK
12345678
FRAME
9
C/BE
PAR
IRDY
TRDY
DEVSEL
PCI^REQ
PCI^GNT
AD
DEVSEL
ADDRDATADATADATA
00000111
PARPARPAR
is sampled by the Am53C974A
4-14
19113A-19
The PCI Bus Interface Unit
4.6.2.2Master Abort
The Am53C974A will terminate its cycle with a Master Abort sequence if DEVSEL is not
asserted within 4 clocks after FRAME is asserted. Master Abort is treated as a fatal error
by the Am53C974A. Any on-going SCSI activity will be stopped immediately and an
interrupt will be generated. The ABORT and ERROR bits will be set in the DMA Status
Register. The PCI configuration registers will not be cleared. RMABORT (bit 13) in the
PCI Configuration Space Status register will be set to indicate that the Am53C974A has
terminated its transaction with a master abort.
Figure 4-14Master Abort
CLK
FRAME
12345678
AMD
109
AD
C/BE
PAR
IRDY
TRDY
DEVSEL
PCI^REQ
PCI^GNT
DEVSEL
ADDRDATA
00000111
PARPAR
is sampled by the Am53C974A
19113A-20
The PCI Bus Interface Unit
4-15
AMD
4.7CONFIGURATION REGISTERS
PCI Configuration Registers are used to determine which devices are in the system as
well as to configure those devices. Configuration registers can be accessed any time
but only by PCI configuration read/write cycles. This space is divided into two regions:
A predefined header region and a device dependent region. The predefined header
region contains 64 bytes organized as 4 Dwords while the device dependent region may
contain up to 192 bytes also organized as 4 Dwords. The Am53C974A supports the full
64 byte predefined header and only 16 bytes of the device dependent region. Table 4-2
shows the configuration register map for both these regions. In Table 4-2, the first 64
bytes (00h – 3Fh) are the predefined header and the last 16 reserved bytes (40h – 4Fh)
belong to the device dependent space.
* Not Implemented on Am53C974A. Writes to these locations will have no effect; reads from these locations will return ‘00h’.
** Reserved for SCSI software.
All PCI compliant devices, including the Am53C974A, must support the
Device ID, Command and Status register
in the header portion. Implementation of the
Vendor ID,
other registers in this header is optional depending on device functionality. In Table 4-2,
an asterisk (*) means the location is NOT implemented on the Am53C974A while a
double asterisk (**) specifies that the location is reserved for use by the SCSI software.
Write operations to unimplemented registers in the configuration space are treated as
no-ops. That is, the access will be completed normally on the bus and the data discarded. Read accesses to unimplemented registers are completed normally and a data
value of ‘00h’ is returned.
4-16
The PCI Bus Interface Unit
4.7.1Predefined Header Register Description
The following only describes the functions of the registers that are supported by the
Am53C974A. Refer to the
PCI registers.
4.7.1.1Vendor ID Register
Address 00h READ ONLY
This register identifies the manufacturer of this device as Advanced Micro Devices, Inc.
(AMD) The Vendor ID is ‘1022h.’
4.7.1.2Device ID Register
Address 02h READ ONLY
This register uniquely identifies this device within AMD’s product line. The Am53C974A
Device ID is ‘2020h.’
4.7.1.3Command Register
Address 04h READ/WRITE
The Command Register is used to control the gross functionality of the device. It
controls a device’s ability to generate and respond to PCI bus cycles. To logically
disconnect the Am53C974A from all PCI bus cycles except Configuration cycles, a
value of zero should be written to this register. The Command Register is cleared by a
PCI reset.
These 6 bits are reserved by the PCI Specification. Write operations to these locations
have no affect on the device. Read operations from these locations will return 0’s.
Bit 9 – FBTBEN – Fast Back-to-Back Enable
This bit is hardwired to a value of ‘0’ since Am53C974A back-to-back transactions are
only allowed to the same agent.
The PCI Bus Interface Unit
4-17
AMD
Bit 8 –
SERREN
–
SERR
Enable
This read/write bit is an enable bit for the SERR driver. When this bit is set to ‘1’, the
SERR driver is enabled. When this bit is reset to ‘0’, the SERR driver is disabled. This
bit and bit 6 (Parity Error Response) must be set to ‘1’ to report address parity errors.
This bit’s state is zero after a device reset.
Bit 7 – ADSTEP – Wait Cycle Control
This bit is hardwired to a value of ‘1’ since the Am53C974A always does address
stepping. The Am53C974A uses address stepping for the first address phase of each
bus master period. FRAME will be asserted on the second clock following the assertion
of PCI^GNT, indicating a valid address on the AD bus.
Bit 6 – PERREN – Parity Error Response Enable
This read/write bit controls the Am53C974A’s response to parity errors. When PERREN
is ‘0’ and the Am53C974A detects a parity error, it only sets the Detected Parity Error bit
in the PCI Configuration Space Status Register. When PERREN is ‘1’, the Am53C974A
asserts PERR on the detection of a data parity error. It also sets the DATAPERR bit (bit
8 in the PCI Configuration Space Status Register) when the data parity error occurred
during a master cycle. PERREN also enables reporting address parity errors through
the SERR pin and the SERR bit in the PCI Configuration Space Status Register. This bit
must be reset to ‘0’ after PCI^RST. Parity is still generated by the device even if this bit is
disabled (0).
Bit 5 – VGASNOOP – VGA Palette Snoop
This bit is hardwired to a value of ‘0’ since the Am53C974A is not a graphics device.
Bit 4 – MWIEN – Memory Write & Invalidate Enable
This bit is hardwired to a value of ‘0’ since the Am53C974A does not generate memory
write & invalidate commands. Instead, the memory write command must be used.
Bit 3 – SCYCEN – Special Cycles Enable
The Am53C974A will ignore all Special Cycle operations since this bit is hardwired to a
value of ‘0’.
Bit 2 – BMEN – Bus Master Enable
This read/write bit controls the Am53C974A’s ability to act as a master on the PCI bus.
When this bit is ‘0’, the device is disabled from generating PCI accesses. When this bit
is 1, the device is allowed to behave as a bus master.
Bit 1 – MEMEN – Memory Space Enable
This bit is programmable to allow support for expansion ROM accesses. This bit must
be set to ‘1’ before the Expansion ROM can be accessed. When this bit is ‘0’, access to
the boot ROM is disabled.
Bit 0 – IOEN – I/O Space Enable
This read/write bit controls the Am53C974A’s response to I/O space accesses. When
this bit is ‘0’, the device will not respond to I/O space accesses. When this bit is ‘1’, the
device is allowed to respond to I/O space accesses. The host must set IOEN before the
first I/O access to the device. The Base Address register at address (10H) must be
programmed with a valid I/O address before setting IOEN.
4-18
The PCI Bus Interface Unit
4.7.1.4Status Register
Address 06h READ/WRITE
The Status register is used to record status information for PCI bus related activities.
Reads from this register function normally, however writes function differently. On a
write of ‘1’, bits will be reset (from 1 to 0), not set. For example, to reset bit 15 and not
affect any other bits, a value of 1000_0000_0000_0000 should be written to the Status
register.
This bit is used by the Am53C974A to report parity errors. This bit is set to ‘1’ whenever
the device detects a parity error. This bit is cleared by writing a ‘1’ to this location. The
value of this bit is undefined after a device reset. The Am53C974A samples the
AD(31:00), C/BE(3:0) and the PAR lines for a parity error at the following times:
AMD
In slave mode, during the address phase of any PCI bus command.
In slave mode, during the data phase of all I/O and Configuration Write commands
that select the Am53C974A.
In master mode, during the data phase of all Memory Read and Memory Read line
commands.
During the data phase of the memory write command, the Am53C974A sets the PERR
bit if the target reports a data parity error by asserting the PERR signal. PERR is not
affected by the state of the Parity Error Response Enable bit (bit 6 in the PCI Configuration Space Command register).
Bit 14 – SERR – Signaled System Error
This bit is set to ‘1’ when the SERR pin is asserted. This bit is cleared by writing a ‘1’ to
this location.
Bit 13 – RMABORT – Received Master Abort
As a bus master, the Am53C974A will set this bit to ‘1’ whenever its transaction is
terminated with a Master-abort. This bit is cleared by writing a ‘1’ to this location.
Bit 12 – RTABORT – Received Target Abort
As a bus master, the Am53C974A will set this bit to ‘1’ whenever its transaction is
terminated with a target-abort. This bit is cleared by writing a ‘1’ to this location.
Bit 11 – STABORT – Signaled Target Abort
As a target device, this bit is set to ‘1’ by the Am53C974A whenever it terminates a
transaction with a target-abort. This bit is cleared by writing a ‘1’ to this location.
The PCI Bus Interface Unit
4-19
AMD
Bit 10:9 – DEVSEL1:0 – DEVSEL Timing
These bits encode the timing of the DEVSEL signal. These bits are hardwired to a value
of ‘0’ and ‘1’ (for bits 10 and 9 respectively) since the Am53C974A uses medium
assertion timing for the DEVSEL signal. That is, DEVSEL is asserted two clocks after
FRAME is asserted. These bits are read-only and indicate the time that the Am53C974A
asserts DEVSEL for any bus command.
Bit 8 – DATAPERR – Data Parity Detected
DATAPERR is set when the Am53C974A detects a data parity error during master
mode and the Parity Error Response enable bit (bit 6 in the PCI Configuration Space
Command register) is set.
During the data phase of all Memory Read and Memory Read Line commands, the
Am53C974A checks for parity errors by sampling the AD(31:00), C/BE(3:0) and the PAR
lines. During the data phase of all Memory Write commands, the Am53C974A checks
the PERR input to detect whether the target has reported a parity error.
DATAPERR is set by the Am53C974A and is cleared by writing a ‘1’ to this location.
Writing a ‘0’ has no effect.
Bit 7 – FBBOK – Fast Back-to-Back Capable
This bit is hardwired to a value of ‘0’ since the Am53C974A is not capable of accepting
fast back-to-back transactions when the transactions are not to the same agent.
Bit 6–0 – Reserved
These 7 bits are reserved by the PCI Specification. Write operations to these locations
have no affect on the device. Read operations from these locations will return 0’s.
4.7.1.5Revision ID Register
Address 08h READ ONLY
This register specifies the device specific revision number. On the Am53C974A, the
value of this register is ‘10h’.
4.7.1.6Programming Interface Register
Address 09h READ ONLY
This register identifies the programming interface of this device. The value in this
register is ‘00h’.
4.7.1.7Sub-Class Register
Address 0Ah READ ONLY
This register identifies this device as a SCSI Controller as defined by the PCI specification. The value in this register is ‘00h’.
4.7.1.8Base Class Register
Address 0Bh READ ONLY
This register identifies this device as a Mass Storage controller as defined by the PCI
specification. The value in this register is ‘01h’.
This register specifies the maximum time the Am53C974A can continue with bus master
transfers after the system arbiter has removed PCI^GNT. The time is measured in CLK
4-20
The PCI Bus Interface Unit
cycles. The working copy of the timer will start counting down when the Am53C974A
asserts FRAME for the first time during a bus mastership period. The counter will freeze
at ZERO. When the counter is ZERO and PCI^GNT is deasserted by the system arbiter,
the Am53C974A will finish the current data phase and then immediately release the bus.
The value for the Am53C974A Latency Timer Register is programmable.
4.7.1.10Header TYPE Register
Address 0Eh READ ONLY
This is an 8-bit register that describes the format of the PCI Configuration Space
locations 10h to 3Ch and that identifies a device to be single or multi-function. This
register is located at address 0Eh in the PCI Configuration Space and is Read only.
The value contained in this register is 00h.
This read/write register defines the Base Address for the Am53C974A. Bit 0 is hardwired to a value of ‘1’ to indicate that the base address is mapped into the I/O space
while bit 1 is ‘reserved’ and will always return a ‘0’ when read. That is, a value of ‘01’ for
bits 1 and 0 respectively will be returned on reads.
These bits are written by the host to specify the location of the Am53C974A in all of I/O
space. IOBASE 26:0 must be written with a valid address before the Am53C974A slave
I/O mode is turned on with the setting of the IOEN bit (bit 0 in the PCI Configuration
Space Command register).
When the Am53C974A is enabled for I/O mode (IOEN is set), it monitors the PCI bus for
a valid I/O command. If the value on AD(31:05) during the address phase of the cycles
matches the value of IOBASE, the Am53C974A will drive DEVSEL indicating it will
respond to the access.
IOBASE 26:2 is read and written by the host. IOBASE 1:0 is hardwired to ‘0’.
Bit 4:2 – IOSIZE 2:0 – I/O Size Requirements
IOSIZE 2:0 together with IOBASE 1:0 and bits 1 and 0 indicate the size of the I/O space the
Am53C974A requires. When the host writes a value of FFFF_FFFF to the Base Address register,
it will read back a value of ‘0’ in bits 6–1. This indicates an Am53C974A I/O space requirement of
128 bytes.
Bit 1 – Reserved
This bit is reserved. Writes to this location have no effect. Reads from this location will
return a ‘0’.
Bit 0 – IOSPACE – I/O Space Indicator
This bit indicates that the Base Address Register describes an I/O Base address. Writes
to this location have no effect. Read from this location will return a ‘1’.
4.7.1.12Expansion ROM Base Address Register
Address 30hREAD/WRITE
This is a 32-bit read/write register which is used to hold the expansion ROM Base
Address. It is used to specify the size and alignment of the expansion ROM for the
Am53C974A. It supports expansion ROMs of up to 64K.
3130292827262524
ROM31ROM30ROM29ROM28ROM27ROM26ROM25ROM24
XXXXXXXX
2322212019181716
ROM23ROM22ROM21ROM20ROM19ROM18ROM17ROM16
XXXXXXXX
15141312111098
ROM15ROM14ROM13ROM12ROM11ROM10ROM9ROM8
00000000
4-22
76543210
ROM7ROM6ROM5ROM4ROM3ROM2ROM1ROM0
00000000
The PCI Bus Interface Unit
Bit 31:16 – ROM31:16 – ROM Base Address
These bits are programmable for storing the expansion ROM base address. The values
in these bits are unknown after power-on or reset.
Bit 15:11 – ROM15:11 – ROM Alignment
These bits are hardwired to ‘0’, specifying a 64K alignment ROM support.
Bit 10:1 – ROM10:1 – Reserved
These bits are reserved as defined by the PCI specification, rev 2.0. These bits will
return a value of 0 when read.
Bit 0 – ROM0 – ROM Address DecodeEnable
This bit is used to enable/disable the ROM address space decoding. When this bit is ‘0’,
the expansion ROM address space is disabled. When this bit is ‘1’, address decoding is
enabled using the value programmed into bits 31:16 of this register. This bit will default
to ‘0’ after power-on or reset.
4.7.1.13Interrupt Line Register
Address 3Ch READ/WRITE
The interrupt line register is used to communicate the routing of the interrupt. This
read/write register is written by the POST (Power-On Self Test) software as it initializes
the PCI devices in the system. The value in this register tells which input of the system
interrupt controller(s) the Am53C974A’s interrupt pin is connected to. Device drivers and
operating systems can use this information to determine priority and vector information.
Values in the register are system architecture specific. For example, in x86 based PCs,
the values in this register correspond to IRQ numbers (0–15) of the standard dual 8259
configuration. Values between 15 and 255 are reserved. Value 255 is defined as
“unknown” or “no connection” to the interrupt controller.
AMD
4.7.1.14Interrupt Pin Register
Address 3Dh READ ONLY
This register indicates which interrupt pin the device is using. This register is hard wired
with a value of ‘1’ because the Am53C974A only uses INTA.
4.7.1.15Min_Gnt Register
Address 3EhREAD ONLY
The Min_Gnt register is an 8-bit read only register. It is hardwired to a value of ‘04h’.
This value equals a burst period of 1 µs calculated at a 33 MHz clock rate. The register
value specifies the time in units of 1/4 microseconds. The host should use the value of
this register to determine the setting of the Am53C974A’s Latency Timer Register.
4.7.1.16Max_Lat Register
Address 3FhREAD ONLY
The Max_Lat register is an 8-bit read only register. It is hardwired to a value of ‘28h’.
This value equals a PCI bus latency of 10 µs calculated at a 33 MHz clock rate. The
register value specifies the time in units of 1/4 microseconds. The host should use
the value of this register to determine the setting of the Am53C974A’s Latency
Timer Register.
The PCI Bus Interface Unit
4-23
AMD
4.7.2Device Dependent Register Description
The Am53C974A implements 16 bytes (4 Dwords located at locations 40h, 44h, 48h,
and 4Ch) of the 192 byte device dependent registers. These 16 bytes are scratch data
registers provided for use by SCSI device drivers. Developers of SCSI device drivers for
the Am53C974A can use these register for their own needs provided that AMD’s SCSI
drivers are not used. If AMD SCSI drivers are used, these registers must not be
modified. Note that since these are scratch registers, they may be used to contain any
data. For example, AMD’s SCSI drivers for the Am53C974A uses these registers to hold
specific information concerning the state of the SCSI bus and each Target device
connected. Examples of information contained in these registers as used by AMD’s
drivers are current SCSI bus status for each device, synchronous parameters, protected/real mode driver initialization flags, etc. The next section describes how AMD’s
SCSI device drivers take advantage of these registers.
4.7.3AMD’s Scratch Register Usage
The registers located at locations 40h, 44h, 48h, and 4Ch (Table 4-1) are four 32-bit
registers (16 bytes total) which are used by AMD’s SCSI device drivers to hold information about the state of the SCSI bus and the target devices connected. Table 4-3
illustrates how AMD’s SCSI software defines and uses these registers. In Table 4-3,
seven of the eight registers are used for target devices and one is used for the host.
That is, there is one Target Configuration register for each SCSI Target and one Host
Configuration register for the host.
Table 4-3Scratch Register Definition for AMD’s PCSCSI Software
SCSI ConfigurationPCI Configuration
RegisterByteBits 15:0
041h, 40hSCSI Configuration Register 0
143h, 42hSCSI Configuration Register 1
245h, 44hSCSI Configuration Register 2
347h, 46hSCSI Configuration Register 3
449h, 48hSCSI Configuration Register 4
54Bh, 4AhSCSI Configuration Register 5
64Dh, 4ChSCSI Configuration Register 6
74Fh, 4EhSCSI Configuration Register 7
The following define the SCSI configuration registers for target devices and Host
adapters for the Am53C974A SCSI software drivers.
The Target Device Configuration Register layout is shown below. Bit placements follow
“Little Endian” ordering.
15141312111098
4-24
ReservedReservedFSCSISPD4SPD3SPD2SPD1SPD0
000XXXXX
The PCI Bus Interface Unit
AMD
76543210
SOFF3SOFF2SOFF1SOFF0STATUS2STATUS1 STATUS0PRES
XXXXXXXX
Bits 15:14 – Reserved
These 2 bits are reserved by AMD’s SCSI software driver.
Bit 13 – FSCSI – Fast SCSI Drive Present
This bit identifies the Target as a Fast SCSI drive. A value of ‘1’ indicates that a Fast
drive is present, while a ‘0’ indicates either that a drive is not present, or that the drive is
not capable of sustaining fast synchronous SCSI transfers rates of 10 Mbytes/s. This bit
will default to a value of ‘0’.
Note: This register is defined by AMD’s PCSCSI Software and does not represent a
change in the chip’s functionality.
Bits 12:8 – SPD4:0 – Synchronous Period
These bits define the synchronous period negotiated for the SCSI target device.
Bits 7–4 – SOFF3:0 – Synchronous Offset
These bits define the synchronous offset negotiated for the SCSI target device in
number of bytes. A value of ‘0’ indicates Asynchronous transfers. Valid values are from
1 to 15 (bytes).
Bits 3:1 – STATUS2:0 – SCSI Bus Status
These bits define the current state of the SCSI Target Device relating to the SCSI Bus.
Valid values for the SCSI Bus Status are as follows:
Bits 3:1SCSI Bus Status
000Data Out Phase
001Data In Phase
010Command Phase
011Status Phase
100Idle
101Active and Disconnected
110Message Out Phase
111Message In Phase
Bit 0 – PRES – Present
This bit is used to indicate that the target device is present and active. If this bit is set to
‘1’, then the target device is present on the SCSI bus and all other bits are considered
valid. If this bit is reset to ‘0’, then the target device is assumed to be not present on the
SCSI bus and all other bits must be reset to ‘0’. The exception to this case is if the
Target Present bit is reset to ‘0’ and the SCSI Bus Status bits are set to ‘1xx’ (where ‘x’
is a don’t care). In this case, the configuration register definition indicates the host
adapter target ID.
These 7 bits are reserved by AMD’s SCSI software driver.
Bit 8 – RESET – SCSI Bus Reset Has Taken Place
If this bit is set to ‘1’, it indicates that a SCSI Bus Reset has occurred. This is useful for
Protected Mode/Real Mode driver SCSI controller sharing. If device configuration
parameters, such as Mode Select information or Synchronous Negotiation, have been
issued to the SCSI devices, these parameters may no longer be valid upon the SCSI
bus reset. When this bit is set, it indicates to the non-controlling driver that a Bus Reset
has occurred and that appropriate action should be taken.
Bit 7 – SBNV – Starting BIOS Number Valid
When set to ‘1’, this bit indicates that the Starting BIOS Number (SBN2:0, Bits 6–4) is
valid. When reset to ‘0’, the Starting BIOS Number is invalid.
Bit 6:4 – SBN2:0 – Starting BIOS Number
These bits are valid if the Starting BIOS Number Valid bit (bit 7) is set to ‘1’. This value
ranges from 0 to 7 and indicates the starting BIOS unit number of the SCSI BIOS. For
example, if the value is ‘1’, this indicates that the SCSI BIOS starts controlling fixed
disks at BIOS unit ‘81h’. If the value is ‘3’, SCSI BIOS fixed disks start at BIOS unit ‘83h’
and so on.
Bit 3 – HOST – Host
This bit is set to ‘1’ to indicate that the device associated with this register is a host
device.
Bit 2 – PROTECT – Protected Mode Driver Initialized
This bit is set to ‘1’ when a Protected Mode device driver initializes the SCSI controller.
A Real Mode driver that regains control due to a mode change (i.e. Windows to DOS or
Netware 3.X to DOS, etc.) will reset this bit to ‘0’ to indicate that once the Protected
Mode driver regains control of the SCSI controller, it must re-initialize itself in order to
continue proper operation. Upon re-initialization of the SCSI controller by the Protected
Mode driver, this bit will once again be set to ‘1’.
4-26
Bit 1 – RM – Real Mode Driver Initialized
This bit is set to ‘1’ when a Real Mode device driver initializes the SCSI controller. A
Protected Mode driver that loads and initializes will reset this bit to ‘0’ to indicate that if
and when the Real Mode driver regains control of the SCSI controller, it must re-initialize
The PCI Bus Interface Unit
AMD
itself in order to operate. Upon re-initialization of the SCSI controller by the Real Mode
driver, this bit will once again be set to ‘1’.
Bit 0 – TP – Target Present Bit
This bit is set to ‘0’ and is used in conjunction with Bit 3, which is set to ‘1’, to indicate
that this configuration register defines the Host configuration.
The PCI Bus Interface Unit
4-27
AMD
4-28
The PCI Bus Interface Unit
THE FAST SCSI BLOCK
5
5.1FUNCTIONAL OVERVIEW
The functionality of the SCSI block is described in the following section. Topics to be
covered are:
Part-unique ID
SCSI FIFO Threshold
Data Transmission
REQ/ACK Control
Parity
Reset Levels
5.1.1 Part-Unique ID
The Am53C974A contains a part-unique ID code which is stored in the MSB of the
Current Transfer Count Register. The code reflects the chip’s revision level and family
code. This 8-bit code may be read when the following conditions are true.
After power up or a chip reset has occurred
Before the Current Transfer Counter ((B)+38h) is loaded
The part-unique ID code in Register ((B)+38h) will read as follows:
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
00010010
5.1.2SCSI FIFO Threshold
The threshold value for the SCSI FIFO is two bytes (one word). When this threshold is
reached, the SCSI block will indicate to the DMA engine that it is capable of receiving
or sending data bytes.
5.1.3Data Transmission
Data transmission rates will vary from system to system, depending on the number of
devices configured on the SCSI bus, as well as the transfer rates that each individual
device is capable of sustaining.
Transfer rates for the Am53C974A are controlled by the FASTSCSI and FASTCLK bits
in Control Register Three, as well as by the Extended Timing Feature in Control
Register One. The chart below shows the effects of different bit configurations on
minimum asynchronous and synchronous cycle times.
To achieve 10 MB/sec transmission rates, the following requirements must be true:
A 40 MHz clock (50% duty cycle) must be supplied to SCSICLK1.
The target must be able to sustain Fast SCSI timings
Bits 3 and 4 in Control Register Three must be set to ‘1’
The lower three bits of Register ((B)+24h), the Clock Conversion Factor Register
must be programmed to ‘000’
The lower 5 bits of the Synchronous Transfer Period Register ((B)+18h) must be set
to a value of ‘04h.’
Control Register Three contains two bits which modify the SCSI state machine to
produce both FAST and Normal SCSI timings. Synchronous data transmission rates
are dependent on the input clock frequency selected, as well as the transfer period.
The registers listed above should be programmed consistently.
Bits 4:0 in the Synchronous Transfer Period Register ((B)+18h) specify the timing
between the leading edges of consecutive REQ and ACK pulses during synchronous
transfers. For programming information, refer to the register level descriptions.
5.1.4REQ/ACK Control
The assertion and deassertion time for the REQ and ACK signals may be controlled via
the Synchronous Offset Register ((B)+1Ch). Bits 7:6 control REQ/ACK deassertion
delay, while bits 5:4 control REQ/ACK assertion delay. The deassertion for REQ/ACK
may be moved ahead 0.5 clock cycles, or it may be delayed for up to 1.5 clock cycles.
Deassertion delay options depend on the status of the FASTCLK bit in Control Register
Three. Assertion delay for REQ/ACK can vary from 0 to 1.5 clock cycles.
For programming information, refer to the register level descriptions. The following
drawings illustrate the REQ/ACK assertion/deassertion feature:
5-2
The Fast SCSI Block
FASTCLK Enabled
CLK
REQ/ACK
AMD
FASTCLK Disabled
Synch Offset Reg
Note: Care must be taken in programming this feature, as it is possible to violate
SCSI-2 timing specifications.
5.1.5Parity
Parity on the SCSI bus is such that the total number of logical ones on the data bus
including the parity bit must be odd. Parity checking features are implemented via two
bits in the Status Register and Control Register One. Parity checking can be implemented on data flowing in from the SCSI bus. Parity is always generated internally by
the Am53C974A for data moving onto the SCSI bus.
Synch Offset Reg
Binary Value:
CLK
REQ/ACK
Binary Value:
01230123
19113A-21
01230123
19113A-22
FeatureBit NameBit #Register
Parity from SCSIParity Error Reporting4Control Reg One ((B)+20h)
The Parity Error Reporting Bit (Bit 4, Control Register One) applies parity checking on
all incoming bytes from the SCSI bus. This feature is cleared to ‘0’ by a hardware reset.
When this feature is enabled, the Am53C974A will check parity on all data received
from the SCSI bus. Any detected error will be flagged by setting bit 5 in the SCSI
Status Register, and ATN will be asserted on the SCSI bus. However, no interrupt
will be generated.
When this feature is disabled (bit 4 set to ‘0’), no parity check is done on incoming bytes;
rather, the Am53C974A generates parity internally for each byte. Note that the parity on
the PCI bus is generated internally and is distinct from the parity received from the
SCSI bus.
The Fast SCSI Block
5-3
AMD
5.1.6Reset Levels
The Am53C974A has two reset pins and two reset commands that affect the SCSI
block. The PCI^RST pin resets the whole chip including the SCSI controller and the
PCI interface.
The Reset Device command causes almost the same effect on the SCSI controller that
the PCI^RST pin does. However, the Reset Device command has no effect on the PCI
interface. Also, after the Reset Device command has been issued, the user must issue a
NOP command before another command can be executed.
The Action of the PCI^RST signal or the Reset Device command is called Hard Reset.
The SCSI^RST pin is a bidirectional signal on the SCSI bus that resets a portion of the
SCSI logic when it is asserted by a device on the SCSI bus. Similarly, the Am53C974A
can assert the SCSI^RST signal to cause all of the other devices on the SCSI bus to
reset.
The Reset SCSI command causes the same effect on the SCSI controller that the
SCSI^RST pin does, except that this command also causes the SCSI^RST pin to be
asserted so that all other (external) devices on the SCSI bus are also reset. Once a
SCSI Reset command has been executed, the SCSI^RST signal will remain asserted
until a Hard Reset has occurred.
The action of the SCSI^RST signal and the Reset SCSI command is called Soft Reset.
In addition there is a third type of reset, called Disconnected Reset, that is caused by
certain sequences on the SCSI bus. These three types of reset are described in the
following sections.
5.1.6.1Hard Resets: (H)
This reset occurs at power up, when the PCI^RST pin is asserted through external
hardware, or when the Reset Device command is issued by writing 02h to the SCSI
command register at ((B)+0Ch). Hard reset causes all chip functions to halt and resets
all internal state machines. It leaves the SCSI block in the disconnected state. It leaves
all SCSI registers in their default states.
In addition, if the Hard Reset is caused by the assertion of the PCI^RST pin, the
following actions occur.
The Command register in the PCI configuration space is cleared to zero.
(No other register in the configuration space is affected.)
The DMA CCB registers are set to their default values.
5.1.6.2Soft Reset: (S)
This reset occurs either when the SCSI^RST pin on the SCSI bus is asserted or when
the Reset SCSI Bus command is issued (by writing 03h to the SCSI command register
at ((B)+0Ch). Soft reset causes the following actions to occur:
All SCSI bus signals except SCSI^RST are released.
5-4
The chip is returned to the Disconnected state.
An interrupt is generated if bit 6 in Control Register One is enabled.
The Fast SCSI Block
5.1.6.3Disconnected Reset: (D)
This reset is caused by various commands or situations which cause the Am53C974A to
disconnect from the SCSI bus. Disconnected reset occurs when any of the following
conditions occur:
Target Disconnect, Disconnect Steps, and Terminate Steps
The Am53C974A is the Initiator and the SCSI bus moves to a Bus Free state.
The Selection or Reselection command terminates due to selection timeout.
Disconnected reset causes the following actions to occur:
All SCSI signals except SCSI^RST are deasserted.
The SCSI Command Register is initialized to empty.
The IS1 and IS0 bits in the Internal State Register, ((B)+18h), are cleared to 0.
Resets bit 6:4 in the Command Register.
The table below describes chip operations and features which are affected by the
various reset levels.
Chip Operation/FeatureReset Level
Deassert all SCSI signals except SCSIRST*
*SCSIRST cleared by Hard Reset onlyHSD
Reset bits 6:4 in the Command RegisterHSD
Command register FIFO initialized to emptyHSD
Reset Internal State Bits in Registers (B)+18h and (B)+1ChHS
Clear Internal State Register bits:
Enable select (IS2 = ‘0’)HS
Clear Interrupt Status Register (B)+14hH
Release INT pinH
Deassert SCSIRST signalH
Synchronous Offset Register = ‘0’H
Synchronous Transfer Period Register = ‘5’H
Initialize SCSI FIFO to empty conditionH
Clear all Control RegistersH
Set Clock Conversion Factor = ‘2’H
AMD
H = Hard Reset
S = Soft Reset
D = Disconnected Reset
The Fast SCSI Block
5-5
AMD
5.2REGISTER DESCRIPTION
The Am53C974A SCSI registers are mapped to a double word address space as shown
in the table below. However, the actual register data occupies only the least significant
byte of the address. The register addresses are represented by the PCI Configuration
Base Address (B) and its corresponding offset value. The Base Address for the
Am53C974A is stored at register address (10h) in the PCI Configuration space.
Register
AcronymAddress (Hex.)Register DescriptionType
CTCREG(B)+00Current Transfer Count Register LowRead
STCREG(B)+00Start Transfer Count Register LowWrite
CTCREG(B)+04Current Transfer Count Register MiddleRead
STCREG(B)+04Start Transfer Count Register MiddleWrite
FFREG(B)+08SCSI FIFO RegisterRead/Write
CMDREG(B)+0CSCSI Command RegisterRead/Write
STATREG(B)+10SCSI Status RegisterRead
SDIDREG(B)+10SCSI Destination ID RegisterWrite
INSTREG(B)+14Interrupt Status RegisterRead
STIMREG(B)+14SCSI Timeout RegisterWrite
ISREG(B)+18Internal State RegisterRead
STPREG(B)+18Synchronous Transfer Period RegisterWrite
CFIREG(B)+1CCurrent FIFO/Internal State RegisterRead
SOFREG1(B)+1CSynchronous Offset RegisterWrite
CNTLREG1(B)+20Control Register OneRead/Write
CLKFREG(B)+24Clock Factor RegisterWrite
RES(B)+28ReservedWrite
CNTLREG2(B)+2CControl Register TwoRead/Write
CNTLREG3(B)+30Control Register ThreeRead/Write
CNTLREG4(B)+34Control Register FourRead/Write
CTCREG(B)+38Current Transfer Count Register High/Part-Unique ID CodeRead
STCREG(B)+38Start Current Transfer Count Register HighWrite
RES(B)+3CReservedWrite
5-6
The Fast SCSI Block
AMD
5.2.1Register Bit Map: Read
Register
AddressBit 7Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
The values shown below each bit reflect register reset values. The register shall default
to these values following a power-up or chip reset. Bit level descriptions are valid for the
LSB at each address location. Remaining bytes at each address location are ‘reserved.’
5.2.3.1Current Transfer Count Register (CTCREG)
Address [(B)+00h, (B)+04h, (B)+38h]READ ONLY
Address (B)+38h
76543210
CRVL23CRVL22CRVL21CRVL20CRLV19CRVL18CRVL17CRVL16
XXXXXXXX
Address (B)+04h
76543210
CRVL15CRVL14CRVL13CRVL12CRLV11CRVL10CRVL9CRVL8
XXXXXXXX
Address (B)+00h
76543210
AMD
CRVL7CRVL6CRVL5CRVL4CRLV3CRVL2CRVL1CRVL0
XXXXXXXX
Bit 23:0 – CRVL 23:0 – Current Value
This is a three-byte register which decrements to keep track of the number of bytes
transferred during a DMA transfer. Reading these registers returns the current value of
the counter. The counter will decrement by one for every byte and by two for every word
transferred. The transaction is complete when the count reaches zero, and bit 4 of the
SCSI Status Register ((B)+10h) is set. Should the sequence terminate early, the sum of
the values in the Current FIFO ((B)+1Ch) and the Current Transfer Count Register
reflect the number of bytes remaining.
The least significant byte is located at address ((B)+00h), the middle byte is located at
address ((B)+04h), and the most significant byte is located at address ((B)+38h).
Register ((B)+38h) extends the total width of the register from 16 to 24 bits, and is only
enabled when the Enable Features bit (bit 6) of Control Register Two is set to a value
of ‘1’.
These registers are automatically loaded with the values in the Start Transfer Count
Register every time a DMA command is issued. However, following a chip or power on
reset, up until the time register ((B)+38h) is loaded, the Am53C974A’s part-unique ID
can be obtained by reading register ((B)+38h).
The value in the Current Transfer Count Register will be decremented as follows:
Asynch Data In:active edge of ACK
Synch Data In:active edge of DACK
Data Out:active edge of DACK
The Fast SCSI Block
5-9
AMD
5.2.3.2Start Transfer Count Register (STCREG)
Address [(B)+00h, (B)+04h, (B)+38h]WRITE
Address (B)+38h
76543210
STVL23STVL22STVL21STVL20STVL19STVL18STVL17STVL16
XXXXXXXX
Address (B)+04h
76543210
STVL15STVL14STVL13STVL12STVL11STVL10STVL9STVL8
XXXXXXXX
Address (B)+00h
76543210
STVL7STVL6STVL5STVL4STVL3STVL2STVL1STVL0
XXXXXXXX
Bit 23:0 – STVL 23:0 – Start Value
This is a three-byte register which contains the number of bytes to be transferred during
a DMA operation. The value in the Start Transfer Count Register must be programmed
prior to command execution. The value programmed in this register should be the same
as the value programmed in the DMA Starting Transfer Counter ((B)+44h).
The least significant byte is located at address ((B)+00h), the middle byte is located at
address ((B)+04h), and the most significant byte is located at address ((B)+38h).
Register ((B)+38h) extends the total width of the register from 16 to 24 bits, and is only
enabled when the Enable Features bit (bit 6) of Control Register Two is set to a value of
‘1’. This sets the maximum transfer count to 16 MBytes. When a value of ‘0’ is written to
these registers, the transfer count will be set to the maximum.
These registers retain their value until overwritten, and are therefore unaffected by a
hardware or software reset. This reduces programming redundancy since it is no longer
necessary to reprogram the count for subsequent DMA transfers of the same size.
The FIFO on the Am53C974A is 16 bytes deep and is used to transfer SCSI data to and
from the Am53C974A. The FIFO may be accessed via a read or write to this register.
This is the only register that can be accessed with REQ or ACK. This register is reset to
zero by hardware or software reset or if the Clear FIFO command is issued.
Commands to the Am53C974A are issued by writing to this register which is two bytes
deep. Commands may be queued, and will be read from the bottom of the queue. At
the completion of the bottom command, the top command, if present, will drop to the
bottom of the register to begin execution. All commands are executed within six clock
cycles of dropping to the bottom of the SCSI Command Register, with the exception of
the Reset SCSI Bus, Reset Device, and DMA Stop commands. These commands are
not queued and are executed within four clock cycles of being loaded into the top this
register.
Interrupts are generated upon completion of some commands. Should back-to-back
commands generate interrupts, and the first interrupt has not been serviced, the
interrupt from the second (top) command will be stacked behind the first. The SCSI
Status Register ((B)+10h), Interrupt Register ((B)+14h), and Internal State Register
((B)+18h) will be updated to reflect the second interrupt after the microprocessor
services the first interrupt.
Reading this register will return the command currently being executed (or the last
command executed if there are no pending commands). When this register is cleared,
existing commands will be terminated and any queued commands will be ignored.
However, clearing this register does not reset the bits to ‘00h’.
AMD
Under the following conditions, the SCSI Command Register will be cleared and
maintained in a reset state (00h) until the host services the Interrupt Status Register
((B)+18h).
Illegal Command
SCSI Bus reset or disconnect
Completion of
Bus-initiated Selection or Reselection
Select command
Reselect command (if ATN is asserted)
Target disconnect or Terminate command
Selection or reselection timeout
Bad parity received in Target mode
ATN asserted in Target mode
Receiving a message while in Target mode and ATN is deasserted before completion
Not in Message In phase for the second byte of the Initiator Command
Complete Steps
Unexpected phase change during an Information Transfer or Transfer Pad Bytes
command
Bit 7 – DMA – Direct Memory Access
When set, this bit notifies the device that the command is a DMA instruction, when reset
it is a non-DMA instruction.
The Fast SCSI Block
5-11
AMD
For DMA instructions the Current Transfer Count Register (CTCREG) will be loaded
with the contents of the Start Transfer Count Register (STCREG). The data is then
transferred and the CTCREG is decremented for each byte until it reaches zero. Data
is transferred between system memory and the SCSI bus via the bus-mastering
DMA engine.
Non-DMA instructions do not modify the Transfer Count Registers ((B)+00h, (B)+04h,
and (B)+38h), since the number of bytes transferred is a function of the operation rather
than the transfer count. These type of instructions move data between the SCSI FIFO
and the SCSI bus, and requires host processor intervention to handle data transmission
between the SCSI FIFO and memory.
Bits 6:0 – CMD 6:0 – Command 6:0
These command bits decode the commands that the device needs to perform. There
are a total of 31 commands grouped into four categories. The groups are Initiator
Commands, Target Commands, Selection/Reselection Commands and General
Purpose Commands. See Section 5.3 for descriptions of these commands.
5.2.3.5SCSI Status Register (STATREG)
Address (B)+10hREAD ONLY
76543210
INTIOEPECTZGCVMSGC/DI/O
0000XXXX
This read-only register contains flags which indicate the status of the chip and the
current phase of the SCSI bus. These bits are read in conjunction with the Interrupt
Status Register ((B)+14h) to determine the reason for the interrupt. This register should
always be read prior to servicing the Interrupt Status Register (INSTREG) since bits 7:3
will be reset to ‘0’ once the Interrupt Status Register is read. If command stacking is
used, the phase bits may be latched by setting the ENF bit (Control Register Two, bit 6).
With this feature enabled, the SCSI bus phase of the last complete command (preceding the interrupt) will be latched by bits 2:0.
Bits 7:3 are reset to ‘0’ during a hardware reset.
Bit 7 – INT – Interrupt
The INT bit is set when the SCSI block detects an interrupt condition. This bit will
be cleared by a hardware or software reset. Reading the Interrupt Status Register
((B)+14h) will deassert the interrupt output and also clear this bit.
Note: SCSI interrupt conditions will also be flagged in the DMA Status Register
((B)+54h, Bit 4).
Bit 6 – IOE – Illegal Operation Error
The IOE bit is set when an illegal operation is attempted. This condition will not cause
an interrupt, and will therefore be detected by reading the Status Register ((B)+10h)
while servicing another interrupt. The following conditions will cause the IOE bit to
be set:
5-12
DMA and SCSI transfer directions are opposite.
FIFO overflows or data is overwritten.
In Initiator mode and unexpected phase change detected during synchronous data
transfer.
The Fast SCSI Block
AMD
Command Register overwritten.
This bit is cleared by reading the Interrupt Status Register ((B)+14h) or by a hard or soft
reset.
Bit 5 – PE – Parity Error
The PE bit is set if any of the parity checking options are enabled and the device detects
a parity error on bytes sent or received on the SCSI Bus. Parity options are controlled by
bit 4 in Control Register One ((B)+20h), and by bit 2 in Control Register Two ((B)+2Ch).
Detection of a parity error condition will not cause an interrupt but will be reported with
other interrupt causing conditions.
This bit will be cleared by reading the Interrupt Status Register ((B)+14h) or by a hard or
soft reset.
Bit 4 – CTZ – Count To Zero
The CTZ bit is set when the Current Transfer Count Register ((B)+00h, (B)+04h,
(B)+38h) has decremented to zero. This bit is reset when the Current Transfer Count
Register is re-loaded. Reading the Interrupt Status Register ((B)+14h) will not affect this
bit. This bit will however be cleared by a hard or soft reset.
Note: A non-DMA NOP will not reset the CTZ bit since it does not load the Current
Transfer Count Register. However, a DMA NOP will reset this bit since it loads the Current Transfer Count Register.
Bit 3 – GCV – Group Code Valid
The GCV bit is set if the group code field in the Command Descriptor Block (CDB) is one
that is defined by the ANSI Committee in their document X3.131 – 1986. If the SCSI-2
Features Enable (S2FE) bit in the Control Register 2 ((B)+2Ch) is set, Group 2 commands will be treated as 10-byte commands and the GCV bit will be set. If S2FE is reset
then Group 2 commands will be treated as reserved commands. Group 3 and 4
commands will always be considered reserved commands. The device will treat all
reserved commands as 6-byte commands. Group 6 commands will always be treated as
vendor unique 6-byte commands and Group 7 commands will always be treated as
vendor unique 10-byte commands.
The GCV bit is cleared by reading the Interrupt Status Register (INSTREG at (B)+14h)
or by a hard or soft reset.
Bit 2 – MSG – Message
Bit 1 – C/D – Command/Data
Bit 0 – I/O – Input/Output
The MSG, C/D and I/O bits together are referred to as the SCSI Phase bits. They
indicate the phase of the SCSI bus. These bits may be latched or unlatched depending
on whether or not the ENF bit in Control Register Two is set. In the latched mode the
SCSI phase bits are latched at the end of a command and the latch is opened when the
Interrupt Status Register ((B)+14h) is read. In the unlatched mode, they indicate the
real-time phase of the SCSI bus.
The Fast SCSI Block
5-13
AMD
Bit 2Bit 1Bit 0
MSGC/DI/OSCSI Phase
111Message In
110Message Out
101Reserved
100Reserved
011Status
010Command
001Data In
000Data Out
5.2.3.6SCSI Destination ID Register (SDIDREG)
Address (B)+10h WRITE
The DID 2:0 bits are the encoded SCSI ID of the device on the SCSI bus which needs to
be selected or reselected. At power-up the state of these bits is undefined. The DID 2:0
bits are not affected by reset.
DID2DID1DID0SCSI ID
1117
1106
1015
1004
0113
0102
0011
0000
5.2.3.7 Interrupt Status Register (INSTREG)
Address (B)+14h READ ONLY
76543210
SRSTICMDDISSRSORESELSELASEL
000000XX
The Interrupt Status Register (INSTREG) indicates the reason for the interrupt. This
register is used with the SCSI Status Register ((B)+10h) and Internal State Register
((B)+18h) to determine the reason for the interrupt. Reading the Interrupt Status
Register will clear all three registers. Therefore the SCSI Status Register ((B)+10h) and
Internal State Register ((B)+18h) should be examined prior to reading this register.
5-14
This register should only be read when an interrupt is pending. All bits will be cleared to
‘0’ by a hardware reset.
The Fast SCSI Block
AMD
Bit 7 – SRST – SCSI Reset
The SRST bit will be set if a SCSI Reset is detected and SCSI reset reporting is enabled
via the DISR (bit 6) of Control Register One ((B)+20h).
Bit 6 – ICMD – Invalid Command
The ICMD bit will be set if the device detects an illegal command code. This bit is also
set if a command code is detected from a mode that is different from the mode the
device is currently in. Once set, an invalid command interrupt will be generated.
Bit 5 – DIS – Disconnected
The DIS bit can be set in the Target or the Initiator mode when the device disconnects
from the SCSI bus. In the Target mode this bit will be set if a Terminate or a Command
Complete steps causes the device to disconnect from the SCSI bus. In the Initiator
mode this bit will be set if the Target disconnects; while in Idle mode, this bit will be set if
a Selection or Reselection timeout occurs.
Bit 4 – SR – Service Request
The SR bit can be set in the Target or the Initiator mode when another device on the
SCSI bus has a service request. In the Target mode, this bit will be set when the Initiator
asserts the ATN signal. In the Initiator mode, this bit is set when a Command Steps
Successfully Completed Command is issued.
Bit 3 – SO – Successful Operation
The SO bit can be set in the Target or the Initiator mode when an operation has
successfully completed. In the Target mode this bit will be set when any Target or Idle
state command is completed. In the Initiator mode this bit is set after a Target has been
successfully selected, after a command has successfully completed and after an
information transfer command when the Target requests a Message In phase.
Bit 2 – RESEL – Reselected
The RESEL bit is set at the end of the Reselection phase indicating that the device has
been reselected as an Initiator.
Bit 1 – SELA – Selected with Attention
The SELA bit is set at the end of the selection phase indicating that the device has been
selected as a Target by the Initiator and that the ATN signal was active during Selection.
Bit 0 – SEL – Selected
The SEL bit is set at the end of the selection phase indicating that the device has been
selected as a Target by the Initiator and that the ATN signal was inactive during
Selection.
This register determines how long the Initiator will wait for a response to a Selection
before timing out. It should be set to yield 250 ms to comply with ANSI standards for
The Fast SCSI Block
5-15
AMD
SCSI. The maximum time out period may be calculated using the following formulas.
A hardware reset will clear this register.
Bit 7:0 – STIM 7:0 – SCSI Timer
The value loaded in STIM 7:0 can be calculated as shown below:
STIM 7:0 = (250 x 10–3) X (40 x 106) / (8192 (8)) = 152.59 decimal
The decimal value of 152.59 must be rounded up to 153 (the next integer value), and
its hexadecimal value of ‘99h’ should be written to this register.
5.2.3.9Internal State Register (ISREG)
Address (B)+18h READ ONLY
76543210
6
Hz.
–3
s.
ReservedReservedReservedReservedSOFIS2IS1IS0
XXXX0000
The lower four bits of this register track the progress of a sequence-type command. It is
updated after each successful completion of an intermediate operation. If an error
occurs, the host can read this register to determine the point where the command failed
and take the necessary procedure for recovery. Reading the Interrupt Status Register
((B)+14h) while an interrupt is pending will clear this register. A hard or soft reset will
also clear this register.
Bit 7:4 – Reserved
Bit 3 – SOF – Synchronous Offset Flag
The SOF is reset when the Synchronous Offset Register ((B)+1Ch) has reached its
maximum value of 15.
Note: The SOF bit is active LOW.
Bit 2:0 – IS 2:0 – Internal State
The IS 2:0 bits along with the Interrupt Status Register ((B)+14h) indicate the completion
status of certain device commands. Certain commands cause the contents of the 3-bit
Internal State register to be changed at several steps in the execution process. The
value left in this register when the command terminates along with the contents of the
Interrupt Status register indicate how far the execution had proceeded prior to the
command termination. The following status decode tables show how to interpret the
Internal State register after these commands have terminated.
to premature phase change; some CDB bytes
may not have been sent; check FIFO flags
218One, two, or three message bytes sent;
sequence halted because Target failed to assert
command phase after third message byte or
prematurely released message out phase; ATN
released only if third message byte was sent
018Arbitration and selection completed; sequence
halted because Target did not assert message
out phase; ATN still driven by the Am53C974A
halted because Target did not assert message
out phase; ATN still driven by the Am53C974A
118Message out completed; one message byte
sent; ATN on
Target Selected without ATN Steps
Internal StateInterrupt Status
Register ((B)+18h)Register ((B)+14h)Explanation
Bits 2:0 (Hex)Bits 7:0 (Hex)
211Selected; received entire CDB; check group
code valid bit; Initiator asserted ATN in
command phase
111Sequence halted in command phase due to
parity error; some CDB bytes may not have been
received; check FIFO flags; Initiator asserted
ATN in command phase
201Selected; received entire CDB; check group
code valid bit
101Sequence halted in command phase because of
parity error; some CDB bytes may not have been
received; check FIFO flags
001Selected; loaded bus ID into FIFO; null-byte
message loaded into FIFO
Target Select with ATN Steps, SCSI-2 Bit NOT SET
Internal StateInterrupt Status
Register ((B)+18h)Register ((B)+14h)Explanation
Bits 2:0 (Hex)Bits 7:0 (Hex)
212Selection complete; received one message byte
and entire CDB; Initiator asserted ATN during
command phase
112Halted in command phase; parity error and
ATN true
012Selected with ATN; stored bus ID and one
message byte; sequence halted because
ATN remained true after first message byte
202Selection completed; received one message
byte and the entire CDB
102Sequence halted in command phase because of
parity error; some CDB bytes not received;
check group code valid bit and FIFO flags
002Selected with ATN; stored bus ID and one
message byte; sequence halted because of
parity error or invalid ID message
5-18
The Fast SCSI Block
Status Decode (continued):
Target Select with ATN Steps, SCSI-2 Bit SET
Internal StateInterrupt Status
Register ((B)+18h)Register ((B)+14h)Explanation
Bits 2:0 (Hex)Bits 7:0 (Hex)
612Selection completed; received three message
bytes and entire CDB. ATN is true
512Halted in command phase; parity error and
ATN true
412ATN remained true after third message byte
212Selection completed; Initiator deasserts ATN
after receipt of one message byte; entire
CDB received. ATN asserted during
command phase
112Sequence halted during command phase;
Initiator deasserts ATN after receipt of one
message byte; parity error and ATN true
012Selected with ATN; stored bus ID and one
message byte; sequence halted because of
parity error or invalid ID message; ATN is true
602Selection completed; received three message
bytes and the entire CDB
502Received three message bytes then halted in
command phase because of parity error; some
CDB bytes not received; check group code valid
bit and FIFO flags
402Parity error during second or third message byte
202Selection completed; Initiator deasserts ATN
after receipt of one message byte; entire CDB
received
102Sequence halted during command phase
because of parity error; Initiator deasserts ATN
after receipt of one message byte; some bytes of
CDB not received; check FIFO flags and group
code valid bit
002Selected with ATN; stored bus ID and one
message byte; sequence halted because of
parity error or invalid ID message
Target Receive Command Steps
Internal StateInterrupt Status
Register ((B)+18h)Register ((B)+14h)Explanation
Bits 2:0 (Hex)Bits 7:0 (Hex)
218Received entire CDB; Initiator asserted ATN
118Sequence halted during command transfer due
to parity error; ATN asserted by Initiator
208Received entire CDB
108Sequence halted during command transfer due
to parity error; check FIFO flags
AMD
The Fast SCSI Block
5-19
AMD
Status Decode (continued):
Target Disconnect Steps
Internal StateInterrupt Status
Register ((B)+18h)Register ((B)+14h)Explanation
Bits 2:0 (Hex)Bits 7:0 (Hex)
228Disconnect steps fully executed; disconnected;
bus is free
118Two message bytes sent; sequence halted
because Initiator asserted ATN
018One message byte sent; sequence halted
because Initiator asserted ATN
Target Terminate Steps
Internal StateInterrupt Status
Register ((B)+18h)Register ((B)+14h)Explanation
Bits 2:0 (Hex)Bits 7:0 (Hex)
228Terminate steps fully executed; disconnected;
bus is free
118Status and message bytes sent; sequence
halted because Initiator asserted ATN
018Status byte sent; sequence halted because
Initiator asserted ATN
Target Command Complete Steps
Internal StateInterrupt Status
Register ((B)+18h)Register ((B)+14h)Explanation
Bits 2:0 (Hex)Bits 7:0 (Hex)
018Status byte sent; sequence halted because
Initiator set ATN
208Command complete steps fully executed
5.2.3.10Synchronous Transfer Period Register (STPREG)
Address (B)+18h WRITE
76543210
ReservedReservedReservedSTP4STP3STP2STP1STP0
XXX00101
The Synchronous Transfer Period Register (STPREG) contains a 5-bit value indicating
the number of clock cycles each byte will take to be transferred over the SCSI bus in
synchronous mode. The STPREG defaults to 5 clocks/byte after a hard or soft reset.
Bits 7:5 – Reserved
Bits 4:0 – STP 4:0 – Synchronous Transfer Period
The STP 4:0 bits are programmed to specify the synchronous transfer period or the
number of clock cycles for each byte transferred in the synchronous mode. The
minimum value for STP 4:0 is 4 clocks/byte.
5-20
The Fast SCSI Block
AMD
The following tables list Synchronous Transfer Period options for both Fast and Normal
SCSI modes. Table entries follow the binary code, and may be extrapolated if necessary. The synchronous transfer requirements as defined by the ANSI specification are
listed for each instance.
SetupHoldAssert/Negate
Normal synchronous 55 ns100 ns90 ns
Fast Synchronous25 ns35 ns30 ns
5.2.3.11Current FIFO/Internal State Register (CFISREG)
Address (B)+1Ch READ ONLY
76543210
IS2IS1IS0CF4CF3CF2CF1CF0
00000000
This register has two fields, the Current FIFO field and the Internal State field.
Bits 7:5 – IS 2:0 – Internal State
The Internal State Register (ISREG) tracks the progress of a sequence-type command.
These bits IS 2:0 are duplicated from the IS 2:0 field in the Internal State Register
((B)+18h).
Bits 4:0 – CF 4:0 – Current FIFO
The CF 4:0 bits are the binary coded value of the number of bytes in the SCSI FIFO.
These bits should not be read when the device is transferring data since this count may
not be stable. The maximum value read from this register is 10h or 16 decimal due to
the size of the SCSI FIFO.
When the Am53C974A is the Initiator and the phase changes to Synchronous Data In
from either Message Out or Command Phase, CF4:0 will latch the number of message
or command bytes that were not transmitted to the SCSI Bus. This value will be held
until the next command begins. All bytes in the SCSI FIFO will be flushed, and only
incoming data bytes will be retained.
The Synchronous Offset Register (SOFREG) controls REQ/ACK deassertion/assertion
delay and stores a 4-bit count of the number of bytes that can be sent to (or received
from) the SCSI bus during synchronous transfers without a REQ (or ACK). Bytes
exceeding the threshold will be sent one byte at a time (asynchronously). That is, each
byte will require an REQ/ACK handshake. To set up an asynchronous transfer, the
SOFREG is set to zero. The SOFREG is set to zero after a hard or soft reset.
Bits 7:6 – RAD 1:0 –
REQ/ACK
Deassertion
These bits may be programmed to control the deassertion delay of the REQ and ACK
signals during synchronous transfers. Deassertion delay is expressed in input clock
cycles, and depends on the implementation of FASTCLK.
(See Control Register Three, bit 3)
These bits may be programmed to control the assertion delay of the REQ and ACK
signals during synchronous transfers. Unlike deassertion delay, assertion delay is
independent of the FASTCLK setting.
Note: Exercise caution when programming bits 7:4 in the Synchronous Offset Register
as it is possible to violate the SCSI-2 timing specifications.
Bits 3:0 – SO 3:0 – Synchronous Offset 3:0
The SO 3:0 bits are the binary coded value of the number of bytes that can be sent to
(or received from) the SCSI bus without an ACK (or REQ) signal. A zero value designates Asynchronous transfers, while a non-zero value designates the byte offset for
synchronous transfers. The Am53C974A supports a maximum synchronous offset of
15 bytes.
The Fast SCSI Block
5-23
AMD
5.2.3.13Control Register One (CNTLREG1)
Address (B)+20h READ/WRITE
76543210
ETMDISRReservedPEREReservedSID2SID1SID0
00000XXX
The Control Register One (CNTLREG1) programs the operating parameters for the
Am53C974A.
Bit 7 – ETM – Extended Timing Mode
Enabling this feature will increase the minimum setup time for data being transmitted on
the SCSI bus. This bit should only be set if the external cabling conditions produce SCSI
timing violations. FASTCLK operation is unaffected by this feature.
Bit 6 – DISR – Disable Interrupt on SCSI Reset
The DISR bit masks the reporting of the SCSI reset. When the DISR bit is set and a
SCSI reset is asserted, the device will disconnect from the SCSI bus and remain idle
without interrupting the host processor. When the DISR bit is reset and a SCSI reset is
asserted the device will respond by interrupting the host processor. The DISR bit is
reset to zero by a hard or soft reset.
Bit 5 – Reserved
This bit is reserved and must always be programmed to ‘0’.
Bit 4 – PERE – Parity Error Reporting Enable
The PERE bit enables the checking and reporting of parity errors on incoming SCSI
bytes during the information transfer phase. When the PERE bit set and bad parity is
detected, the PE bit in the SCSI Status Register will be set but an interrupt will not be
generated. In the Initiator mode the ATN signal will also be asserted on the SCSI bus.
When the PERE bit is reset and bad parity occurs, the error is not detected and no
action is taken.
Bit 3 – Reserved
This bit is reserved and must always be programmed to ‘0’.
Bit 2:0 – SID 2:0 – SCSI ID 2:0
The Chip ID 2:0 bits specify the binary coded value of the device ID on the SCSI bus.
The device will arbitrate with this ID and will respond to Reselection with this ID. At
power-up the state of these bits are undefined. These bits are not affected by hard
or soft reset.
The Clock Factor Register (CLKFREG) must be set to indicate the input frequency
range of the device. This value is crucial for controlling various timings to meet the SCSI
specification. The value of bits CLKF 2:0 can be calculated by rounding off the quotient
of (Input Clock Frequency in MHz)/(5 MHz). The device has a frequency range of 10 to
40 MHz.
Bits 7:3 – Reserved
These bits are reserved and must always be programmed to ‘0’.
Bits 2:0 – CLKF 2:0 – Clock Factor 2:0
The CLKF 2:0 bits specify the binary coded value of the clock factor. The CLKF 2:0 bits
will default to a value of 2 by a hard or soft reset. These bits encode the decimal value
to be used in calculating the SCSI Timeout Register value.
CLKF2CLKF1CLKF0Input Clk Freq (MHz)
01010
01110.01 to 15
10015.01 to 20
10120.01 to 25
11025.01 to 30
11130.01 to 35
00035.01 to 40
AMD
Note: CLKF2:0 must be set to ’000’ (binary) and a 40 MHz clock must be used to gen-
erate the CLK signal in order to achieve 10 MB/sec synchronous transfer rates. For this
case, a value of 8 should be used to calculate the SCSI Timeout Register value. See the
SCSI Timeout Register.
Control Register Two (CNTLREG2) programs various operating parameters for the
Am53C974A.
Bit 7 – Reserved
This bit is reserved and must always be programmed to ‘0’.
Bit 6 – ENF – Enable Features
When set to a value of ‘1’, this bit activates the following product enhancements:
1) The Current Transfer Count Register High ((B)+38h) will be enabled, extending the
transfer counter from 16 to 24 bits to allow for larger transfers.
2) Following a chip or power on reset, up until the point where the Current Transfer
Count Register High ((B)+38h) is loaded with a value, reading this register will return
the Am53C974A’s part-unique ID.
3) The SCSI phase will be latched at the completion of each command by bits 2:0 in the
SCSI Status Register ((B)+10h). When this bit is ‘0’, the SCSI Status Register will reflect real-time SCSI phases.
A software or hardware reset will clear this bit to its default value of ‘0’; a SCSI reset will
leave this bit unaffected.
Bit 5:4 – Reserved (Read Only)
This bit is reserved and will always return a value of ‘0’ when read.
Bit 3 – S2FE – SCSI–2 Features Enable
The S2FE bit allows the device to recognize two SCSI-2 features: the extended
message feature and the Group 2 command recognition. (These features can also be
controlled independently by bits 6:5 in CNTLREG3).
Extended Message Feature: When the S2FE bit is set and the device is selected with
attention, the device will monitor the ATN signal at the end of the first message byte. If
the ATN signal is active, the device will request two more message bytes before
switching to the command phase. If the ATN signal is inactive the device will switch to
the Command phase. When the S2FE bit is reset as a Target the device will request a
single message byte.
Group 2 Command Recognition: When the S2FE bit is set, Group 2 commands are
recognized as 10-byte commands. When the S2FE bit is reset, the device will interpret
Group 2 commands as reserved commands. Thus the Am53C974A will only request
6-byte commands when the S2FE bit is reset.
Bit 2:0 – Reserved
These bits are reserved and must always be programmed to ‘0’.
5-26
The Fast SCSI Block
5.2.3.17Control Register Three (CNTLREG3)
Address (B)+30h READ/WRITE
This bit enables additional check on ID message during bus-initiated Select with ATN.
The Am53C974A will check bits 7, and bits 5:3 in the first byte of the ID message during
Selection. An interrupt will be generated if bit 7 is ‘0’, or if bits 5, 4, or 3 are ‘1’.
Bit 6 – QTAG – QTAG Control
This bit controls the Queue Tag feature in the Am53C974A. When enabled, the
Am53C974A is capable of receiving 3-byte messages during bus-initiated Select/
Reselect with ATN. The 3-byte message consists of one byte Identify Message and two
bytes of Queue Tag message. The Am53C974A will check the second byte for values of
20h, 21h, and 22h. If this condition is not satisfied, the sequence halts and the
Am53C974A generates an interrupt.
When the QTAG feature is not enabled, the Am53C974A halts the Selected with ATN
sequence following the receipt of one ID message byte if ATN is still true.
AMD
Bit 3, Control Register Two also enables this feature.
Bit 5 – G2CB – Group 2 Command Block
When this bit is set, the Am53C974A is capable of recognizing 10-byte Group 2
Commands as valid CDBs (Command Descriptor Blocks). (This feature is also controlled by bit 3 of CNTLREG2). When this feature is enabled, the Target receives 10
bytes of Group 2 commands, and sets the group code valid bit (bit 3) in the Status
Register (STATREG). When this feature is disabled, the Target receives only 6 bytes of
command code, and does not set bit 3 in the Status Register ((B)+10h).
This bit may be programmed in conjunction with bit 6 (described above) to send 1 or 3
byte messages with 6 or 10 byte CDBs. The following table illustrates the transmission
options:
CNTLREG3CNTLREG3CNTLREG2
Bit 6Bit 5Bit 3Enabled Features
QTAGG2CBS2FE
XX110-byte CDB,
3-byte message
1003-byte message
01010-byte CDB
11010-byte CDB,
3-byte message
000Features disabled
X is don’t care
The Fast SCSI Block
5-27
AMD
Bit 4 – FASTSCSI – Fast SCSI
Bit 3 – FASTCLK – Fast SCSI Clocking
These bits configure the Am53C974A’s state machine to support both Fast SCSI timings
and SCSI-1 timings. These bits affect the SCSI transfer rate, and must be considered in
conjunction with the Am53C974A’s clock frequency and mode of operation.
CNTLREG3
FASTSCSIFASTCLKClock
Bit 4Bit 3FrequencyMode of Operation
1125 MHz – 40 MHz10 MBytes/sec, Fast SCSI
0125 MHz – 40 MHz5 MBytes/sec, SCSI-1
––0<=25 MHz5 MBytes/sec, SCSI-1
–– = don’t care
Bit 2 – Reserved
This bit is reserved and must always be programmed to ‘0’.
Bit 1 – Reserved (Read Only)
This bit is reserved and will always return a value of ‘0’ when read.
Bit 0 – Reserved
This bit is reserved and must always be programmed to ‘0’.
5.2.3.18Control Register Four (CNTLREG4)
Address (B)+34h READ/WRITE
76543210
GE1GE0PWDReservedRES (R)RADEReserved Reserved
00000000
This register is used to control several features implemented in the SCSI block.
At power up, this register will contain a ‘0’ value on all bits except bit 4.
Bit 7:6 – GE1:0 – GLITCH EATER
The GLITCH EATER Circuitry has been implemented on REQ and ACK lines and are
controlled by bits 7and 6. The valid signal window may be adjusted by setting the bits
according to the combinations listed below.
CNTLREG4
Bit 7Bit 6Valid Signal
GE1GE0Window
0012 ns
1025 ns
0135 ns
110 ns
RAE (W)
5-28
Note: Changes in the valid signal window will affect data setup and hold times for Fast
SCSI timings.
The Fast SCSI Block
AMD
Bit 5 – PWD – Reduced Power Feature
Setting this bit to ‘1’ enables AMD’s reduced power feature. This feature turns off the
input buffers on all the SCSI bus signal lines to reduce power consumption. For further
power savings, the clock input may be removed using bit 21 in the SBAC register
((B)+ 70h).
Bit 4 – Reserved
This bit is reserved for internal use.
Bit 3 (Read Only) – RES – Reserved
This bit is reserved for internal use.
Bit 3 (Write Only) – RAE – Active Negation Control
Bit 2 – RADE – Active Negation Control
Bits 2 and 3 control the Active Negation Drivers which may be enabled on REQ, ACK, or
DATA lines. The following table shows the programming options for this feature:
CNTLREG4
Bit 3Bit 2
RAERADEFunction Selected
00Active Negation Disabled
10Active Negation on REQ and ACK only
These bits are reserved and must always be programmed to ‘00h’.
5.2.3.20Part-Unique ID Register (CTCREG)
Address (B)+38h READ ONLY
This register extends the transfer counter from 16 to 24 bits and is only enabled when
the ENF bit is set (bit 6, Control Register Two). The descriptions accompanying the Start
Transfer Count Registers and the Current Transfer Count Registers should be referenced for more information regarding the transfer counter.
This register is also used to store the part-unique ID code for the Am53C974A. This
information may be accessed when all of the following are true:
A power up or chip reset has taken place
A value has not been loaded into this register
The ID value in this register is 12h.
The Fast SCSI Block
5-29
AMD
5.3DEVICE COMMANDS
The device commands can be broadly divided into two categories, DMA commands and
non-DMA commands. DMA commands are those which cause data movement between
the host memory and the SCSI bus while non-DMA commands are those that cause
data movement between the SCSI FIFO and the SCSI bus. The Most Significant Bit of
the command byte differentiate the DMA from the non-DMA commands.
When a DMA command is issued, the contents of the Start Transfer Count Register will
be loaded into the Current Transfer Count Register. Data transmission will continue until
the Current Transfer Count Register decrements to zero.
Before a DMA device command is issued, the software must initialize the DMA Starting
Transfer Count and Starting Physical Address registers. Then it must issue a DMA Start
command. Once this is done, it can issue the device command.
Non-DMA commands do not modify the Current Transfer Count Register and are
unaffected by the value in the Current Transfer Count Register. For non-DMA commands, the number of bytes transmitted depends solely on the operation in progress.
Some of the non-DMA commands are output commands that transfer data from the
SCSI FIFO to the SCSI bus. Before these commands are executed, the SCSI FIFO must
be loaded with the bytes to be sent. Other non-DMA commands are input commands
that transfer data from the SCSI bus to the SCSI FIFO. After these commands are
executed, the data received can be accessed by reading one byte at a time from the
SCSI FIFO.
5-30
The Fast SCSI Block
AMD
Code
(Hex.)
Command
NonDMA
Mode
DMA
Mode
Initiator Commands
Information Transfer1090
Initiator Command Complete Steps1191
Message Accepted12–
Transfer Pad Bytes1898
Set ATN*1A–
Reset ATN*1B–
Target Commands
Send Message20A0
Send Status21A1
Send Data22A2
Disconnect Steps23A3
Terminate Steps24A4
Target Command Complete Steps25A5
Disconnect27–
Receive Message Steps28A8
Receive Commands29A9
Receive Data2AAA
Receive Command Steps2BAB
DMA Stop04–
Access FIFO–85
Idle State Commands
Reselect Steps40C0
Select without ATN Steps41C1
Select with ATN Steps42C2
Select with ATN and Stop Steps43C3
Enable Selection/Reselection*44C4
Disable Selection/Reselection45–
Select with ATN3 Steps46C6
Reselect with ATN3 Steps47C7
General Commands
No Operation*0080
Clear FIFO*0181
Reset Device*0282
Reset SCSI Bus**0383
* These commands do not generate interrupt.
** An interrupt is generated when SCSI bus reset interrupt reporting is not disabled (see Control Register1/DISR bit 6).
The Fast SCSI Block
5-31
AMD
5.3.1Command Stacking
The microprocessor may stack commands in the Command Register ((B)+0Ch) since it
functions as a two-byte deep FIFO. Non-DMA commands may not be stacked, and
commands which transfer data in opposing directions should not be stacked together.
If DMA commands are queued together, the Start Transfer Count must be written before
the associated command is loaded into the Command Register. Since multiple interrupts
can occur when commands are stacked, it is recommended that the ENF bit in Control
Register Two (Bit 6) be set in order to latch the SCSI phase bits in the SCSI Status
Register ((B)+10h) at the completion of a command. This allows the host to determine
the phase of the interrupting command without having to consider phase changes that
occurred after the stacked command began execution.
Note: Command stacking and queuing should only be used during SCSI Data In or Data
Out transfers.
5.3.2Invalid Commands
When an illegal command is written to the Am53C974A, the Invalid Command Bit (Bit 6,
Register (B)+14h) will be set to ‘1’, and an interrupt will be generated to the host. When
this happens, the interrupt must be serviced before another command may be written to
the Command Register.
An Invalid command is defined as a command written to the Am53C974A that is either
not supported, not allowed in the specified mode, or a command that has an unsupported command mode.
The following conditions will also cause an Invalid Command interrupt to occur:
An Initiator Information Transfer, Transfer Pad, or Command Complete is issued
when ACK is still asserted.
A Selection or Reselection command is issued with the DMA bit enabled, if the
Selection/Reselection command was previously issued with the DMA enabled.
5.3.3Command Window
The window at the point where the Disable Selection/Reselection command (45H/C5H)
has been loaded into the Command Register ((B)+0Ch), and before bus-initiated
Selection or Reselection begins, has been eliminated. This prevents a false Successful
Operation Interrupt from being generated when the Selection/Reselection sequence
continues to completion after the Disable command has been loaded.
5.3.4Initiator Commands
Initiator commands are executed by the device when it is in the Initiator mode. If the
device is not in the Initiator mode and an Initiator command is received the device will
ignore the command, generate an Invalid Command interrupt and clear the Command
Register.
Should the Target disconnect from the SCSI bus by deasserting the BSY signal line
while the Am53C974A (Initiator) is waiting for the Target to assert REQ, a Disconnected
Interrupt will be issued 1.5 to 3.5 clock cycles following BSY going false.
5-32
Upon receipt of the last byte during Message In phase, ACK will remain asserted to
prevent the Target from issuing any additional bytes, while the Initiator decides to
accept/reject the message. If non-DMA commands are used, the last byte signals the
SCSI FIFO is empty. If DMA commands are used, the Current Transfer Count signals
the last byte.
The Fast SCSI Block
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.