User manual
PAL tutorial
printf ("Output = %d\n", Output);
#if defined WIN32 || defined __MICROBLAZE__
if (i != 0)
{
SetColor (LIGHTGREEN); /* draw input by green */
Line (i - 1, Input[i-1] + HEIGHT/2, i,Input[i] + HEIGHT/2);
SetColor (LIGHTRED); /* draw output by red */
Line (i - 1, OldOutput + HEIGHT/2, i, Output + HEIGHT/2);
}
OldOutput = Output;
#endif
/* Flush remaining writes */
DsmFlush (PlotPortS2H);
/* Shutdown */
DsmPortS2HClose (FirPortS2H);
DsmPortH2SClose (FirPortH2S);
DsmPortS2HClose (VideoPortS2H);
DsmPortH2SClose (VideoPortH2S);
DsmExit (Instance);
/* Exit cleanly */
return 0;
}
The samples of input waveform are defined in the
samples.h header file. The reading from and writing
to ports is done using the
DsmRead() and DsmWrite() functions. The application must be linked with
the libraries listed below:
Library name Description Platform
libdsmmicroblaze_dma_rc100.a
DSM library for MicroBlaze running on
RC200 and using DMA engine.
MB_RC200
libmbdsmgraphics.a
Simple graphic library for MicroBlaze
using DSM interface.
MB_RC200
librcx00microblaze.a
Library for send protocol and standard
input from keyboard connected to RC100
or RC200 board.
MB_RC200,
MB_RC100
libdsmv2pro.a
DSM library for PPC running in Virtex-II
Pro devices.
MV2P
libmv2p.a
Library for standard input using serial
port (UART).
2.2.4 Simulating the tutorial
The DSM FIR filter tutorial can be run in simulation using the DSM Sim Virtual Platform.
1. Open the tutorial
DK workspace as described above.
2. Right-click the
DsmFIR project in the left pane and select Set Active Project.
3. Choose to target the
Sim platform (Build>Set Active Configuration).
4. Build the project by pressing F7.
5. Begin the simulation by pressing F5. A console window will open but will not generate any
output.
www.celoxica.com
Page 22