User manual
Tutorial: Handel-C and PSL basics
static macro proc Sleep (Milliseconds)
{
#ifdef USE_SIM
macro expr Cycles = (10000 * Milliseconds) / 1000;
#else
macro expr Cycles = (ClockRate * Milliseconds) / 1000;
#endif
unsigned (log2ceil (Cycles)) Count;
Count = 0;
do
{
Count++;
}
while (Count != Cycles - 1);
}
The figure below shows the
GraphicsDemo2 project running in simulation on the PalSim Virtual Platform.
To run the example yourself, open the
TutorialVGA workspace (Start>Programs>Celoxica>Platform
Developer's Kit
>Tutorials>TutorialVGA on the Start Menu), set GraphicsDemo2 as the active project, set the
Active Configuration to Sim, then build and run the project. For a Celoxica RC200 board with a VGA
monitor connected, set the Active Configuration to RC200, rebuild, then use the Place and Route tools
to generate a bitfile to download to the board.
PALSIM RUNNING GRAPHICSDEMO2
www.celoxica.com
Page 67