![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: RiC 4.0 Interrupt Driven Framework Topic Summary: Created On: 21-Sep-2005 20:05 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 NtIDF, VxIDF, C166IDF, DiabIDF, ... (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 "ntoxf" configuration, generate / make. This should generate an idf.lib file in the idf\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 "NtIDF" environment by simply selecting the "nt" configuration and generate / make / run. 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. 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: CustomIDF. Setup makefile template, compiler flags, ... 3. Add a new configuration to the idf component ex: customoxf, that uses the CustomIDF 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 don't need RiCString, RiCMap, RiCList and RiCCollection, then they can be removed from the link. For more information please download the attached file. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.