Changes between Version 4 and Version 5 of ObjectDeveloperGuide
- Timestamp:
- 03/23/09 13:20:37 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ObjectDeveloperGuide
v4 v5 1 1 = Object Developer Guide = 2 2 [[BR]][[BR]]'''WARNING''': This page is under heavy construction, be careful when following instructions found here. 3 [[BR]] 3 4 4 5 == Introduction == … … 12 13 * A set of ''resource demands'' as a function of initialization parameters (i.e. cpu time, bandwidth, etc.) 13 14 14 And produces the following behavio r:15 16 * The object reads once the initialization parameters and configures its behavio r.15 And produces the following behaviour: 16 17 * The object reads once the initialization parameters and configures its behaviour. 17 18 * Given a set of parameter values, the object produces an output set of streams as a function of an input set of streams within the defined resource utilization constraints. 18 19 … … 31 32 == == 32 33 == Implementing the Object == 33 Once your object has been properly defined, you can begin implementing its behavior. Here we assume the reader is familiar with basic ALOE concepts, nevertheless, this section describes how to implement an ALOE Object and provides some examples.34 Once your object has been properly defined, you can begin coding it. Here we assume the reader is familiar with basic ALOE concepts, nevertheless, this section describes how to implement an ALOE Object and provides some examples. 34 35 35 36 === === … … 44 45 Figure 1 represents this concept. Notice how the object must announce its presence to ALOE prior to receive any order. 45 46 46 The first order the object will receive will be to initialize (INIT) itself. Then, the object will read a set of initialization parameters, activate the communications interfaces and declare a set of statistics variables (for monitoring purposes). This procedure is executed just once in the life cycle of the object.47 The first order the object will receive will be to initialize (INIT) itself. Then, the object will read a set of initialization parameters, activate the communications interfaces and declare a set of statistics variables (for monitoring purposes). This procedure is executed just once in the life-cycle of the object. 47 48 48 49 If an execution order is received (RUN), the object will receive any pending message, dispatch the required task (for example process a block of data received from an interface and send the result through another interface) and return to the initial point. … … 52 53 Note how the object owns the CPU during the time it process the message. After that, the object returns to the STATUS point handing the CPU over to ALOE again. In anomalous or time rules violation, ALOE may release the ownership from the object before returning to the STATUS point. 53 54 54 '''Figure 3.1 – P-HALObject Flow Diagram'''55 '''Figure 3.1 – ALOE Object Flow Diagram''' 55 56 56 57 === Coding an Object === 57 58 The programming language used to describe an object may change between different processing devices, depending on the tools provided by the device manufacturer. However, it would be very interesting to use always the same language so the code can be reused. This is unrealistic, because currently programmable devices as GPP or DSP can use C/C++ while others like logic programmable devices as FPGA use totally different languages (VHDL). 58 59 59 Nevertheless, these are the chosen standard programming language for the P-HALFramework:60 Nevertheless, these are the chosen standard programming language for the ALOE Framework: 60 61 61 62 * C Language for programmable devices … … 63 64 * VHDL Language for FPGA devices 64 65 65 Not only the use of a standard language is a requirement to enable the whole set of functionalities provided by ALOE. Also the use of the ALOE Software Library API is a requirement as well as other considerations. 66 67 An Object writer must be concerned about the misinformation of the final platform to be executed on. This means that very important concepts (in software radio) like sampling frequency, time slot duration, memory distribution or architecture, etc. are totally unknown when objects are designed. Thus, it would need to support such sort of frequency ranges and architectures under parameter reconfigurations.66 Not only the use of a standard language is a requirement to enable the whole set of functionalities provided by ALOE. Also the use of the ALOE Software Library API is a requirement as well as other considerations. At this point, we strongly recommend the reader to check [wiki:SWAPIDoxygenDoc ALOE SW-API Documentation] to get an insight on the available functions and its behaviour. 67 68 An Object designer must be concerned about the misinformation of the final platform to be executed on. This means that very important concepts (in software radio) like sampling frequency, time slot duration, memory distribution or architecture, etc. are totally unknown when objects are designed. Thus, it would need to support such sort of frequency ranges and architectures under parameter reconfigurations. 68 69 69 70 A special function provided by the ALOE Software Library API will serve for this purpose. The number of samples to be generated every time the object is executed (every time slot) will be obtained using the following function: … … 332 333 333 334 rcv_len=0; 335 334 336 /* set stats variable */ 335 337 SetStatsValue(stat_outsignal,output.data,long_out_block); … … 337 339 } 338 340 }}} 339 == [[BR]][[BR]] == 341 [[BR]] 342 [[BR]] 343 [[BR]] 340 344 == Coding Style == 341 !FlexNets Coding style is based on the Linux Kernel Coding Style and, although we strongly recommend its reading, you may first of all check the following document defining basic codying style conventions: [wiki:WrittingCode Writing code for FlexNets]. 342 343 naming conventions per les interficies, els fitxers, etc. 344 345 == [[BR]]Compiling and Linking == 346 com compilar i linkar amb phal 347 348 [wiki: Users&Developers "[Back to User&Developer Guides]"]345 [[BR]] 346 [[BR]] 347 [[BR]] 348 == Compiling and Linking == 349 [[BR]] 350 [[BR]] 351 352 [wiki:P-HAL-OE "[Back to ALOE Framework]"]