User manual

PDK Tutorial Manual
Contents
1 PAL TUTORIAL ........................................................................................................... 7
1.1
RUNNING THE PAL TUTORIAL IN SIMULATION .......................................................... 7
1.2
RUNNING THE PAL TUTORIAL IN HARDWARE ........................................................... 7
1.3
PAL TUTORIAL PART 1......................................................................................... 8
1.3.1 Compile-time configuration...................................................................................................... 8
1.3.2 Run-time operations................................................................................................................ 9
1.4
PAL TUTORIAL PART 2....................................................................................... 10
1.4.1 Compile-time configuration.................................................................................................... 10
1.4.2 Run-time operations.............................................................................................................. 11
1.5 PAL TUTORIAL PART 3....................................................................................... 12
1.5.1 Compile-time configuration.................................................................................................... 12
1.5.2 Run-time operations.............................................................................................................. 12
2
DSM TUTORIALS....................................................................................................... 14
2.1
DSM PATTERN MATCHING TUTORIAL .................................................................... 14
2.1.1 Running the DSM tutorial in simulation................................................................................. 14
2.1.2 Part 1 of the tutorial............................................................................................................... 15
2.1.3 Part 2 of the tutorial............................................................................................................... 16
2.1.4 Part 3 of the tutorial............................................................................................................... 17
2.2
DSM FIR FILTER TUTORIAL ................................................................................. 18
2.2.1 Introduction............................................................................................................................ 18
2.2.2 Tutorial requirements ............................................................................................................ 18
2.2.3 System design....................................................................................................................... 19
2.2.4 Simulating the tutorial............................................................................................................ 22
2.2.5 Running the tutorial in hardware ........................................................................................... 24
3
PLATFORM SUPPORT LIBRARY TUTORIAL.................................................................... 28
3.1
INTRODUCTION.................................................................................................... 28
3.2
USING PAL........................................................................................................ 28
3.3
CREATING A PSL................................................................................................ 29
3.4
DESIGNING A DEVICE DRIVER ............................................................................... 29
3.4.1 Device driver design flow ...................................................................................................... 30
3.4.2 Example device drivers ......................................................................................................... 31
3.4.3 Encapsulating drivers in a PSL ............................................................................................. 43
4
TUTORIAL: HANDEL-C AND PSL BASICS..................................................................... 44
4.1
HANDEL-C LANGUAGE BASICS............................................................................. 45
4.1.1 Use of parallel code............................................................................................................... 45
4.1.2 Channel communications...................................................................................................... 47
4.1.3 Bit manipulation examples .................................................................................................... 49
4.1.4 Using signals......................................................................................................................... 52
4.2
CREATING A DEVICE DRIVER................................................................................. 53
4.2.1 Example device driver: seven-segment display.................................................................... 53
4.2.2 Seven-segment display hardware interface.......................................................................... 54
4.3
USING PAL TO CREATE A GENERIC DEVICE DRIVER................................................ 55
4.3.1 Setting up a PAL workspace ................................................................................................. 55
4.3.2 Seven-segment project in PAL..............................................................................................61
5
TUTORIAL: HANDEL-C AND VGA GRAPHICS OUTPUT ................................................... 63
5.1
GENERATING VGA GRAPHICS.............................................................................. 63
5.2
RESPONDING TO USER INPUT ............................................................................... 65
www.celoxica.com
Page 3