For further support information, refer to the Technical Support and Professional Services appendix. To comment
on the documentation, send email to techpubs@ni.com.
The TNT5002 is warranted against defects in materials and workmanship for a period of one year from the date of shipment, as evidenced by
receipts or other documentation. National Instruments will, at its option, repair or replace equipment that proves to be defective during the
warranty period. This warranty includes parts and labor.
The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects
in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National
Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives
notice of such defects during the warranty period. National Instruments does not warrant that the operation of the software shall be
uninterrupted or error free.
A Return Material Authorization (RMA) number must be obtained from the factory and clearly marked on the outside of the package before
any equipment will be accepted for warranty work. National Instruments will pay the shipping costs of returning to the owner parts which are
covered by warranty.
National Instruments believes that the information in this document is accurate. The document has been carefully reviewed for technical
accuracy. In the event that technical or typographical errors exist, National Instruments reserves the right to make changes to subsequent
editions of this document without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected.
In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it.
XCEPTASSPECIFIEDHEREIN, NATIONAL INSTRUMENTSMAKESNOWARRANTIES, EXPRESSORIMPLIED, ANDSPECIFICALLYDISCLAIMSANYWARRANTYOF
E
MERCHANTABILITYORFITNESSFORAPARTICULARPURPOSE . CUSTOMER’SRIGHTTORECOVERDAMAGESCAUSEDBYFAULTORNEGLIGENCEONTHEPART OF
N
ATIONAL INSTRUMENTSSHALLBELIMITEDTOTHEAMOUNTTHERETOFOREPAIDBYTHECUSTOMER. NATIONAL INSTRUMENTSWILLNOTBELIABLEFOR
DAMAGESRESULTINGFROMLOSSOFDATA, PROFITS, USEOFPRODUCTS, ORINCIDENTALORCONSEQUENTIALDAMAGES, EVENIFADVISEDOFTHEPOSS IBILITY
THEREOF. This limitation of the liability of National Instruments will apply regardless of the form of action, whether in contract or tort, including
negligence. Any action against National Instruments must be brought within one year after the cause of action accrues. National Instruments
shall not be liable for any delay in performance due to causes beyond its reasonable control. The warranty provided herein does not cover
damages, defects, malfunctions, or service failures caused by owner’s failure to follow the National Instruments installation, operation, or
maintenance instructions; owner’s modification of the product; owner’s abuse, misuse, or negligent acts; and power failure or surges, fire,
flood, accident, actions of third parties, or other events outside reasonable control.
Copyright
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying,
recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National
Instruments Corporation.
Trademarks
HS488™, National Instruments™, NI™, ni.com™, NI-488.2™, NI-488DDK™, TNT4882™, TNT488C™, and TNT5002™ are trademarks of
National Instruments Corporation.
Product and company names mentioned herein are trademarks or trade names of their respective companies.
Patents
For patents covering National Instruments products, refer to the appropriate location: Help»Patents in your software, the patents.txt file
on your CD, or
ni.com/patents.
WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS
(1) NATIONAL INSTRUMENTS PRODUCTS ARE NOT DESIGNED WITH COMPONENTS AND TESTING FOR A LEVEL OF
RELIABILITY SUITABLE FOR USE IN OR IN CONNECTION WITH SURGICAL IMPLANTS OR AS CRITICAL COMPONENTS IN
ANY LIFE SUPPORT SYSTEMS WHOSE FAILURE TO PERFORM CAN REASONABLY BE EXPECTED TO CAUSE SIGNIFICANT
INJURY TO A HUMAN.
(2) IN ANY APPLICATION, INCLUDING THE ABOVE, RELIABILITY OF OPERATION OF THE SOFTWARE PRODUCTS CAN BE
IMPAIRED BY ADVERSE FACTORS, INCLUDING BUT NOT LIMITED TO FLUCTUATIONS IN ELECTRICAL POWER SUPPLY,
COMPUTER HARDWARE MALFUNCTIONS, COMPUTER OPERATING SYSTEM SOFTWARE FITNESS, FITNESS OF COMPILERS
AND DEVELOPMENT SOFTWARE USED TO DEVELOP AN APPLICATION, INSTALLATION ERRORS, SOFTWARE AND
HARDWARE COMPATIBILITY PROBLEMS, MALFUNCTIONS OR FAILURES OF ELECTRONIC MONITORING OR CONTROL
DEVICES, TRANSIENT FAILURES OF ELECTRONIC SYSTEMS (HARDWARE AND/OR SOFTWARE), UNANTICIPATED USES OR
MISUSES, OR ERRORS ON THE PART OF THE USER OR APPLICATIONS DESIGNER (ADVERSE FACTORS SUCH AS THESE ARE
HEREAFTER COLLECTIVELY TERMED “SYSTEM FAILURES”). ANY APPLICATION WHERE A SYSTEM FAILURE WOULD
CREATE A RISK OF HARM TO PROPERTY OR PERSONS (INCLUDING THE RISK OF BODILY INJURY AND DEATH) SHOULD
NOT BE RELIANT SOLELY UPON ONE FORM OF ELECTRONIC SYSTEM DUE TO THE RISK OF SYSTEM FAILURE. TO AVOID
DAMAGE, INJURY, OR DEATH, THE USER OR APPLICATION DESIGNER MUST TAKE REASONABLY PRUDENT STEPS TO
PROTECT AGAINST SYSTEM FAILURES, INCLUDING BUT NOT LIMITED TO BACK-UP OR SHUT DOWN MECHANISMS.
BECAUSE EACH END-USER SYSTEM IS CUSTOMIZED AND DIFFERS FROM NATIONAL INSTRUMENTS' TESTING
PLATFORMS AND BECAUSE A USER OR APPLICATION DESIGNER MAY USE NATIONAL INSTRUMENTS PRODUCTS IN
COMBINATION WITH OTHER PRODUCTS IN A MANNER NOT EVALUATED OR CONTEMPLATED BY NATIONAL
INSTRUMENTS, THE USER OR APPLICATION DESIGNER IS ULTIMATELY RESPONSIBLE FOR VERIFYING AND VALIDATING
THE SUITABILITY OF NATIONAL INSTRUMENTS PRODUCTS WHENEVER NATIONAL INSTRUMENTS PRODUCTS ARE
INCORPORATED IN A SYSTEM OR APPLICATION, INCLUDING, WITHOUT LIMITATION, THE APPROPRIATE DESIGN,
PROCESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION.
Page 4
Contents
About This Manual
Product Features ............................................................................................................xi
How To Use This Manual..............................................................................................xii
The TNT5002 is high performance GPIB interface that supports the
following two modes of usage (refer to Chapter 1, Architectural Overview,
for a complete description of different modes):
•PCI4882 mode—In this mode, the TNT5002 is able to run all NI-488.2
based drivers developed for the PCI-GPIB unmodified. This mode is
functionally equivalent to One-chip mode in the NI TNT4882 with a
PCI interface. This is the default mode for the TNT5002.
•GEN4882 mode—In this mode, the TNT5002 is functionally
equivalent to One-chip mode in the NI TNT4882/TNT4882C. Any
application written for the TNT4882/TNT4882C in mode will run
unmodified on the TNT5002.
The TNT5002 implements IEEE 488.1 Interface Functions SH1, AH1, T5,
TE5, L3, LE3, SR1, RL1, PP1, PP2, DC1, and DT1. The TNT5002 also
implements HS488 Interface Functions AHE1, SHE1, and CF1.
The TNT5002 implements Controller function C0, allowing no Controller
capability in any mode.
A DMA Controller with a 64-byte FIFO may be used in PCI4882 mode.
This may be used in addition to the 32-byte GPIB FIFO, effectively making
a 96-byte FIFO.
The TNT5002 also implements IEEE 488.1 Electrical Driver/Receiver
Capability E2 (three-state drivers).
Product Features
•Complies with PCI Local Bus Specification, Revision 2.1 or 2.2
•Complies with IEEE 488.1 Standard Digital Interface for Programmable Instrumentation and IEEE 488.2
•Complete backwards compatibility with software written using
NI-488.2, NI-488DDK, or NI-Device
This manual is designed for use in two ways. Chapter 3, Register
Descriptions, contains a listing of registers sorted first by group and then
alphabetically. Chapter 4, Functional Description—PCI4882 and
GEN4882 Modes, contains different sections addressing different GPIB
concepts, such as parallel polling and GPIB data transfers.
Users who are very familiar with the register set may find Chapter 3,
Register Descriptions, easier to use because specific registers are easy to
find. Users who are less familiar may find Chapter 4, Functional
Description—PCI4882 and GEN4882 Modes, easier because all of the
1
Assuming PCI4882 mode
TNT5002 Technical Reference Manualxiini.com
Page 11
About This Manual
register bits needed to perform a certain GPIB function are often located in
different registers.
Conventions
The following conventions appear in this manual:
»The » symbol leads you through nested menu items and dialog box options
to a final action. The sequence File»Page Setup»Options directs you to
pull down the File menu, select the Page Setup item, and select Options
from the last dialog box.
#The pound sign indicates a signal is active low. Active low signals are
logically asserted when in a low state; such as a pin being grounded or a
register bit being 0.
+The plus symbol is a logical binary OR operator.
&The ampersand symbol is a logical binary AND operator.
~The tilde is a logical unary negation operator.
*The asterisk is the multiplication operator.
This icon denotes a note, which alerts you to important information.
active-lowActive-low means that the signal should be at a logic low state to be
asserted. For example, RST# is an active-low signal that resets various
internal registers. The registers are reset when RST# is at logic 0 (ground).
byte8 bits
DMADMA is an acronym for Direct Memory Access. In the TNT5002, DMA is
used to transfer data automatically between system memory and the GPIB
FIFO. During DMA transfers, a DMA controller initiates register accesses.
dword32 bits
IEEE 488.1 andIEEE 488.1 and IEEE 488.2 refer to the ANSI/IEEE Standard 488.1-1987
IEEE 488.2and the ANSI/IEEE Standard 488.2-1992, respectively, which define the
GPIB.
italicItalic text denotes variables, emphasis, a cross reference, or an introduction
to a key concept. This font also denotes text that is a placeholder for a word
or value that you must supply.
monospaceText in this font denotes text or characters that you should enter from the
keyboard, sections of code, programming examples, and syntax examples.
This font is also used for the proper names of disk drives, paths, directories,
programs, subprograms, subroutines, device names, functions, operations,
variables, filenames, and extensions.
word16 bits
Mnemonic Conventions
There are many mnemonics that appear in this manual. Some mnemonics
are spelled identically but may differ in case; some are all capitalized and
some are all lower case. The following guidelines describe the naming
convention used:
ConventionExamples
Register mnemonics are capitalized.CHOR, CFG, PCIDR
Register bit mnemonics are capitalized.ADSR[LPAS],
DCR[BERHAND]
Register bit mnemonics are prefixed by the register in which they are
accessed, except when they are used in the bit descriptions of the
CHSR[ERROR],
CFG[CCEN]
registers in which the bit is accessed.
A mnemonic for a register bit may refer to a bit in more than one
register. This is clarified by prefixing a bit mnemonic with the register
CHSR[INT],
ISR3[INT]
in which the bit is accessed.
Similar bits in a given register may be grouped together and indexed
with brackets.
One bit of a group of similar bits in a given register may be indexed
without brackets.
PPR[LPPE[3:0]],
CHCR[SWAP[1:0]]
PPR[LPPE2],
CHCR[SWAP0]
Signal pins are capitalized.FRAME#, DAV#, SCL
GPIB local messages as defined in IEEE 488.1 are lower case.rdy, nba
GPIB remote messages as defined in IEEE 488.1 are capitalized.TCT, DCL
All GPIB signal pin names are suffixed with #.DAV#, NRFD#
All AUXCR, AUXMR, and CMDR commands are capitalized.IFC, ~IST
TNT5002 Technical Reference Manualxivni.com
Page 13
ConventionExamples
All IEEE 488.1 state machine state names are capitalized.SDYS, CIDS
About This Manual
The indexing brackets may be left off a bus name if the entire bus is
the subject of the context.
Related Documentation
The following documents contain information that you might find helpful
as you read this manual:
•ANSI/IEEE Standard 488.1-1987, IEEE Standard Digital Interface
for Programmable Instrumentation
•ANSI/IEEE Standard 488.2-1992, IEEE Standard Codes, Formats,
There are two distinct modes of operation in the TNT5002. PCI4882 and GEN4882 modes
implement the TNT4882 One-chip register set. This register set can be accessed through a
generic IO interface or a PCI interface. PCI4882 mode implements a PCI bus-master
interface. GEN4882 mode implements a generic IO interface. The two different modes of
operation are outlined in the following table. The interface must be selected by the MODE pin
and must not be changed dynamically since the pinout is significantly different between
interfaces.
User ConfigurationTNT5002 Features
GPIB
MODE
Mode
PCI48823.3VCMDR[SOFT_RESET]4882PCI64 + 32
GEN4882GNDCMDR[SOFT_RESET]4882Generic32
Pin
Reset Command
Register
Set
Interface
Tota l FI F O
Depth
(Bytes)
FIFO Overview
If the TNT5002 is in PCI4882 mode, there are two FIFOs: a 32-byte FIFO connected to the
GPIB and a 64-byte FIFO connected to the PCI bus.
The 32-byte GPIB FIFO (GFIFO) is used for both GPIB reads and writes. It can be written to
and read from simultaneously by the DMA Controller and Source/Acceptor GPIB state
machines.
The 64-byte DMA FIFO (DFIFO) connected to the PCI bus is used for DMA transfers. This
FIFO is connected to the PCI bus on one side and the GFIFO on the other side.
During DMA transfers, bytes are automatically transferred between the DFIFO and GFIFO.
The GFIFO should never be directly accessed. The TNT5002 always interprets all DMA
accesses between the GFIFO and DMA FIFO as 16-bit operations. During programmed IO
(PIO) operations, the DMA FIFO is never accessed, just the GFIFO.
If the TNT5002 is in GEN4882 mode, there is one 32-byte FIFO connected to the GPIB. This
FIFO can be accessed through either PIO or DMA.
TNT5002 Technical Reference Manual1-2ni.com
Page 16
DMA Overview
If the TNT5002 is in PCI4882 mode, the DMA Controller must be used to maximize transfer
rates. The GPIB registers in the TNT5002 are configured in the same manner regardless of
whether DMA is used. If DMA is used, the GPIB FIFO should not be directly accessed
because the DMA Controller automatically transfers data between the DMA FIFO and GPIB
FIFO.
If the TNT5002 is in GEN4882 mode, an external DMA controller can be connected to the
TNT5002.
The following 16 signals implement the GPIB protocol as described in IEEE 488.1. These
signals exist in all modes.
GPIB Data Signals
Pin NameTypeDescription
DIO#[8:1]GTData Lines—The eight DIO lines carry command and data
messages on the GPIB. All commands and most data bytes use
the 7-bit ASCII or ISO code set, leaving the eighth bit, DIO8#,
unused or used for parity. However, applications may use
DIO8# as a normal data signal for 8-bit data.
GPIB Interface Management Signals
These signals are used for signaling among controllers and devices.
Pin NameTypeDescription
IFC#GTInterface Clear—The System Controller asserts IFC# to
place all devices into a known quiescent state.
AT N #GTAttention—The Controller-in-Charge asserts ATN# when it
sends commands and unasserts ATN# when it sends data
messages.
SRQ#GTService Request—A device asserts SRQ# to request service
from a Controller.
REN#GTRemote Enable—The System Controller asserts REN# to
enable devices for remote programming.
EOI#GTEnd or Identify—A Talker asserts EOI# to signal the end of
data. EOI# is also asserted by the Controller-in-Charge to
signal the execution of a parallel poll.
TNT5002 Technical Reference Manual2-2ni.com
Page 19
Chapter 2Signal Pins
GPIB Handshake Signals
These signals are used to handshake data and command bytes using both 3-wire and HS488
transfer protocols.
Pin NameTypeDescription
DAV#GTData Valid—DAV# indicates whether DIO# is stable and
whether devices can safely accept the signals. When a
Controller sends commands, it controls DAV#, and when a
Talker sends data it controls DAV#.
NRFD#GTNot Ready for Data—NRFD# indicates whether a Listener is
ready to receive a data byte. NRFD# is driven by all active
Listeners when a Talker is sending data or by all devices when
the Controller is sending commands. NRFD# is also used by
the Talker to control HS488 transfers.
NDAC#GTNot Data Accepted—NDAC# indicates whether all devices
have accepted the byte for which DAV# was most recently
asserted. NDAC# is driven by all active Listeners when a
Talker is sending data or by all devices when a Controller is
sending commands.
EXT_CLKIGPIB Circuitry Clock—This clock may be used for the
GPIB circuitry. It should be driven by an external oscillator at
40MHz. In PCI4882 or PCI9914 modes this pin must remain
undriven if USE_PCI_CLK is asserted because the GPIB
circuitry will be clocked by PCI_CLK.
TRIGGEROTrigger—The trigger pin is asserted when the DT state
machine is in DTAS. DTAS is entered after receiving the
Group Execute Trigger (GET) command as an Addressed
Listener, or after writing AUXMR[TRIG]. TRIGGER
unasserts after either leaving DTAS or three clock cycles after
writing AUXMR[TRIG].
enables the SRQ# transceiver when asserted. The logic state is
then determined by SRQ_DATA. This pin must be unasserted
for normal operation.
SRQ_DATAI, PUSRQ# Data Input—When SRQ_OE# is asserted this
debugging pin determines the drive state of the SRQ#
transceiver. Asserting this pin causes the SRQ# transceiver to
drive SRQ# actively false. Unasserting this pin causes the
SRQ# transceiver to drive SRQ# actively true.
TNT5002 Technical Reference Manual2-4ni.com
Page 21
Chapter 2Signal Pins
Miscellaneous Signals (PCI4882 Mode)
Pin NameTypeDescription
USE_ROMI, PUUse Serial Rom—This pin determines if the TNT5002 loads
a PCI Device ID and serial number from the serial ROM.
If this pin is asserted, serial autoload occurs. If this pin is
unasserted, serial autoload does not occur.
SCLOSerial ROM Clock Pin—This clock is generated by the
TNT5002 and connected to the clock input of a serial ROM.
The frequency of this clock is approximately 65 kHz when
PCI_CLK is 33 MHz.
SDATS, PUSerial ROM Data Pin—This bidirectional data pin is the
serial data line between the TNT5002 and serial ROM. This
pin is an output when writing to the serial ROM and an input
when reading from the serial ROM.
DIS_SUBSYSI, PUDisable PCI SUBSYSTEM ID—If this pin is asserted,
reading the PCI SUBSYSTEM ID returns 0x00000000. If this
pin is actively driven low, reading the PCI SUBSYSTEM ID
register returns the same value as the PIDR.
USE_PCI_CLKIUse PCI Clock—When this pin is asserted, the GPIB
circuitry is clocked by the PCI_CLK. If this pin is unasserted,
the GPIB circuitry is clocked by EXT_CLK.
Indicator Signals
These pins indicate various states of the GPIB state machines. These are general purpose
outputs and can be used to drive an LED, for example. These signals exist in all modes.
Pin NameTypeDescription
LADCSOActive Listener—This pin asserts when the Listener state
machine is in LADS or LACS. This pin reflects the state of
ADSR[LA].
TADCSOActive Talker—This pin asserts when the Talker state
machine is in TADS, TACS, or SPAS. This pin reflects the
state of ADSR[LA].
REMTORemote Enabled—This pin asserts when the Remote/Local
state machine is in REMS or RWLS. This pin reflects the state
of ISR2[REM].
These signals implement a PCI interface. These signals only exist in PCI4882 mode.
In GEN4882 mode, these pins have different functionality.
Pin NameTypeDescription
PCI_CLKIPCI Clock—This is the clock input from the PCI bus.
AD[31:0]TSPCI Address/Data—These signals are the multiplexed PCI
address and data bus.
C/BE#[3:0]TSCommand/Byte Enable—These signals are the multiplexed
command and byte enables. During the PCI address phase
C/BE# conveys the type of transfer taking place. Following the
address phase, C/BE# indicates whether valid data is present
on the four byte lanes of the AD bus.
PARTSParity—PAR carries the even parity over the AD and C/BE#
buses during address and data phases. The device that drives
AD and CBE# also drives PAR. PAR is valid one clock cycle
after AD and C/BE# are valid.
FRAME#STSFrame—A PCI master asserts FRAME# to indicate the
beginning and duration of a transaction. FRAME# assertion
indicates the beginning of a PCI transaction. Data transactions
can continue while FRAME# is asserted. FRAME#
unassertion indicates the final data phase requested by the
initiator.
IRDY#STSInitiator Ready—IRDY# is driven by the initiator of a
transaction to indicate the initiator’s ability to complete the
current data phase. During a write transaction, IRDY# is
asserted when valid data is driven onto the AD bus. During a
read, IRDY# is asserted when the initiator is able to accept
data for the current data phase.
TRDY#STSTarget Ready—TRDY# is driven be the target of a
transaction to indicate the target’s ability to complete the
current data phase. During a write transaction, TRDY# is
asserted when the target is able to accept data for the current
data phase. During a read, TRDY# is asserted when the target
is driving valid data onto the AD bus.
TNT5002 Technical Reference Manual2-6ni.com
Page 23
Chapter 2Signal Pins
Pin NameTypeDescription
DEVSEL#STSDevice Select—DEVSEL# is asserted by the target to indicate
that the device is accepting the transaction.
STOP#STSStop—This signal is driven by the target to request that the
initiator stop the current transaction.
IDSELSTSInitialization Device Select—This signal is used as the chip
select for Type 0 PCI configuration accesses to PCI
configuration space.
PERR#STSParity Error—PERR# is asserted when a parity error is
detected. PERR# can be asserted by the target during a write
transaction and by the initiator during a read transaction.
SERR#TSSystem Error—SERR# is asserted to indicate a serious
system problem or a parity error during the address phase of a
data transfer.
REQ#TSBus Request—REQ# is asserted to request access to the bus.
GNT#IBus Grant—GNT# is asserted to grant access to the bus.
INTA#TSInterrupt—This signal is asynchronously asserted to
interrupt the CPU.
PCI_RST#IPCI Reset—This signal is used to initialize the device to a
known state. While PCI_RST# is asserted all PCI and GPIB
signals are tri-stated. PCI_RST# must be asserted during
power-up to ensure that the GPIB signals do not glitch when
connected to another device.
These signals implement a generic bus interface. These signals only exist in GEN4882 mode.
In PCI4882 mode, these pins have different functionality.
Pin NameTypeDescription
DACK#IDMA Acknowledge—DACK#, along with IORD# or
IOWT#, asserts during DMA accesses.
CS#IChip Select—CS#, along with IORD# or IOWT#, asserts
during IO accesses.
DRQODMA Request—DRQ is asserted to request a DMA transfer.
HWORD#I16-Bit Access—HWORD# is asserted during 16-bit register
accesses and unasserted for 8-bit register accesses. HWORD#
is ignored during DMA accesses.
INTTSInterrupt—INT asserts when an enabled interrupt condition
is true.
IOA[6:0]IAddress—IOA selects a register during IO accesses.
IOD[15:0]IOData—IOD is the 16-bit bi-directional data bus used for DMA
and IO accesses. During 8-bit writes data must be on the lower
8 bits. During 8-bit reads the data will be smeared across both
byte lanes. Unused signals in 8-bit mode should not be left
floating.
IORD#IRead—IORD# is asserted to indicate an IO or DMA read.
IOWT#IWrite—IOWT# is asserted to indicate an IO or DMA write.
RESET#IReset—RESET# resets the chip to its initial power-on state.
RESET# also asynchronously tri-states the GPIB transceivers.
TNT5002 Technical Reference Manual2-8ni.com
Page 25
Chapter 2Signal Pins
Power/Ground Pins
The location of power and ground pins are the same among all modes, although the meaning
of the pins changes slightly.
PCI4882 Power/Ground Pins
The following pins supply power to the TNT5002 in PCI4882 mode.
Pin NameDescription
3.3VCore/GPIB Transceiver Power—These pins provide power for the digital
core and all output signal pins except PCI signals. These pins must be connected
to a 3.3V source. If not connected directly to the PCI 3.3V power rail, the 3.3V
supply they are connected to cannot vary by more than 170mV. If these pins are
connected to the PCI 3.3V rail, that rail may vary according to the PCI
Specification.
VIOPCI Transceiver Power—These pins provide power for the PCI Transceivers.
These must be connected to 3.3V or 5V as allowed by the PCI Specification.
GNDGround—These pins are ground pins for both power inputs.
VIO_SELVIO Comparator—This input is used to determine whether VIO is 3.3V or 5V.
This signal is compared against 3.3V and must be directly connected to VIO.
GEN4882 Power/Ground Pins
The following pins supply power to the TNT5002 in GEN4882 mode.
Pin NameDescription
3.3VCore/GPIB Transceiver Power—These pins provide power for the digital
core and all output signal pins except the Generic Interface signals. These pins
must be connected to a 3.3V source.
VIOGeneric Interface Transceiver Power—These pins provide power for the
Generic Interface Transceivers. The generic interface pins can be powered from
either 3.3V or 5V. The voltage connected to VIO is used to drive the generic
interface pins.
GNDGround—These pins are ground pins for both power inputs.
The following register map is valid when interfacing through generic interface. These
registers are accessed by asserting CS# or DACK# and IORD# or IOWR#.
GPIB Registers
4882 Register Set
Reserved
Reserved
Reserved
0×00
0×20
0×30
0×40
0×50
Reserved
0×FF
TNT5002 Technical Reference Manual3-4ni.com
Page 31
Chapter 3Register Descriptions
TNT5002 Status/Control Register Group
These registers are only available in PCI4882 mode. This register group is used to control and
configure the PCI interface.
These registers are only available in PCI4882 mode.
PCI Configuration Register Map
All PCI devices must support a set of configuration registers that control the behavior of the
PCI device and provide a consistent location for a PCI device to indicate its status. The PCI
specification does support some functionality that is superfluous to the requirements of the
TNT5002’s PCI interface. The register space, as implemented in the PCI interface, is shown
in the following table.
Offset in
PCI Config
Mnemonic
PIDR
PSCR
PCCRIDR
PLIVR0x0CPBAR0 + 0x30C0Latency TimerCache Line Size
Offset 0x04 from PCI Config Space, 0x304 from PBAR0Reset Value: 0x02000000Read/Write
PERRDTSERRDTSMABTRTAB TSTABTSPEEDASPEEDBPA RD T
3130292827262524
FBBC0000000
2322212019181716
0000000SERREN
15141312111098
ADSTEPPERREN0MWIEN0MSTRENMEMENIOEN
76543210
Bits 31–16 are status bits. The PCI interface sets the bits in these registers. In order to clear a
bit in the status register, a PCI device must write a one to the bit. This convention is required
by the PCI specification. Bits 15–0 are control bits, and these bits are read/write.
MnemonicTypeDescription
PERRDTR/WParity Error Detect—This bit is set when the PCI interface
detects a parity error even when parity error handling is
disabled by clearing PERREN.
SERRDTR/WSystem Error Detected—The PCI interface sets this bit
when it asserts SERR#.
SMABTR/WSignal Master Abort—The PCI interface sets this bit if it
terminates a PCI master cycle with a master abort.
RTABTR/WReceive Target Abort—The PCI interface sets this bit to
indicate that it received a target abort while performing a PCI
master cycle.
STABTR/WSignal Target Abort—The PCI interface sets this bit if it
terminates a slave cycle with a target abort.
TNT5002 Technical Reference Manual3-12ni.com
Page 39
Chapter 3Register Descriptions
MnemonicTypeDescription
SPEEDA
SPEEDB
R/WAddress Decoding Speed—SPEEDA and SPEEDB are
hardwired to 0 and 1, respectively, to indicate that the PCI
interface is a medium speed decoder. These bits are set in
accordance with the PCI specification requirements. Writes to
these bits are ignored.
PA RD TR/WParity Detect—The PCI interface sets this bit if three
conditions are met:
• The PCI interface asserted PERR# or detected that PERR#
was asserted by another device.
• The PCI interface was performing a master cycle when
PERR# was asserted.
• PERREN is set.
FBBCR/WFast Back-to-Back Capable—This bit is hardwired to 1
indicating that the PCI interface supports fast back-to-back
transfers as a PCI slave. Writes to this bit are ignored.
SERRENR/WSERR# Enable—Setting this bit permits the PCI interface to
assert SERR# during system error conditions. Clearing this
bit prevents the PCI interface from asserting SERR#.
ADSTEPR/WAddress Stepping—This bit is hardwired to 0 to indicate that
address or data stepping is not performed. Writes to this bit
are ignored.
PERRENR/WParity Error Response Enable—Setting this bit enables the
PCI interface to assert PERR# and set PERRDT. If this bit is
cleared, the PCI interface must ignore parity errors and
continue normal operations.
MWIENR/WMemory Write/Invalidate Enable—Setting this bit allows
the PCI interface to initiate memory write and invalidate and
memory read line cycles as a PCI master. Clearing this bit
makes the PCI interface initiate standard memory write and
read cycles.
MSTRENR/WMaster Mode Enable—Setting this bit permits the PCI
interface to operate as a PCI master. Clearing this bit disables
master mode.
MEMENR/WMemory Space Response Enable—Setting this bit permits
the PCI interface to respond to PCI memory cycles that map
to the PCI interface. Clearing this bit makes the PCI interface
ignore all PCI memory space transfers.
IOENR/WIO Space Response Enable—Setting this bit permits the PCI
interface to respond to PCI IO space cycles that map to the
PCI interface. Clearing this bit makes the PCI interface ignore
all PCI IO space transfers.
TNT5002 Technical Reference Manual3-14ni.com
Page 41
Chapter 3Register Descriptions
Class Code and Revision ID Register (PCCRIDR)
Offset 0x08 from PCI Config Space, 0x308 from PBAR0Reset Value: 0x07800002Read Only
CLASS_CODE[23:16]
3130292827262524
CLASS_CODE[15:8]
2322212019181716
CLASS_CODE[7:0]
15141312111098
REVISION_ID[7:0]
76543210
This register describes the type of PCI device according to the PCI specification.
MnemonicTy peDescription
CLASS_CODE[23:0]RDetermine the PCI Interface’s Device Class—This value
is set to 0x078000, indicating the TNT5002 base class is
“Simple Communications Controller,” the subclass is
“Other Communications Device,” and the register level
programming interface is 0x00.
REVISION_ID[7:0]RRevision Code—This byte determines the revision level of
the PCI interface. The TNT5002 is revision 0x02. This
value may be changed in future versions of the TNT5002.
Offset 0x0C from PCI Config Space, 0x30C from PBAR0Reset Value: 0x00000000Read Only
BIST[7:0]
3130292827262524
HEADER_TYPE[7:0]
2322212019181716
LATENCY_TIMER[7:0]
15141312111098
CACHELINE_SZ[7:0]
76543210
MnemonicTy peDescription
BIST[7:0]RBuilt-in Self Test—These bits return 0.
HEADER_TYPE[7:0]RHeader Type—These bits return 0.
LATENCY[7:0]RMaximum Bus Tenure—The value in this register
specifies the maximum time, in PCI clocks, that the PCI
interface can occupy the PCI bus when it performs master
cycles. This value is written by a PCI host device, most
commonly a host CPU.
CACHE LINE[7:0]RSpecify the Cache Line Size—This indicates the size of a
host PCI’s cache line in 4 byte increments. The PCI
interface uses the cache line value to determine whether to
use memory write and invalidate or memory read line cycles
when the MWIEN bit is set in the PSCR.
TNT5002 Technical Reference Manual3-16ni.com
Page 43
Chapter 3Register Descriptions
Base Address Register 0 (PBAR0)
Offset 0x10 from PCI Config Space, 0x310 from PBAR0Reset Value: 0xFFFFF800Read/Write
ADRBASE[23:16]
3130292827262524
ADRBASE[15:8]
2322212019181716
ADRBASE[7:0]
15141312111098
0000001MEG/0IO
76543210
PBAR0 defines the base address from which the Chip Status/Control, PCI Configuration,
Miscellaneous Status/Control, and DMA Status/Control register groups are accessed.
MnemonicTypeDescription
ADRBASE[23:0]R/WBase Address—This field specifies the starting address of the
window that the PCI interface recognizes. The size of the
window defined by this register is 2 kB.
1MEG/0RType—When a base address register maps to PCI memory
space, a one in this read-only bit directs a PCI host to place the
window defined by this base address register within the first
1 megabyte of system memory. A zero indicates that the PCI
host can locate this window anywhere in memory space.
When a base register maps to IO space, this bit always returns
0. Writes to this bit are ignored.
IORIO Space Indicator—A 0 in this ready-only bit directs a PCI
host to locate the address window defined by this base address
register into PCI memory space. A 1 directs the PCI host to
locate this window in PCI IO space. Writes to this bit are
ignored.
Offset 0x14 from PCI Config Space, 0x314 from PBAR0Reset Value: 0xFFFFFC00Read/Write
ADRBASE[23:16]
3130292827262524
ADRBASE[15:8]
2322212019181716
ADRBASE[7:0]
15141312111098
0000001MEG/0IO
76543210
PBAR1 defines the base address from which the 4882 Register Set, 9914 Register Set, GPIB
Test/Status, and Serial Number register groups are accessed.
MnemonicTypeDescription
ADRBASE[23:0]R/WBase Address—This field specifies the starting address of the
window that the PCI interface recognizes. The size of the
window defined by this register is 16 kB.
1MEG/0R/WType—When a base address register maps to PCI memory
space, a one in this read-only bit directs a PCI host to place the
window defined by this base address register within the first
1 megabyte of system memory. A zero indicates that the PCI
host can locate this window anywhere in memory space.
When a base register maps to IO space, this bit always returns
0. Writes to this bit are ignored.
IOR/WIO Space Indicator—A 0 in this ready-only bit directs a PCI
host to locate the address window defined by this base address
register into PCI memory space. A 1 directs the PCI host to
locate this window in PCI IO space. Writes to this bit are
ignored.
TNT5002 Technical Reference Manual3-18ni.com
Page 45
Chapter 3Register Descriptions
CIS Pointer Register Register (PCISR)
Offset 0x28 from PCI Config Space, 0x328 from PBAR0Reset Value: 0x00000000Read/Write
CIS[31:24]
3130292827262524
CIS[23:16]
2322212019181716
CIS[15:8]
15141312111098
CIS[7:0]
76543210
This register is the Cardbus Information Structure and is only used for Cardbus applications.
MnemonicTypeDescription
CISR/WCard Information Structure—Stores the 32 bit memory
address of the Card information structure for Cardbus
applications. This register is fully readable/writeable when
PERCR[CBUSEN] is set. Otherwise, this register always
returns 0.
Offset 0x2C from PCI Config Space, 0x32C from PBAR0Reset Value: See DescriptionRead Only
SUBSYSTEM_ID[15:8]
3130292827262524
SUBSYSTEM_ID[7:0]
2322212019181716
SUBVENDOR_ID[15:8]
15141312111098
SUBVENDOR_ID[7:0]
76543210
This register implements the PCI Subsystem ID and Subsystem Vendor ID fields as required
by PCI Specification 2.2. The reset value of this register depends on DIS_SUBSYS.
MnemonicTypeDescription
SUBSYSTEM_ID[15:0]RSubsystem ID—If DIS_SUBSYS is asserted or not
connected, these bits return 0x0000. If DIS_SUBSYS
is actively unasserted, SUBSYSTEM_ID returns
PIDR[DEVICE_ID[15:0]].
SUBVENDOR_ID[15:0]RSubsystem Vendor ID—If DIS_SUBSYS is
asserted or not connected, these bits return 0x0000.
If DIS_SUBSYS is actively unasserted,
SUBVENDOR_ID returns PIDR[VENDOR_ID[15:0]].
Offset 0x3C from PCI Config Space, 0x33C from PBAR0Reset Value: 0x00000100Read/Write
MAX_LAT[7:0]
3130292827262524
MIN_GNT[7:0]
2322212019181716
INT_PIN[7:0]
15141312111098
INT_LINE[7:0]
76543210
This register implements the various fields required by PCI Specification 2.2.
MnemonicTypeDescription
MAX_LAT[7:0]RMaximum Requested Latency—These bits are hard-wired
to 0. Writes to these bits are ignored.
MIN_GNT[7:0]RMinimum Bus Grant Time—These bits are hard-wired to 0.
Writes to these bits are ignored.
INT_PIN[7:0]RInterrupt Pin—This read-only byte specifies which interrupt
pin the PCI interface uses for interrupts. This byte is
hardwired to 0x01 since the PCI interface can use only the
INTA# signal. Writes to these bits are ignored.
INT_LINE[7:0]R/WInterrupt Line—This read-write byte specifies interrupt line
routing information. It has no effect on the PCI interface. The
PCI host device writes a value in this byte which an interrupt
service routine can use to determine interrupt vector and
priority information.
Offset 0x40 from PCI Config Space, 0x340 from PBAR0Reset Value: 0x0000B4A8Read/Write
RRRRRRRR
3130292827262524
RRRRRRRR
2322212019181716
B1_ENB1_S[4:0]B1_1MEG0
15141098
B0_ENB0_S[4:0]B0_1MEG0
76210
This fields in this register are used to configure PBAR0 and PBAR1. Most applications should
not access this register.
MnemonicTypeDescription
B0_EN
B1_EN
R/WPBAR0/PBAR1 Enable—Setting these bits enable PBAR0
or PBAR1. When PBAR0 or PBAR1 are enabled a PCI host
can read and write data from and to it, and the PCI interface
uses the contents of this register to decode incoming PCI
addresses. If PBAR0 or PBAR1 is disabled, it returns all zeros
when it is read as required by the PCI specification.
B0_S[4:0]
B1_S[4:0]
R/WPBAR0/PBAR1 Window Size—These bits specify the
amount of PCI memory space that the PBAR0 or PBAR1
requires. The amount of address space is 2
[Bx_S+1]
bytes long.
The PCI specification recommends that if the address space
being requested lies in PCI memory space, Bx_S should be
greater than 12. If the address space being requested lies in
PCI IO space, Bx_S should be greater than 8.
TNT5002 Technical Reference Manual3-22ni.com
Page 49
Chapter 3Register Descriptions
MnemonicTypeDescription
B0_1MEG
B1_1MEG
R/WMemory Type—When PBAR0 or PBAR1 maps to PCI
memory space, setting this bit directs a PCI host to place the
window defined by this base address register within the first
megabyte of system memory. A zero indicates that the PCI
host can locate this window anywhere in memory space.
When a Base Address Register maps to IO space, this bit is
ignored. B0_1MEG/ B1_1MEG reflects the state of
PBAR0[1MEG/0]/PBAR1[1MEG/0].
RR/WReserved—Always write 0 to these bits. These bits are read
Offset 0x48 from PCI Config Space, 0x348 from PBAR0Reset Value: 0xC7000000Read/Write
RBEERRENCBUSENFAST EN #WRITEENHWRL2HWRL1HWRL0
3130292827262524
RRRRRRRR
2322212019181716
RRRRRRRR
15141312111098
RRRRRRRR
76543210
MnemonicTypeDescription
BEERRENR/WBus Error on Unsupported BE Codes—Setting this bit
enables the PCI interface to terminate a PCI slave transfer
with a target abort if the initiating PCI master uses a
non-aligned BE# encoding. If this bit is cleared, the PCI
interface terminates the transfer with a disconnect allowing
the PCI master to assume the transfer completed successfully,
but the interface does not actually initiate a cycle.
CBUSENR/WCard Bus Support Enable—Setting this bit enable the CIS
pointer register (PCISR). Clearing this bit makes the PCISR
return 0.
FASTEN#R/WFast Back-to-Back Enable—Clearing this bit sets the
PSCR[FBBC] by indicating support for fast back-to-back
cycles. Setting this bit clears PSCR[FBBC]. This feature
helps deal with finicky BIOS that might not handle fast
back-to-back properly.
WRITEENR/WWrite Enable—Setting this bit makes the PLRIDR
(MAR_LAT and MIN_GNT) writable. Clearing this bit
makes these registers read-only.
TNT5002 Technical Reference Manual3-24ni.com
Page 51
Chapter 3Register Descriptions
MnemonicTypeDescription
HWRL[2:0]R/WHardware Retry Limit—These bits specify the number of
times the PCI interface retries a PCI cycle before returning a
bus error to the port that initiated the transfer. The number of
retries is 2
HWRL
.
RR/WReserved—Always write 0 to these bits. These bits are read
Offset 0x504 from PBAR0Reset Value: 0x55550000Read/Write
01010101
3130292827262524
01010101
2322212019181716
00000000
15141312111098
0000DIRRMODE[2:0]
76543210
This register is used to configure the DMA controller and should be configured prior to any
DMA transfer.
MnemonicTypeDescription
DIRR/WTransfer Direction—DIR indicates the direction of data
flow of a DMA transfer.
DIRDirection
0 .....................Memory to GPIB
1 .....................GPIB to Memory
RMODE[2:0]R/WTransfer Mode Select—Determines the mode of operation
for the DMA Controller Channel.
RMODE[2:0]DMA Type
100 .................... Link Short
other ..................Reserved
TNT5002 Technical Reference Manual3-30ni.com
Page 57
Chapter 3Register Descriptions
Channel Operation Register (CHOR)
Offset 0x500 from PBAR0Reset Value: 0x00000512Read/Write
DMARESETRRRRRRR
3130292827262524
RRRRRRRR
2322212019181716
RRRR0101
15141312111098
CLR DONERRFRESETABORTSTOP1START
76543210
This register is used to control DMA transfers, including starting and stopping transfers.
MnemonicTypeDescription
DMARESETR/WDMA Reset—Setting this bit causes the DMA Controller to
be reset. Refer to Chapter 8, Reset Considerations, for more
information.
CLR DONER/WClear Done Status Bit—Setting this bit clears the DONE
status bit. The DONE status bit is also automatically cleared
when a new operation is started.
FRESETR/WFIFO Reset—Setting this bit clears the FIFO. The bit is
automatically cleared.
ABORTR/WAbort DMA Operation—When this bit is written with a one,
the current DMA stops after the completion of any transfer
started before the bit was set. All bytes in the FIFO are lost.
This bit clears when START is set.
STOPR/WStop DMA—When this bit is written with a one, the current
DMA is stopped after the FIFO has been allowed to empty.
This bit clears when START is set.
STARTR/WStart DMA Operation—A DMA transfer is started by
writing this bit with a one after programming the appropriate
address, count, configuration, and control registers.
RR/WReserved—Always write 0 to these bits. These bits are read
as either 0 or 1.
TNT5002 Technical Reference Manual3-32ni.com
Page 59
Chapter 3Register Descriptions
Channel Status Register (CHSR)
Offset 0x53C from PBAR0Reset Value: 0x00000000Read Only
RRRRRRDONER
3130292827262524
RRRRRRRR
2322212019181716
ERRORSABORTRSTOPSOPERR[1:0]RFERRR
15141312111098
RDRQARMERR[1:0]DERR[1:0]
76543210
This register contains status information about the DMA Controller.
MnemonicTypeDescription
DONERDMA Done—This bit clears when the DMA is started and
sets when the transfer is completed normally or by an error.
ERRORRError Occurred—Indicates the transfer completed due to an
error. The other bits indicate the type of error.
SABORTRSoftware Abort—This bit asserts when CHOR[ABORT]
is set.
STOPSRStopped Status—This bit sets when CHOR[STOP] is set.
Note: STOPS is not status that the DMA Controller has
stopped but that the STOP bit was written. To get status that
the DMA Controller has STOPPED, enable the DONE IE,
then write STOP in the CHOR to get an interrupt that the
DMA Controller has actually stopped.
OPERR[1:0]ROperation Error Code—An illegal FIFO operation such as
reading an empty FIFO or writing a full FIFO occurred.
OPERR is just a status bit, it does not stop the DMA
Controller from finishing a transfer.
OPERR[1:0]Error
00 ......................... FIFO Error
01 ......................... Bus Error
others.................... Reserved
XFERRRTransfer Error—One or more of the transfer processes
terminated with an error. Refer to the LERR, MERR, and
DERR bit to determine the type.
DRQARDRQA Status—The state of the DRQ signal from the GPIB
circuitry.
MERR[1:0]RMemory Transfer Error—These bits indicate the type of
error which stopped the memory transfer process.
MERR[1:0]Error
00 ...................... No Error
01 ......................Bus Error
10 ...................... Retry Limit Exceeded
11 ......................Other Error
DERR[1:0]RDevice Transfer Error—These bits indicate the type of error
which stopped the device transfer process.
DERR[1:0]Error
00 ...................... No Error
01 ......................Bus Error
10 ...................... Retry Limit Exceeded
11 ......................Other Error
RRReserved—Always write 0 to these bits. These bits are read
as either 0 or 1.
TNT5002 Technical Reference Manual3-34ni.com
Page 61
Chapter 3Register Descriptions
Device Configuration Register (DCR)
Offset 0x514 from PBAR0Reset Value: 0x00040241Read/Write
000RRRRR
3130292827262524
RL[2:0]RD[1:0]REQS[2:0]
2322212019181716
RRASEQ[3:0]PSIZE[1:0]
15141312111098
R1RRR0R1
76543210
This register is used to configure how the DMA Controller accesses the GPIB circuitry. This
register should not be accessed for most applications.
MnemonicTypeDescription
RL[2:0]R/WRetry Limit—These bits determine the maximum number of
times a single transfer may be retried. If the limit is exceeded,
a retry error is reported and the operation is stopped. When
programmed to zero, the first retry results in an error. The
limit selects a power of two number of retries that cause an
error 0, 1, 2, 4, 8, …, 64.
RD[1:0]R/WRequest Delay Limiter—These bits determine the delay that
must elapse between transfers. This limit is always enforced
for retry cycles. The limit may be enforced for all cycle when
the request mode is internal and limited. This has the
following values:
Offset 0x540 from PBAR0Reset Value: 0x00000000Read Only
RRRRRRRR
3130292827262524
ECR[7:0]
2322212019181716
RRRRRRRR
15141312111098
FCR[7:0]
76543210
This register contains the current number of empty bytes positions in the DFIFO. This register
should not be accessed for most applications.
MnemonicTypeDescription
ECR[7:0]REmpty FIFO Locations—ECR indicates the number of
empty locations (bytes) in the DFIFO.
FCR[7:0]RFIFO Count—FCR indicates the number of bytes remaining
in the DFIFO. A transfer is complete when both the TCR and
FCR reach zero.
RRReserved—These bits are read as either 0 or 1.
TNT5002 Technical Reference Manual3-38ni.com
Page 65
Chapter 3Register Descriptions
Link Address Register (LKAR)
Offset 0x520 from PBAR0Reset Value: 0x00000000Read/Write
LKAR[31:24]
3130292827262524
LKAR[23:16]
2322212019181716
LKAR[15:8]
15141312111098
LKAR[7:0]
76543210
MnemonicTypeDescription
LKAR[31:0]R/WLink Address Register—The LKAR points to the next entry
when chaining is used. The address of the first link is
manually programmed to the LKAR, and the register is
modified as subsequent links are loaded from memory. The
LKAR must be aligned to the boundary of the programmed
transfer size.
Offset 0x51C from PBAR0Reset Value: 0x00000000Read/Write
RRRRRRRR
3130292827262524
RL[2:0]RRRR
2322212019181716
RRRRASEQ[1:0]PSIZE[1:0]
15141312111098
RRRRRRRR
76543210
This register is used to configure how the DMA Controller fetches links from memory.
MnemonicTypeDescription
RL[2:0]R/WRetry Limit—These bits determine the maximum number of
times a single transfer may be retried. If the limit is exceeded,
a retry error is reported and the operation is stopped. When
programmed to zero, the first retry results in an error. The
limit selects a power of two number of retries that cause an
error 0, 1, 2, 4, 8, …, 64.
ASEQ[1:0]R/WAddress Sequence Selection—Determines how the address
is modified for the next transfer.
ASEQ[1:0]Next Address Selection
00 ...................Don’t Count
01 ...................Increment
10 ...................Decrement
TNT5002 Technical Reference Manual3-40ni.com
Page 67
Chapter 3Register Descriptions
MnemonicTypeDescription
PSIZE[1:0]R/WPort Transfer Size—The size of the port for the transfer.
PSIZE[1:0]Port Size
01................... 8-bit
10................... 16-bit
11................... 32-bit
The link process packs smaller data into the 32 bit dwords
required by the link process. Unlike data transfers, the
transfers must be aligned on the proper boundary.
RR/WReserved—Always write 0 to these bits. These bits are read
Offset 0x510 from PBAR0Reset Value: 0x00000000Read/Write
MAR[31:24]
3130292827262524
MAR[23:16]
2322212019181716
MAR[15:8]
15141312111098
MAR[7:0]
76543210
MnemonicTypeDescription
MAR[31:0]R/WMemory Address Register—The MAR is loaded
automatically by the DMA Controller with the mem_address
from the current link node and incremented according to
MCR[ASEQ] as data is read from memory. If the address is
not aligned to the programmed size boundary as specified by
MCR[PSIZE], the DMA Controller does smaller transfer
until alignment occurs.
TNT5002 Technical Reference Manual3-42ni.com
Page 69
Chapter 3Register Descriptions
Memory Configuration Register (MCR)
Offset 0x50C from PBAR0Reset Value: 0x00040700Read/Write
RRRRRRRR
3130292827262524
RRRRR100
2322212019181716
RR0001PSIZE[1:0]
15141312111098
RRRRRRRR
76543210
This register is used to configure how the DMA Controller writes and reads data from to and
from memory.
MnemonicTypeDescription
PSIZE[1:0]R/WPort Transfer Size—The size of the port for the transfer. The
actual transfer size may be smaller when aligning addresses
and draining the FIFO.
PSIZE[1:0]Port Transfer Size
00..................... Reserved
01..................... 8-bit
10..................... 16-bit
11..................... 32-bit
RR/WReserved—Always write 0 to these bits. These bits are read
Offset 0x0C in 4882 Register SetReset Value: 0x00Write Only
0DT0DL0PRIM_ADDR[4:0]
76540
ADR0 configures how the device is addressed on the GPIB.
MnemonicTypeDescription
DT0WDisable Primary Talker—If DT0 is set, the primary Talker
is not enabled and PRIM_ADDR is not compared to GPIB
Talk commands. If DT0 is cleared, the primary Talker
responds to GPIB Talk commands matching PRIM_ADDR.
DL0WDisable Primary Listener—If DL0 is set, the primary
Listener is not enabled and PRIM_ADDR is not compared to
GPIB Listen commands. If DL0 is cleared, the primary
Listener responds to GPIB Listen commands matching
PRIM_ADDR.
PRIM_ADDR[4:0]WPrimary Address—The meaning of PRIM_ADDR depends
on the Addressing Mode as selected by ADMR.
Addressing ModePRIM_ADDR
No Addressing............................ Disabled
Normal Addressing .................... Primary Address
Offset 0x0C in 4882 Register SetReset Value: 0x00Read Only
0DT0DL0PRIM_ADDR[4:0]
76540
ADR0 reflects the GPIB addressing configuration of the device.
MnemonicTypeDescription
DT0RDisable Primary Talker—If DT0 is set, the primary Talker
is not enabled and PRIM_ADDR is not compared to GPIB
Talk commands. If DT0 is cleared, the primary Talker
responds to GPIB Talk commands matching PRIM_ADDR.
DL0RDisable Primary Listener—If DL0 is set, the primary
Listener is not enabled and PRIM_ADDR is not compared to
GPIB Listen commands. If DL0 is cleared, the primary
Listener responds to GPIB Listen commands matching
PRIM_ADDR.
PRIM_ADDR[4:0]RPrimary Address—The meaning of PRIM_ADDR depends
on the Addressing Mode as selected by ADMR.
Addressing ModePRIM_ADDR
No Addressing ............................N/A
Normal Addressing .....................Primary Address
Talk Only ....................................Disabled
Listen Only .................................Disabled
TNT5002 Technical Reference Manual3-52ni.com
Page 79
Chapter 3Register Descriptions
Address Write Register 1 (ADR1)
Offset 0x0C in 4882 Register SetReset Value: 0x80Write Only
1DT1DL1ADDR[4:0]
76540
ADR1 configures how the device is addressed on the GPIB. ADR1 should be configured
before clearing pon.
MnemonicTypeDescription
DT1WDisable Talker—If DT1 is set, the secondary Talker is not
enabled and ADDR is not compared to GPIB Talk commands.
If DT1 is cleared, the secondary Talker responds to GPIB Talk
commands matching ADDR.
DL1WDisable Listener—If DL1 is set, the secondary Listener is
not enabled and ADDR is not compared to GPIB Listen
commands. If DL1 is cleared, the secondary Listener
responds to GPIB Listen commands matching ADDR.
ADDR[4:0]WOther Address—Some of the Addressing Modes selected in
the ADMR require an additional address. The following table
shows the meaning of ADDR for each Addressing Mode.
Addressing ModeADR1
No Addressing............................ Disabled
Offset 0x0E in 4882 Register SetReset Value: 0x00Read Only
EOIDT1DL1ADDR[4:0]
76540
ADR1 reflects the GPIB addressing configuration of the device.
MnemonicTypeDescription
EOIREOI Received—This bit indicates the state of the EOI# line
when the most recent data byte was accepted. If EOI is set, the
EOI# line was asserted.
DT1RDisable Talker—If DT1 is set, the secondary Talker is not
enabled and ADDR is not compared to GPIB Talk commands.
If DT1 is cleared, the secondary Talker responds to GPIB Talk
commands matching ADDR.
DL1RDisable Listener—If DL1 is set, the secondary Listener is
not enabled and ADDR is not compared to GPIB Listen
commands. If DL1 is cleared, the secondary Listener
responds to GPIB Listen commands matching ADDR.
ADDR[4:0]ROther Address—Some of the Addressing Modes selected in
the ADMR require an additional address. The following table
shows the meaning of ADDR for each Addressing Mode.
Addressing ModeADR1
No Addressing ............................Disabled
TARTalk Addressed—When TA is set, the Talker state machine
is in TADS, TACS, or SPAS.
MINORRMajor/Minor—In normal dual addressing mode or extended
dual addressing mode, MINOR indicates whether the
information in the ADSR bits apply to the major or minor
Talker and Listener state machines. The major address is the
address written to ADR0. The minor address is the address
written to ADR1. MINOR sets when the last addressing
command received was for the minor address. MINOR clears
when the last addressing command received was for the major
address. Minor never sets in other modes.
TNT5002 Technical Reference Manual3-56ni.com
Page 83
Chapter 3Register Descriptions
Auxilliary Mode Register (AUXMR)
Offset 0x0A in 4882 Register SetReset Value: 0x00Write Only
AUXMR_CMD
70
The AUXMR is used to issue auxiliary commands to the device. Once a command is written
to the AUXMR, it affects some part of the circuit and another command may be written
immediately afterwards. All commands not appearing in the following table are reserved.
AUXMR
Command
CH_RST0x02Chip Reset—CH_RST asserts the local pon message.
Va lu eDescription
The pon message logically disconnects the TNT5002
from the GPIB. In addition, CH_RST:
• Clears all bits in SPMR, AUXRA, AUXRB, AUXRE,
AUXRF, AUXRG, AUXRI, AUXRJ, AUXRK, BCR,
MISC, HIER, EOSR and PT1.
• Clears the ist parallel poll flag
• Sets the PPMODE1 bit in PPR
Refer to Chapter 8, Reset Considerations, for more
information about reseting the TNT5002.
CLR_ADSC0x5BClear ISR2[ADSC]—When AUXRI[SISB] is set,
CLR_ADSC is used to clear ISR2[ADSC].
CLR_ATNI0x5DClear ISR0[ATNI]—When AUXRI[SISB] is set,
CLR_ATNI is used to clear ISR0[ATNI].
CLR_DEC0x56Clear ISR1[DEC]—When AUXRI[SISB] is set,
CLR_DEC is used to clear ISR1[DEC].
CLR_DET0x54Clear ISR1[DET]—When AUXRI[SISB] is set,
CLR_DET is used to clear ISR1[DET].
CLR_END0x55Clear ISR1[END]—When AUXRI[SISB] is set,
CLR_END is used to clear ISR1[END].
CLR_ERR0x57Clear ISR1[ERR]—When AUXRI[SISB] is set,
CLR_IFCI0x5CClear ISR0[IFCI]—When AUXRI[SISB] is set,
CLR_IFCI is used to clear ISR0[IFCI].
CLR_SRQI0x58Clear ISR2[SRQI]—When AUXRI[SISB] is set,
CLR_SRQI is used to clear ISR2[SRQI].
CLR_LOKC0x59Clear ISR2[LOKC]—When AUXRI[SISB] is set,
CLR_LOKC is used to clear ISR2[LOKC].
CLR_REMC0x5AClear ISR2[REMC]—When AUXRI[SISB] is set,
CLR_REMC is used to clear ISR2[REMC].
CLR_SYNC/
SET_SYNC
0x5E/0x5FClear/Set ISR0[SYNC]—CLR_SYNC and SET_SYNC
are used to set and clear ISR0[SYNC].
HLDI0x51Holdoff Immediately—HLDI prevents the Acceptor
state machine from transitioning from ANRS to ACRS.
NRFD# remains asserted in ANRS causing an RFD
holdoff.
INVALID0x07Release DAC Holdoff (Invalid)—INVALID releases a
DAC holdoff. If ISR1[APT] is set, the command that
caused the DAC holdoff is interpreted as an Other
Secondary Address (OSA).
IST/~IST0x09/0x01Set/Clear Parallel Poll Flag (ist)—IST and ~IST set and
clear the Parallel Poll Flag (ist). Refer to the Parallel Poll
Response Manager section of Chapter 4, Functional
Description—PCI4882 and GEN4882 Modes, for more
information.
LTN_CONT0x1BListen in Continuous Mode—LTN_CONT asserts the
local ltn message and also sets Continuous Holdoff
mode, regardless of AUXRA[HOLDOFFMODE].
If Continuous Holdoff mode was set by LTN_CONT,
that holdoff mode will remain selected until the device
becomes unaddressed to listen or LTN is issued.
LUL0x0CUnlisten—LUL forces the Listener state machine into
LIDS.
LUN0x1CLocal Unlisten—LUN causes the Listener state machine
to enter LIDS if the Controller state machine is in CACS.
LUT0x0BUntalk—LUT forces the Talker state machine into TIDS.
TNT5002 Technical Reference Manual3-58ni.com
Page 85
Chapter 3Register Descriptions
AUXMR
Command
Va lu eDescription
PAG EI N0x50Page-in Registers—This command is implemented only
for backwards compatibility reasons.
PON0x00Pulse Pon—The PON command sets the local pon
message for 1 clock cycle, then clears pon.
PULSE_RTL0x05Pulse Return to Local—PULSE_RTL sets the rtl local
message for one clock cycle (if rtl is not already set), then
clears rtl.
Offset 0x0A in 4882 Register SetReset Value: 0x80Write Only
100BINXEOSREOSHOLDOFFMODE[1:0]
76543210
AUXRA controls the EOS and END GPIB Remote Messages and specifies the RFD Holdoff
mode.
MnemonicTypeDescription
BINWBinary EOS—BIN selects whether the EOSR represents
an 8-bit binary number or a 7-bit ASCII character. When
BIN is set, the EOSR is treated as an 8-bit value. All 8 bits
of a data byte must match EOSR to generate the END
condition. When BIN is cleared, the EOSR is treated as a
7-bit value. Only the lower 7 bits of a data byte must match
the EOSR to generate the END condition.
XEOSWTransmit END with EOS—XEOS permits or prohibits
automatic transmission of the GPIB END message at the
same time as the EOS message when in TACS. If XEOS
is set and the byte being sourced onto the GPIB matches
the contents of the EOSR, EOI# is sent true along with the
data. Setting CFG[CCEN] is the preferred way of sending
EOI# during transfers.
REOSWEnable EOS when Receiving—When REOS is set, each
byte received is compared to the EOSR to detect the END
condition. When REOS is cleared, data bytes received are
not compared to the EOSR to detect the END condition.
HOLDOFFMODE[1:0]WAcceptor Holdoff Mode—When receiving data bytes,
HOLDOFFMODE affects how the local rdy message is
generated.
HOLDOFFMODE[1:0]Holdoff Mode
00........................ Normal
01........................ RFD Holdoff on All Data
10........................ RFD Holdoff on END
11........................ Continuous
TNT5002 Technical Reference Manual3-60ni.com
Page 87
Chapter 3Register Descriptions
Auxiliary Register B (AUXRB)
Offset 0x0A in 4882 Register SetReset Value: 0xA0Write Only
101
76543210
ISS
0
TRISPEOICPT_ENABLE
AUXRB affects several different circuits. Refer to individual register bit descriptions.
MnemonicTypeDescription
ISSWIndividual Status Select—The value of the Parallel Poll Flag
is used as the local ist message when AUXRB[ISS] is cleared.
The value of SRQS is used as the local ist message when
AUXRB[ISS] is set.
TRIWEnable 500ns T1 Delay—TRI affects the duration of the T1
delay.
SPEOIWSend END During Serial Polls—When SPEOI is set, EOI#
is asserted with all serial poll responses.
CPT_ENABLEWCommand Pass Through Enable—CPT_ENABLE is set to
allow the detection of undefined commands and to set
ISR1[CPT]. Clearing CPT_ENABLE clears ISR1[CPT] and
prevents detecting undefined commands.
Offset 0x0A in 4882 Register SetReset Value: 0xC0Write Only
1100DHADTDHADCDHDTDHDC
76543210
Setting each bit in the AUXRE causes a DAC holdoff whenever a particular command is
received.
MnemonicTypeDescription
DHADTWDAC Holdoff on GET Commands—DHADT causes a DAC
holdoff whenever the GET command is received.
DHADCWDAC Holdoff on DCL or SDC Command—DHADC
causes a DAC holdoff whenever the DCL or SDC command
is received.
DHDTWDAC Holdoff on Device Trigger—DHDT causes a DAC
holdoff whenever the Device Trigger command is received
(GET when the device is listen addressed).
DHDCWDAC Holdoff on Device Clear—DHDC causes a DAC
holdoff whenever the Device Clear command is received
(either SDC when the device is listen addressed or DCL).
TNT5002 Technical Reference Manual3-62ni.com
Page 89
Chapter 3Register Descriptions
Auxiliary Register F (AUXRF)
Offset 0x0A in 4882 Register SetReset Value: 0xD0Write Only
1101DHATADHALADHUNTLDHALL
76543210
Setting each bit in the AUXRF causes a DAC holdoff whenever a particular command is
received.
MnemonicTypeDescription
DHATAWDAC Holdoff on All Talk Addresses—DHATA causes a
DAC holdoff on all commands in the range 0x40 to 0x5E
inclusive. DIO8 is ignored for all command bytes. When
performing a DAC holdoff due to DHATA, ISR1[CPT] sets.
DHALAWDAC Holdoff on All Listen Addresses—DHALA causes a
DAC holdoff on all commands in the range 0x20 to 0x3E
inclusive. DIO8 is ignored for all command bytes. When
performing a DAC holdoff due to DHALA, ISR1[CPT] sets.
DHUNTLWDAC Holdoff on UNT and UNL—DHUNTL causes a DAC
holdoff on the UNT and UNL commands. DIO8 is ignored on
all command bytes. When performing a DAC holdoff due to
DHUNTL, ISR1[CPT] sets.
DHALLWDAC Holdoff on All UCG, ACG, and SCG
Commands—DHALL causes a DAC holdoff on all
commands in the ranges 0x00 to 0x1F inclusive and 0x60 to
0x7F inclusive. DIO8 is ignored on all command bytes. When
performing a DAC holdoff due to DHALL, ISR1[CPT] sets.
Offset 0x0A in 4882 Register SetReset Value: 0x40Write Only
0100000CHES
76543210
AUXRG affects several different circuits. Refer to individual register bit descriptions.
MnemonicTypeDescription
CHESWChange Holdoff on END Behavior—CHES prevents an
RFD holdoff after receiving END when in normal holdoff
mode. Normally when an END byte is received, Acceptor End
Holdoff State (AEHS) is entered. AEHS is cleared when
AUXMR[RHDF] is issued. When CHES is set, AEHS is
immediately cleared when in normal holdoff mode.
TNT5002 Technical Reference Manual3-64ni.com
Page 91
Chapter 3Register Descriptions
Auxiliary Register I (AUXRI)
Offset 0x0A in 4882 Register SetReset Value: 0xE0Write Only
1110USTDPPMODE20SISB
76543210
AUXRI affects several different circuits. Refer to individual register bit descriptions.
MnemonicTypeDescription
USTDWEnable 1100ns T1 Delay—USTD effects the duration of the
T1 delay.
PPMODE2WParallel Poll Mode 2—This bit, together with
PPR[PPMODE1], determine how the device is configured for
parallel polls. Refer to Parallel Poll Response Manager
section of Chapter 4, Functional Description—PCI4882 and
GEN4882 Modes, for a description of this bit.
SISBWStatic Interrupt Bits—SISB controls the conditions that
clear the bits in ISR0, ISR1, and ISR2. If SISB is cleared,
reading one of these registers clears the bits in that register.
If SISB is set, the bits are cleared as described in this manual.
SISB should normally be set.
Offset 0x0A in 4882 Register SetReset Value: 0xF0Write Only
1111TM[3:0]
765430
AUXRJ and AUXRK implement a general-purpose timer that can cause an interrupt. The
timer can also be used in byte timeout mode. In this mode the timer restarts each time a byte
is read from or written to the GFIFO.
MnemonicTypeDescription
TM[3:0]WTimer—TM[3:0], together with AUXRK[TM[5:4]]
determines the timeout duration of the timer. The timeout
duration depends on the input clock frequency. The table in
the following section, Auxiliary Register K (AUXRK), shows
the timeout duration assuming a 40 MHz clock. For other
clock frequencies, the timeout duration can be scaled by the
ratio of the frequencies.
TNT5002 Technical Reference Manual3-66ni.com
Page 93
Chapter 3Register Descriptions
Auxiliary Register K (AUXRK)
Offset 0x0F in 4882 Register SetReset Value: 0x00Write Only
000000TM[5:4]
765430
AUXRJ and AUXRK implement a general-purpose timer that can cause an interrupt. The
timer can also be used in byte timeout mode. In this mode the timer restarts each time a byte
is read from or written to the GFIFO.
MnemonicTypeDescription
TM[5:4]WTimer—TM[5:4], together with AUXRJ[TM[3:0]]
determines the timeout duration of the timer as specified in
the following table. The timeout duration depends on the
input clock frequency. The table shows the timeout duration
assuming a 40 MHz clock. For other clock frequencies, the
timeout duration can be scaled by the ratio of the frequencies.
Offset 0x1F in 4882 Register SetReset Value: 0x00Write Only
0DAVNDACNRFDEOISRQ00
76543210
The BCR allows the GPIB Interface Management and Handshake signals to be arbitrarily
asserted.
MnemonicTypeDescription
DAV
NDAC
NRFD
EOI
SRQ
W
W
W
W
W
GPIB Control Bits—Writing a bit in the BCR causes the
corresponding GPIB signal to assert (unless MISC[WRAP]
is set). The TNT5002 can’t assert ATN#, IFC#, or REN#.
Offset 0x1F in 4882 Register SetReset Value: 0x00Read Only
AT NDAVNDACNRFDEOISRQIFCREN
76543210
The BSR is used to read the state of the GPIB Interface Management and Handshake signals.
MnemonicTypeDescription
AT N
DAV
NDAC
NRFD
EOI
SRQ
IFC
REN
R
R
GPIB Monitor Bits—The BSR indicates the status of the
GPIB signals.
R
R
R
R
R
R
TNT5002 Technical Reference Manual3-70ni.com
Page 97
Chapter 3Register Descriptions
GPIB Transfer Configuration (CFG)
Offset 0x10 in 4882 Register SetReset Value: 0x00Write Only
0TLCHLTEINA/BNCCEN0016/8N
76543210
The CFG register is used to configure GPIB transfers.
MnemonicTypeDescription
TLCHLTEWHalt on TLC Interrupts—TLCHLTE determines which
conditions halt the GPIB Transfer Manager (once it has been
started with the CMDR[GO]). When TLCHLTE is set, the
GPIB Transfer manager also halts when any enabled interrupt
in IMR0, IMR1, or IMR2 asserts.
When TLCHLTE is cleared, the GPIB Transfer manager halts
when the CMDR[STOP] is issued or all of the bytes specified
in the CNT3–0 registers have been transferred.
In most applications, the GPIB Transfer manager should only
be stopped in response to some of the IMR0, IMR1, or IMR2
interrupts. Typically, TLCHLTE is cleared. When an interrupt
asserts, software determines whether the interrupt should stop
the GPIB Transfer manager. CMDR[STOP] can then be
issued to stop the GPIB Transfer manager.
INWDirection—IN indicates the direction of the GPIB transfer.
For sending commands or data, IN should be cleared. IN
should be set for receiving data. Command bytes are received
regardless of the state of IN.
A/BNWFirst FIFO—When packing and unpacking data into the
FIFO in 16-bit mode, the GPIB Transfer Manager alternates
writing (or reading) between the upper and lower bytes. If
A/BN is cleared, the GPIB Transfer manager writes (or reads)
the first byte to GFIFO[7:0]. If A/BN is set, the GPIB Transfer
manager writes (or reads) the first byte to GFIFO[15:8].
CCENWSend EOI# With Last Byte—When CCEN is set and the
GPIB transfer manager is sending GPIB data, EOI# is
asserted with the last byte of the transfer.
16/8NW16-bit Wide FIFO—When 16/8N is set, the GFIFO is 16-bits
wide and may be accessed using byte or word accesses. When
16/8N is cleared, only the low-order byte of each position in
the GFIFO is used. 16/8N should always be set unless the host
is not capable of supporting 16 bit transfers to the TNT5002.
TNT5002 Technical Reference Manual3-72ni.com
Page 99
Chapter 3Register Descriptions
Command Register (CMDR)
Offset 0x1C in 4882 Register SetReset Value: 0x00Write Only
CMDR_CMD
70
The CMDR is used to issue commands to the device. Once a command is written to the
CMDR, it affects some part of the circuit and another command may be written immediately
afterwards. All commands not appearing in the following table are reserved.
CMDR CommandVa lu eDescription
GO0x04Go—The GO command starts the GPIB Transfer
manager. GO clears the internal HALT signal. When
HALT is set, the local nba and rdy messages become
false. HALT must be cleared to transfer data bytes.
HARD_RESET0x40Hardware Reset—Issuing HARD_RESET has the same
affect as asserting a hardware reset (PCI_RST# or
RESET#). Refer to Chapter 8, Reset Considerations,
for more information on resets.
RESET_FIFO0x10Reset FIFO—The RESET_FIFO command resets the
FIFOs to the empty state.
SC/~SC0x02/0x03Set/Clear System Control Enable—These commands
the GPIB Transfer manager. Specifically, SOFT_RESET:
• Clears all bits in CFG, HSSEL, and IMR3
• Sets DONE, STOP, HALT, and GSYNC
• Resets the GFIFO
• Configures the CNT registers for 16-bit operation
Refer to Chapter 8, Reset Considerations, for more
information on resets.
STOP0x08Stop—The STOP command stops the GPIB Transfer
manager. STOP sets the internal HALT signal. When
HALT is set, the local nba and rdy messages become
false. HALT must be cleared to transfer data bytes.