Celoxica RC200 Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro Software Celoxica RC200. Celoxica RC200 User manual Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 130
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků

Shrnutí obsahu

Strany 1 - PDK Tutorial Manual

Platform Developer’s Kit PDK Tutorial Manual

Strany 2

PAL tutorial PalVideoOutWrite (VideoOut, {24-bit expression}); Getting run-time information from the resource Some PAL resources return run-time in

Strany 3 - Contents

Tutorial: Using the logic estimator 9 FIR Tutorial The FIR tutorial illustrates how to implement a FIR (Finite Impulse Response) filter using Handel

Strany 4

Tutorial: Using the logic estimator When the coefficients are symmetrical, pairs of samples taken from the start and end of the series can be added

Strany 5 - Conventions

Tutorial: Using the logic estimator /* * Structure of variables to interface to FIR filter */ struct _FirStruct { unsigned 1 InputValid; u

Strany 6 - Assumptions & Omissions

Tutorial: Using the logic estimator The FirFilter macro contains the code to perform the actual FIR filtering. Before the filter starts operation, t

Strany 7 - 1 PAL tutorial

Tutorial: Using the logic estimator par { FirPtr->Output = Accumulator; FirPtr->OutputValid = 1; } The main function in fir1.hcc is se

Strany 8 - 1.3 PAL Tutorial Part 1

Tutorial: Using the logic estimator SETTING THE CHIP TYPE Now select the Synthesis tab and ensure that the settings are exactly as shown below, with

Strany 9 - 1.3.2 Run-time operations

Tutorial: Using the logic estimator Finally, select the Linker tab, and check that Generate estimation info is enabled. LINKER SETTINGS www.celoxi

Strany 10 - 1.4 PAL Tutorial Part 2

Tutorial: Using the logic estimator Now rebuild the project for EDIF, and open Summary.html in the folder PDK/Tutorials/General/TutorialFIR/Version1

Strany 11 - 1.4.2 Run-time operations

Tutorial: Using the logic estimator The replicated par{} builds a copy of the line of code it contains for every tap in the FIR, and all the lines a

Strany 12 - 1.5 PAL Tutorial Part 3

Tutorial: Using the logic estimator A more efficient adder tree in terms of logic delay is shown below: result7 6 5 4 3 2 1 0 IMPROVED ADDER TREE Sh

Strany 13

PAL tutorial macro expr UsingButtons = PalSwitchCount () > 1; macro expr UsingMouse = !UsingButtons && (PalPS2PortCount () > 0); The

Strany 14 - 2 DSM tutorials

Tutorial: Using the logic estimator LOGIC ESTIMATION SUMMARY FOR VERSION2 PROJECT LONGEST PATH SUMMARY FOR VERSION2 PROJECT The RecurseAdd macro ex

Strany 15 - 2.1.2 Part 1 of the tutorial

Tutorial: Using the logic estimator The logic estimator summary and longest path is shown below. This summary can be viewed by building the project

Strany 16 - 2.1.3 Part 2 of the tutorial

Tutorial: Using the logic estimator the adder tree. Note that the logic area in the Estimator Summary is larger for the Version2 and Version3 projec

Strany 17 - 2.1.4 Part 3 of the tutorial

Tutorial: Using the logic estimator struct _FirStruct { signed Input; signed Output; signed Coeffs[]; }; macro proc FirWrite (FirPtr, Da

Strany 18 - 2.2 DSM FIR filter tutorial

Tutorial: Using the logic estimator LOGIC ESTIMATION SUMMARY FOR VERSION3 PROJECT 9.5 Reducing logic area There is one final optimization which we

Strany 19 - 2.2.3 System design

Tutorial: Using the logic estimator FIR TAKING ADVANTAGE OF SYMMETRICAL COEFFICIENTS The FIR filter can easily be modified to take advantage of symm

Strany 20

Tutorial: Using the logic estimator In the summary from the Logic Estimator below, the hardware usage can be seen to be significantly reduced from

Strany 21

Tutorial: Using the logic estimator 9.6 Using ALU Mapping One of the new features introduced in DK 3.0 was ALU Mapping. This is only supported on FP

Strany 22

Tutorial: Using the logic estimator Open the alumapping1 project in the TutorialFIR workspace, accessible from Start>Programs>Celoxica>Plat

Strany 23

Tutorial: Using the logic estimator Compared to the summary for the previous project (Reducing logic area), it can be seen that the number of LUTs a

Strany 24

PAL tutorial 1.5 PAL Tutorial Part 3 The Part3 project in the PAL tutorial describes how to use an external RAM. The RAM is initialized and run from

Strany 25

Tutorial: Using the logic estimator LONGEST PATH SUMMARY FOR ALUMAPPING1 PROJECT Our goal is now to reduce the delay on this path further. We will d

Strany 26

Tutorial: Using the logic estimator To simplify the Handel-C code required to implement this adder tree, we will declare a 2-dimensional array, as w

Strany 27

Tutorial: Using the logic estimator Open the alumapping2 project in the TutorialFIR workspace, accessible from Start>Programs>Celoxica>Plat

Strany 28 - 3.2 Using PAL

Tutorial: Using the logic estimator The longest path is now through the multiplier again, but as this is now an embedded ALU, it is not possible to

Strany 29 - 3.3 Creating a PSL

Tutorial: Using the logic estimator The next step is to switch on the retimer. The settings for retiming are accessed through the Project->Settin

Strany 30 - DSM tutorials

Tutorial: Using the logic estimator RETIMER OUTPUT DURING BUILD In this you can see that the retimer has found a path with a delay of 27.31ns - whic

Strany 31 - 3.4.2 Example device drivers

Tutorial: Using the logic estimator 9.9 Improving performance with retiming The previous version of the FIR (Using Retiming) used retiming but did n

Strany 32

Tutorial: Using the logic estimator www.celoxica.com Page 127

Strany 34

FIR Tutorial 10 Index A add tree...107, 114 ALU Mapping...93, 117, 119 arra

Strany 35

PAL tutorial par { PalVideoOutRun (VideoOut); PalFastRAMRun (FastRAM); // main program here } Enabling the RAM resource Once the RAM

Strany 36

FIR Tutorial device drivers 29, 30 examples 28, 31, 32, 38 tutorials 28 R RAM use...72 recursi

Strany 37

PAL tutorial 2 DSM tutorials There are two Data Stream Manager tutorials: • Pattern matching tutorial: a simple example, targeting the DSM Simulati

Strany 38

PAL tutorial 6. Open the tutorial MSVC workspace: Start>Programs> Celoxica>Platform Developer's Kit>DSM>DSM Tutorial Workspace

Strany 39

PAL tutorial DsmInstance *Instance; DsmPortS2H *DataOutPort; DsmPortH2S *MatchInPort; int DsmTutorial (DsmInterface Interface, void *InterfaceData

Strany 40

PAL tutorial DsmInstance *Instance; DsmPortS2H *DataOutPort; DsmPortS2H *PatternOutPort; DsmPortH2S *MatchInPort; int DsmTutorial (DsmInterface

Strany 41

PAL tutorial 2.2 DSM FIR filter tutorial 2.2.1 Introduction The DSM FIR filter tutorial connects a FIR filter to a processor using DSM. The applicat

Strany 42

PAL tutorial • RS-232 Serial cable Optionally from MathWorks for MV2P Target: • MATLAB 7.0.1 (Release 14). Other versions might work, but have not

Strany 43

PDK Tutorial Manual Celoxica, the Celoxica logo and Handel-C are trademarks of Celoxica Limited. All other products or services mentioned herein may

Strany 44

PAL tutorial FIRFilter (FIRPortH2S, FIRPortS2H); DsmVideo (VideoPortS2H, VideoPortH2S, VideoPL1RAM, PAL_ACTUAL_CLOCK_RATE); } DSM FIR filte

Strany 45 - 4.1 Handel-C language basics

PAL tutorial (unsigned) adjs (Output, width(DsmWord))); DsmFlush (PortH2S); } } }

