beautypg.com

Digilent Port Communications User Manual

Page 9

background image

Digilent, Inc

TM

DPCUTIL Programmer’s Manual

www.digilentinc.com

© Digilent, Inc.

Page

9 of 14

rgbSend[0]

TMS 4

TDI 4

TMS 3

TDI 3

TMS 2

TDI 2

TMS 1

TDI 1


rgbSend[1]

MS 8

TDI 8

TMS 7

TDI 7

TMS 6

TDI 6

TMS 5

TDI 5


If fReturnTdo is set to true, all bits
shifted out are stored in rgbRcv Tdo.
Each bit is shifted out sequentially
starting at the first element in the
rgbRcv, from lowest significant bit to
most significant bit. TMS is held at the
value specified by bitTms while bits are
being shifted into TDI.


BOOL DpcPutTmsTdiBits(HANDLE hif, int cbit,
BYTE * rgbSnd, BOOL fReturnTdo, BYTE *
rgbRcv, ERC * perc, TRID * ptrid)

Parameters
hif

-

handle to JTAG

interface
cbit

-

number of TMS

and TDI bit pairs sent.

rgbSnd

-

buffer that holds

TMS and TDI bit pairs.
fReturnTdo

-

specifies if bits

from TDO should be returned
rgbRcv

-

(optional) holds

shifted out TDO bits. Only used if
fReturnTdo is true.
perc

-

pointer to store

error code
ptrid

-

pointer to store

transaction ID. If ptrid is NULL, this
function will be

blocking.

Return Values
Returns true if successful. Returns
false otherwise.
Description
Shifts a specified number of bits into
TMS and TDI and (optionally) returns
bits shifted out of TDO. RgbSend holds
TMS and TDI bit pairs. Each bit pair is
shifted in sequentially; starting at the
first element in the array, from least

significant bit pair to most significant bit
pair. In each pair, the TMS value is the
MSB and the TDI value is the LSB.
Below is an example of how the
TMS/TDI bit pairs are placed in each
byte of rgbSend.



If fReturnTdo is set to true, all bits
shifted out are stored in rgbRcv Tdo.
Each bit is shifted out sequentially
starting at the first element in the
rgbRcv, from lowest significant bit to
most significant bit.


BOOL DpcGetTdoBits(HANDLE hif, int cbits,
BOOL bitTdi, BOOL bitTms, BYTE *rgbRcv,
ERC *perc, TRID *ptrid)

Parameters
hif

-

handle to JTAG

interface
cbit

-

number of TMS

and TDI bits to push onto the JTAG
TAP controller
bitTdi

-

value TDI pin will

be held at (true = 1, false = 0)
bitTms

-

value TMS pin

will be held at (true = 1, false = 0)
rgbRcv

-

holds shifted out

TDO bits.
perc

-

pointer to store

error code
ptrid

-

pointer to store

transaction ID. If ptrid is NULL, this
function will be

blocking.


Return Values
Returns true if successful. Returns
false otherwise.

Description