![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: RiC 4.1 Interrupt Driven Framework Topic Summary: Created On: 21-Sep-2005 20:09 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
How to run the framework with the test models
============================================================================ To try out the Interrupt Driven Framework, follow these simple instructions: 1. Set up an environmental variable CIDF_ROOT to point to the idf directory below where this model is located: ex: ...\RiCInterruptDrivenFramework\idf 2. Modify your Rhapsody\Share\Properties\siteC.prp file to incorporate the new environments IDF_Microsoft_NT, IDF_Borland_NT, IDF_Tasking_C166, ... (To use these extra environments, the attached Share.zip file must be extracted into the Rhapsody directory. ) 3. Start up Rhapsody and load the model. 4. Select the "idf" component and the "microsoft_nt" configuration, generate / make. This should generate an idf.lib file in the idf\microsoft_nt\oxf directory. 5. Select the "Stopwatch" component and the "oxf" configuration, generate / make / run. This uses the usual "Microsoft" environment and uses animation to test the selected model. 6. Once the model has been tested, it can be run using the "IDF_Microsoft_NT" environment by simply selecting the "microsoft_nt" configuration and doing generate / make / run. 7. If you don't want to use printf, then simply add a define NO_PRINT Framework Limitations ============================================================================ 1. Is single threaded, interrupt driven. 2. Animation and Tracing is not possible with this framework, but any model can be animated using the oxf framework. 3. Flat statechart implementation and Real Time model must be selected. 4. The event queue and Timer heaps are not dynamic and maximum sizes must be setup. 5. To use the framework with a different target, three functions must be modified. 6. To use RiCString, the user must #include RiCString.h 7. Property CG:Events:BaseNumberOfInstances must be set to > 0 to allow automatic memory allocation from the memory pools. The actual number is ignored. 8. The maximum number of consecutive null transitions has been greatly reduced from 100 to 7 (to save on RAM). How to setup the framework for a different target ============================================================================ 1. Search the model for the word CUSTOM, it should find three functions that will need modifying. a. RiCInitTimer : This should setup a periodic interrupt that calls the RiCTick operation every RiC_MS_PER_TICK. b. RiCExitCriticalRegion : This should enable interrupts c. RiCEnterCriticalRegion : This should mask interrupts 2. Add a new environment in the siteC.prp ex: IDF_Compiler_Cpu. Setup makefile template, compiler flags, ... 3. Add a new configuration to the idf component ex: IDF_compiler_cpu, that uses the IDF_Compiler_Cpu environment. 4. There are several framework constants in the RiCIdfPkg that may need tuning: RIC_MEMORY_ALLOCATION : Sets up the buffers used for the memory allocation RIC_MAX_EVENTS : Maximum number of simultaneous events RIC_MAX_TIMEOUTS : Maximum number of simultaneous timeouts RIC_MS_PER_TICK : Periodic timeout in milliseconds 5. If you need RiCString, RiCMap, RiCList and RiCCollection, then they can be added into the link. By default they are not included. For more information please refer to the attachment. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.