User manual
RC200/203 Manual
www.celoxica.com Page 40
a DCM will be used in frequency synthesis mode to generate the nearest approximation
to the desired frequency (from a base of 50MHz). Note that the performance of
generated clocks, in terms of parameters like jitter, may be worse than native clock
frequencies. For more details about the DCM, consult the Xilinx Data Book.
Below 24MHz, Handel-C clock dividers will be used to divide the frequency down (since
this is the lower bound of the DCM clock synthesis). This is handled transparently. The
range of target frequencies is from 2MHz to 300MHz, but please note that the achievable
frequency is design-dependent and will typically be much lower than 300MHz.
5.2.3 Checking the clock rate
RC200_ACTUAL_CLOCK_RATE
Description
You can define a target clock rate using the RC200_TARGET_CLOCK_RATE() macro. To
determine the actual clock rate of your design, use the compile-time definition:
RC200_ACTUAL_CLOCK_RATE
5.3 Detecting the board type
extern macro expr RC200BoardIsExpert ();
Description
Returns a compile-time constant Boolean to indicate whether the board is an "Expert"
model featuring expanded RAM, Bluetooth, LCD and touch screen.
You can use this to determine which board your code should be compiled for. For
example, you could use an
if...select statement to choose code specific to Expert
boards.
5.4 LED macros
The LED macros target the blue LEDs on the RC200. The green LEDs on the RC200 are
controlled by the CPLD and cannot be programmed.
To turn the blue LEDs on and off, you can either use
RC200LEDWrite() and set Index to
0 to target LED0 or to 1 to target LED1, or you can use one of the
RC200LED*Write()
macros to target a specific LED. To control both LEDs at once, use
RC200LEDWriteMask.
5.4.1 RC200LEDWrite()
extern macro proc RC200LEDWrite (Index, Value);