User manual

RC200/203 Manual
www.celoxica.com Page 38
5 RC200/203 PSL reference
The RC200/203 Platform Support Library is provided as part of the Platform Developer's
Kit. Throughout this documentation "RC200" should be taken to refer to both RC200 and
RC203 unless explicitly noted otherwise.
This Library targets both RC200 and RC203 boards although there are four slightly
different versions:
rc200.hcl targets the Standard and Professional versions of the RC200
rc200e.hcl targets the Expert version of the RC200.
rc203.hcl targets the Standard and Professional versions of the RC203
rc203e.hcl targets the Expert version of the RC203.
rc200.hch header is used for all RC200 and RC203 boards
The library files are installed in
InstallDir\PDK\Hardware\Lib\, with the
corresponding header file in
InstallDir\PDK\Hardware\Include\.
The RC200 Platform Support Library (PSL) simplifies the process of programming the
FPGA to target the devices connected to it on the RC200 board. It also allows you to
configure the FPGA from SmartMedia, and send data between the FPGA and host PC.
For information on the RC200 devices, refer to the RC200 Hardware guide.
5.1 Using the RC200 PSL
Check that the DK library and include paths are set to InstallDir\PDK\Hardware\Lib
and
InstallDir\PDK\Hardware\Include. You can set these in the Tools>Options>Directories
dialog in DK.
Before you include the library in your source code, you need to set the clock using one of
these 4 preprocessor macros:
RC200_CLOCK_USER, RC200_CLOCK_EXPCLK0,
RC200_CLOCK_EXPCLK1 or RC200_TARGET_CLOCK_RATE.
After you have set the clock, include rc200.hch, which can be used for all board types.
For example, if you were targeting the Standard RC200 and wanted a clock rate of
50MHz:
#define RC200_TARGET_CLOCK_RATE = 50000000
#include "rc200.hch"