Strany 46

PAL tutorial printf ("Output = %d\n", Output); #if defined WIN32 || defined __MICROBLAZE__ if (i != 0) {

Strany 47 - 4.1.2 Channel communications

PAL tutorial 6. Open the MSVC Examples workspace from the start menu: Start>Programs> Celoxica>Platform Developer's Kit>DSM>DSM

Strany 48

PAL tutorial DSM SIM MONITOR CONTENTS 2.2.5 Running the tutorial in hardware The DSM FIR filter tutorial workspace is configured to automatical

Strany 49

PAL tutorial Building the hardware side 1. Make sure that the board is connected to your PC with a parallel cable before you build the hardware. 2.

Strany 50

PAL tutorial Building the software side The software is built before generation of the BIT file. You must run the terminal program before the BIT fi

Strany 51

PAL tutorial 6. You can compare the results gnerated from the board with the results generated in matlab by running the dsm_fir_ref.m script. MATL

Strany 52 - 4.1.4 Using signals

DSM tutorials 3 Platform Support Library tutorial 3.1 Introduction A Platform Support Library (PSL) is a Handel-C library containing functions for c

Strany 53 - 4.2 Creating a device driver

DSM tutorials 3.3 Creating a PSL To create a PSL you compile the device drivers that match the peripherals on your target platform into a Handel-C

