Digilent Port Communications User Manual

Digilent Hardware

Advertising
background image

D

D

i

i

g

g

i

i

l

l

e

e

n

n

t

t

P

P

o

o

r

r

t

t

C

C

o

o

m

m

m

m

u

u

n

n

i

i

c

c

a

a

t

t

i

i

o

o

n

n

s

s

P

P

r

r

o

o

g

g

r

r

a

a

m

m

m

m

e

e

r

r

s

s

R

R

e

e

f

f

e

e

r

r

e

e

n

n

c

c

e

e

M

M

a

a

n

n

u

u

a

a

l

l

TM

w w w . d i g i l e n t i n c . c o m

Revision: 06/03/05

215 E Main SuiteD | Pullman, WA 99163

(509) 334 6306 Voice and Fax

© Digilent, Inc.

Doc: 576-000

Introduction


The DPCUTIL Dynamic Link Library (DLL)
provides an Applications Programming
Interface (API), allowing Digilent system
boards to communicate with applications
software running under Microsoft Windows on
a host computer.

When using DPCUTIL DLL a Digilent
Communication Module is requred to create a
communications channel between the host PC
and a system board. Digilent currently provides
communications modules supporting Ethernet,
USB 2.0, and Serial RS-232 communication
protocols.

The DPCUTIL API has functions for controlling
and communicating with the scan chain of
JTAG devices connected to a Digilent board.
The DPCUTIL API can also send and recieve
data to and from the user logic configured into
the gate array on a connected Digilent board.

The JTAG scan chain manipulation functions
are primarily for configuration of the
programmable logic devices in the scan chain.
The JTAG scan chain manipulation functions
can also be used to access to the boundary
scan registers in the device scan chain for
loading of test vectors, the read back of test
results, and other manipulations of the JTAG
scan chain supported by the attached devices.

The DPCUTIL data transfer functions require
that the gate array configuration contain a
parallel port interface compatible with the
Digilent Parallel Interface Module specification
and reference design, available on the Digilent
web site, at www.digilentinc.com. This
interface allows the user to define a set of
addressable registers that can be accessed by
the DPCUTIL data transfer API functions. The
data transfer API functions allow for writing or
reading a single register, writing or reading
sets of registers, or reading or writing a stream
of data into or out of a single register.


The DPCUTIL DLL was created and compiled
using the Microsoft C++ compiler in Visual
Studio 6. The API is defined as a set of C
callable functions, and can be used with
programs written in either C or C++. It is also
possible to write programs using Microsoft
Visual BASIC to access the DPCUTIL API
functions, but Digilent does not provide
technical support for this use.

Overview


The Components

In order to use any of the DPCUTIL API
functions, a program source module must
include the following header files in this order:
#include <windows.h>
#include “dpcdefs.h”
#include “dpcutil.h”


These header files should be placed in a
directory visible to the compiler. The files
should include a path for the development
environment that causes the compiler to
search the appropriate directory at compilation
time.

The program must be linked with the dpcutil.lib
library. This establishes the dynamic link
references between the application program
and the DPCUTIL dynamic link library. This
library file should be placed in a directory
visible to the linker and the linker library search
path set in the development environment to
cause the linker to search the appropriate
directory at program link time.

The DPCUTIL Dynamic Link Library
(dpcutil.dll) must be in a directory that is
searched by the operating system at program
run time. The DLL file should either be placed
in the same directory as the application
program, or in a directory that is listed on the
operating system PATH environment variable.
When a program is executed, the operating
system will look for dynamic link libraries in the

Advertising