Strany 54

PDK Tutorial Manual Contents 1 PAL TUTORIAL ...

Strany 55

DSM tutorials • How fast does it need to run • Can it function independently of the system clock frequency • Can you perform multiple instantiati

Strany 56

DSM tutorials Step 4: Implement procedures for the device interface Wrap communication with the Handel-C interfaces inside macro procedures. You sho

Strany 57

DSM tutorials Now define a Handel-C interface to attach this pin to a Handel-C variable. Use the Handel-C bus_out interface as the pin is an output

Strany 58

DSM tutorials Here are macro expressions for the RAM pins: static macro expr RAMAddrBus = {"A1", "A2","A3"

Strany 59

DSM tutorials in this example. The DK online help contains more information about timing constraints. To locate this information select the Index ta

Strany 60

DSM tutorials You can capture this equation in a Handel-C macro expression and use it to evaluate the required number of clock cycles at compile tim

Strany 61

DSM tutorials HANDEL-C RAM READ The timing for a write operation given in the data sheet corresponds to this diagram: RAM WRITE OPERATION Th

Strany 62

DSM tutorials In order to guarantee the write enable is active only when the data and address are valid, the operation must be performed over three

Strany 63 - 5.1 Generating VGA graphics

DSM tutorials macro proc RAMWrite (Address, Data) { par { seq { par { RAMAddress = A

Strany 64 - Page 64

DSM tutorials • write enable pin (input) • status pin (output) • byte enable pin (input) The device can operate in 16 bit data or 8 bit data mode

Strany 65 - 5.2 Responding to user input

PDK Tutorial Manual 5.3 ADDING MOUSE INPUT ... 68 6 TUTORIAL:

Strany 66 - Page 66

DSM tutorials The structure that contains variables shared between the server and API functions also contains expressions for the interfaces to the

Strany 67 - Page 67

DSM tutorials DataBusConnects the server to the input expression of the flash data bus interface. StatusBusConnects the server to the input expressi

Strany 68 - 5.3 Adding mouse input

DSM tutorials macro proc FlashRun (FlashPtr, ClockRate) { // Initialization sequence unsigned 3 Command; do { FlashPtr-&g

Strany 69 - Page 69

DSM tutorials macro proc FlashWriteWord (FlashPtr, Address, Data) { par { FlashPtr->APICommand ! FlashAPICommandWriteWord;

Strany 70 - Page 70

DSM tutorials static macro expr FlashAddrPins = { "A17", "D15", "C16", "D14", "E14", "A1

Strany 71 - 6.1.1 Complex statements

DSM tutorials • Making a driver portable (see page 55) 4.1 Handel-C language basics The TutorialHCBasics workspace illustrates the use of some of

Strany 72 - 6.1.2 Arrays and memories

DSM tutorials while (1) { /* * Run the two displays in parallel */ par { seq { /* * I

Strany 73 - Page 73

DSM tutorials Swapping variable values The swapexample project in the TutorialHCBasics workspace shows how the values of two variables can be exchan

Strany 74 - 6.2 Loops and control code

DSM tutorials par { while (1) { unsigned 1 Temp; do { par { Count++;

Strany 75 - Page 75

DSM tutorials The channelexample project is straightforward to run in hardware, but in simulation breakpoints must be set in each of the two paralle

Strany 76 - Page 76

PDK Tutorial Manual Conventions The following conventions are used in this document. 2 Warning Message. These messages warn you that actions may da

Strany 77 - 6.2.4 Nested control

DSM tutorials Take operator The takeexample project in the TutorialHCBasics workspace shows how to use the take bits <- operator. The source code

Strany 78 - 7.1 Pipelining

DSM tutorials while (1) { par { /* * Increment up to 15, then wrap round to 0 */ Count++;

Strany 79 - Page 79

DSM tutorials while (1) { par { /* * Increment up to 15, then wrap round to 0 */ Count++;

Strany 80 - Page 80

DSM tutorials unsigned 4 Count1; unsigned 4 Count2; unsigned 4 Count3; signal <unsigned 4> CountSig; while (1) { /* * Increment up t

Strany 81 - Page 81

DSM tutorials BLOCK DIAGRAM 4.2.2 Seven-segment display hardware interface First define macro expressions for the pins which the seven-segment disp

Strany 82 - Page 82

DSM tutorials macro proc SevenSeg0WriteDigit (Value, DecimalPoint) { SevenSeg[0] = DecimalPoint @ TranslationROM0[Value]; } The two macros shown

Strany 83 - Page 83

DSM tutorials CREATING A NEW WORKSPACE Creating a new project Then, select the File>New menu again and create a new project in the workspace,

Strany 84 - Page 84

DSM tutorials Creating simulation and hardware configurations Now, select the Build>Configurations menu, select the Debug configuration, and clic

Strany 85 - Page 85

DSM tutorials Customizing the simulation configuration The two new configurations can now be customized for their particular targets. Select the Pro

Strany 86 - Page 86

DSM tutorials On the Preprocessor tab, add USE_SIM to the Preprocessor definitions box, as shown below. This definition is used to specify which PAL

Strany 87 - Page 87

PDK Tutorial Manual Assumptions & Omissions This manual assumes that you: • have used Handel-C or have the Handel-C Language Reference Manual •

Strany 88 - Page 88

DSM tutorials C:\program files\celoxica\pdk\software\lib\palsim.libThe Linker tab with all the libraries set up for simulation is show below. LIN

Strany 89 - Page 89

DSM tutorials As the RC200 is a hardware target, a device type must also be specified. Go to the Chip tab in Project Settings, make sure that Family

Strany 90 - 8.3 Reducing the logic delay

DSM tutorials PalSevenSegWriteDigit (PalSevenSegCT (0), (unsigned 4) 0xE, 0); PalSevenSegWriteShape (PalSevenSegCT (1), (unsigned 8) 0b11110110); Th

Strany 91 - Page 91

Tutorial: Handel-C and PSL basics 5 Tutorial: Handel-C and VGA graphics output The Handel-C and VGA graphics tutorial illustrates how to use Handel-

Strany 92 - Page 92

Tutorial: Handel-C and PSL basics macro expr White = 0xFFFFFF; macro expr Black = 0x000000; macro expr Red = 0xFF0000; macro expr Green = 0x00FF00

Strany 93 - 8.4 Reducing the logic area

Tutorial: Handel-C and PSL basics To run the example yourself, open the TutorialVGA workspace (Start>Programs>Celoxica>Platform Developer&a

Strany 94 - Page 94

Tutorial: Handel-C and PSL basics number of pixels in the Y direction. This is necessary for the display output code shown to work correctly, as att

Strany 95 - Page 95

Tutorial: Handel-C and PSL basics static macro proc Sleep (Milliseconds) { #ifdef USE_SIM macro expr Cycles = (10000 * Milliseconds) / 1000; #el

Strany 96 - Page 96

Tutorial: Handel-C and PSL basics 5.3 Adding mouse input The GraphicsDemo3 project in the TutorialVGA workspace (Start>Programs>Celoxica>P

Strany 97 - Page 97

Tutorial: Handel-C and PSL basics while (1) { par { XPos = MouseX; YPos = MouseY; if (MouseL == 1) BoxC

Strany 98 - Page 98

PAL tutorial 1 PAL tutorial The PAL tutorial shows an experienced Handel-C programmer how to implement platform-independent hardware using the Hande

Strany 99 - Page 99

Tutorial: Handel-C and PSL basics The figure below shows the GraphicsDemo3 project running in simulation on the PalSim Virtual Platform. To run the

Strany 100 - 9 FIR Tutorial

Tutorial: Handel-C and VGA graphics output 6 Tutorial: Handel-C code optimization The following examples illustrate different methods of optimizing

Strany 101 - 9.2 Initial version

Tutorial: Handel-C and VGA graphics output signal unsigned 16 temp1, temp2; par { temp1 = b << c; temp2 = b * d; a = temp1 + temp2

Strany 102 - Page 102

Tutorial: Handel-C and VGA graphics output ram unsigned 8 Memory[4]; This will create a more efficient structure in hardware, but will now be limite

Strany 103 - Page 103

Tutorial: Handel-C and VGA graphics output 6.1.3 Macro procedures vs. functions The main difference between a macro proc and a function in Handel-C

Strany 104 - Page 104

Tutorial: Handel-C and VGA graphics output assignment to take a single clock cycle. The result is that for() loops have a single clock cycle rhead s

Strany 105 - Technology Mapper

Tutorial: Handel-C and VGA graphics output static unsigned 1 Test = 1; unsigned 8 a; unsigned 32 b, c, d; while (Test == 1) { par {

Strany 106 - Page 106

Tutorial: Handel-C and VGA graphics output 6.2.4 Nested control Using nested if() statements, or long chains of if()...else() blocks can result in a

Strany 107 - Page 107

Tutorial: Handel-C code optimization 7 Tutorial: Handel-C advanced optimization The following examples illustrate advanced methods of optimizing Han

Strany 108 - 7 6 5 4 3 2 1 0

Tutorial: Handel-C code optimization The behaviour and timing of the code is as follows: • After the first clock cycle: • new values for the addit

Strany 109

PAL tutorial 5. Place and route the files (using Xilinx or Altera tools as appropriate). 6. Download the resulting .bit file onto the Spartan II F

Strany 110 - Page 110

Tutorial: Handel-C code optimization #define WIDTH 8 unsigned WIDTH sum[WIDTH]; unsigned WIDTH a[WIDTH]; unsigned WIDTH b[WIDTH]; while(1) { par

Strany 111 - Page 111

Tutorial: Handel-C code optimization struct _DivideStruct { unsigned 16 InputA; unsigned 16 InputB; unsigned 16 Result; }; typedef struc

Strany 112 - 9.4 Single cycle FIR

Tutorial: Handel-C code optimization 7.3.2 Flash memory client-server example The operation of flash memory is more complicated than asynchronous RA

Strany 113 - Page 113

Tutorial: Handel-C code optimization /* * Erase data from the block in the Flash referenced by BlockNumber * Parameters: FlashPtr : input of

Strany 114 - 9.5 Reducing logic area

Tutorial: Handel-C code optimization DataBusConnects the server to the input expression of the flash data bus interface StatusBusConnects the server

Strany 115 - Page 115

Tutorial: Handel-C code optimization macro proc FlashRun (FlashPtr, ClockRate) { // Initialization sequence unsigned 3 Command; do { Flash

Strany 116 - Page 116

Tutorial: Handel-C code optimization macro proc FlashWriteWord (FlashPtr, Address, Data) { par { FlashPtr->APICom

Strany 117 - 9.6 Using ALU Mapping

Tutorial: Handel-C advanced optimization 8 Tutorial: Using the logic estimator The following examples illustrate the use of the DK Logic Estimator t

Strany 118 - Page 118

Tutorial: Handel-C advanced optimization 8.2 Using the logic estimator results The results from the logic estimator can help you to improve the spee

Strany 119 - Page 119

Tutorial: Handel-C advanced optimization It should appear as below: ESTIMATION SUMMARY FROM VERSION1 PROJECT The first section of the summary provi

Strany 120

PAL tutorial Getting compile-time information from the resource There are a number of API calls that allow you to get information from PAL resources

Strany 121 - Page 121

Tutorial: Handel-C advanced optimization 8.3 Reducing the logic delay If you build the code for the TutorialEstimator version1 project, open the sum

Strany 122 - Page 122

Tutorial: Handel-C advanced optimization do { par { C = A * B; D = A + B; } par { Output = C + D;

Strany 123 - Page 123

Tutorial: Handel-C advanced optimization directory. Open the file named Summary.html by double-clicking on it (this should load your computers defau

Strany 124 - Page 124

Tutorial: Handel-C advanced optimization Try modifying the code in the version2 project in the TutorialEstimator workspace to use this pipeline, reb

Strany 125 - Page 125

Tutorial: Handel-C advanced optimization If you open the summary.html page for the version2 project in the TutorialEstimator workspace (accessible f

Strany 126 - Page 126

Tutorial: Handel-C advanced optimization First, the while condition on line number 57 uses a "less than" < comparison, when in fact a &

Strany 127 - Page 127

Tutorial: Handel-C advanced optimization The version3 project in the TutorialEstimator workspace (accessible from Start>Programs>Celoxica>P

Strany 128

Tutorial: Handel-C advanced optimization One final change can be made to reduce the logic area further still, and it will have the side-effect of re

Strany 129 - Page 129

Tutorial: Handel-C advanced optimization As we are targetting a Xilinx Virtex-II device in this case, and the design contains a multiplier, the ALU

Strany 130 - Page 130

Tutorial: Handel-C advanced optimization You can see that with ALU mapping enabled there is another column in the area estimation, showing how many

Komentáře k této Příručce

Žádné komentáře