Presentation is loading. Please wait.

Presentation is loading. Please wait.

MACCE and Real-Time Schedulers Steve Roberts EEL 6897.

Similar presentations


Presentation on theme: "MACCE and Real-Time Schedulers Steve Roberts EEL 6897."— Presentation transcript:

1 MACCE and Real-Time Schedulers Steve Roberts EEL 6897

2 Who Am I? Master’s in Modeling and Simulation Employed by Veraxx Engineering Corp. Undergraduate in Computer Engineering from UCF Worked in the simulation industry 4 years

3 Agenda Discuss some different simulation issues Define a scheduler or real-time executive What is MACCE? A MACCE configuration file Conclusion Questions

4 Some Simulation Issues Real-Time cards Interrupts Multiple Language Support Callbacks Shared Memory Multi-Threading

5 Real Time Cards Sync cards Provide interrupts Interrupts can occur at different frequencies More accurate than software interrupts

6 Multiple Language Support Fortran ADA/ADA 95 C++ C Many simulators that are upgraded are comprised of legacy code and code from other simulators are pulled in to these legacy systems

7 Callbacks A pointer to a function Usually the function is in a high level language The function pointer is passed to a low level language May also exist within the same application (high level/high level)

8 Shared Memory Block of memory used by different processes Hardware shared memory Multiple CPUs Software shared memory Single CPU

9 SCRAMNet Shared Common Random Access Memory Network Ring architecture Fiber Optic Network Large Throughput >200MB/s Automatically updates other CPUs

10 Multi-Threading Multiple processes running at the same time Multiple CPU Multiple threads/callbacks on a single CPU

11 What Is A Scheduler? A scheduler is a piece of software that is an integration point for a simulation. It is where all the variables are instantiated, where the functions are called, where proper timing and order of execution happens, and where a simulation is initialized, executed and terminated.

12 Why Have a Scheduler? Simplifies and automates integration Wraps many low level details Automatically handles many low level details Provides a common simulation environment Provides simple debuggin and analysis tools

13 What is MACCE? Marine Aviation Common Computing Environment Manages and controls a Vehicle Simulation Environment in real-time and standalone modes Linux based C++ architecture Takes advantage of multiple CPUs

14 MACCE System Diagram

15 MACCE Architecture Server Client Daemon Graphical User Interface (GUI)

16 MACCE Server This is the main process Reads the configuration file Creates the control table in shared memory Starts all the clients Monitors the command line Does not perform real-time tasks

17 MACCE Server Cont. Configures MACCE Memory Manager (M3) global areas Can be started in debug mode Debugger such as GDB can be used to step through any of the callbacks in the simulation

18 MACCE Client MACCEC This is a process Connects to the control table All callbacks are initiated by the client One MACCEC per CPU is recommended Has top level exception handling Can manage multiple threads.

19 MACCE Daemon Monitors a port for MACCE commands from MACCE Clients Forwards those commands to the MACCE server Runs on a Linux machine One instance runs

20 MACCE GUI More of a text-based UI Provides interface for printing and watching variables Provides timing statistics Displays log messages Used to terminate a MACCE Server instance

21 MACCE Memory Manager (M3) Lays out shared data areas Reads in a memory config file Generates Fortran scan file Generates C, C++ header file Generates Ada records

22 MACCE API MacceApiAttachCallbackMacceApiGetExecutiveStateMacceApiRpSeek MacceApiAttachThreadMacceApiGetFrameNumberMacceApiRpStop MacceApiCfgFileImportMacceApiGetGlobalAddressMacceApiRun MacceApiCfgFileOpenMacceApiGetGlobalSizeMacceApiSetClocks MacceApiConfigureAndRunMacceApiGetGlobalSymbolAddressMacceApiShmClose MacceApiCreateCallbackMacceApiGetIterationRateMacceApiShmGetAddress MacceApiCreateClockMacceApiSetGlobalAddressMacceApiShmOpen MacceApiCreateGlobalMacceApiInitMacceApiSymbolQueryAddress MacceApiCreateModeMacceApiLogMessageMacceApiSymbolQueryClose MacceApiCreateProcessMacceApiMallocMacceApiSymbolQueryOpen MacceApiCreateThreadMacceApiRequestModeMacceApiSymbolQuerySetLanguage MacceApiEnvVarGetMacceApiRpAddItemMacceApiSymbolQueryType MacceApiEnvVarSetMacceApiRpCloseMacceApiUtilsSwapTwoBytes MacceApiEnvVarUnsetMacceApiRpFastForwardMacceApiUtilsSwapFourBytes MacceApiErrnoMacceApiRpOpenMacceApiUtilsSwapEightBytes MacceApiFinalizeMacceApiRpPause MacceApiFreeMacceApiRpPlay MacceApiGetDatabaseFirstSymbolMacceApiRpRecord MacceApiGetDatabaseNextSymbolMacceApiRpRewind

23 MACCE Configuration File Variables SETENV GLOBAL Clocks Modes Callbacks Tables Threads Processes

24 Sample MACCE Configuration ////////// // clocks ////////// [CLOCKS] external = 0 internal = 60 standalone = 10 ///////// // modes ///////// [MODE] name = STARTUP_MODE description = Startup mode type = ONESHOT next = FREEFLIGHT_MODE [MODE] name = SHUTDOWN_MODE description = Shutdown mode type = ONESHOT [MODE] name = FREEFLIGHT_MODE description = Freeflight mode type = REALTIME

25 Cont… ///////////// // callbacks ///////////// [CALLBACK] name = EOM_STARTUP_CALLBACK description = Equations of motion startup callback symbol = eom_startup language = CPP [CALLBACK] name = EOM_SHUTDOWN_CALLBACK description = Equations of motion shutdown callback symbol = eom_shutdown language = CPP [CALLBACK] name = EOM_SIMULATE_CALLBACK description = Equations of motion simulate callback symbol = eom_simulate language = CPP [CALLBACK] name = UHF_RADIO_STARTUP_CALLBACK description = UHF radio startup callback symbol = uhf_radio_startup language = CPP [CALLBACK] name = UHF_RADIO_SHUTDOWN_CALLBACK description = UHF radio shutdown callback symbol = uhf_radio_shutdown language = CPP [CALLBACK] name = UHF_RADIO_SIMULATE_CALLBACK description = UHF radio simulate callback symbol = uhf_radio_simulate language = CPP

26 Cont… /////////// // threads /////////// [THREAD] name = STARTUP_THREAD description = Startup Thread mode = STARTUP_MODE frequency = 1 phase = 0 callback = EOM_STARTUP_CALLBACK callback = UHF_RADIO_STARTUP_CALLBACK callback = TACAN_STARTUP_CALLBACK [THREAD] name = SHUTDOWN_THREAD description = Shutdown Thread mode = SHUTDOWN_MODE frequency = 1 phase = 0 callback = EOM_SHUTDOWN_CALLBACK callback = UHF_RADIO_SHUTDOWN_CALLBACK callback = TACAN_SHUTDOWN_CALLBACK [THREAD] name = FREEFLIGHT_60HZ_THREAD description = 60 hertz freeflight thread mode = FREEFLIGHT_MODE frequency = 1 phase = 0 callback = EOM_SIMULATE_CALLBACK [THREAD] name = FREEFLIGHT_30HZ_PHASE0_THREAD description = 30 hertz phase 0 freeflight thread mode = FREEFLIGHT_MODE frequency = 2 phase = 0 callback = UHF_RADIO_SIMULATE_CALLBACK

27 Cont… ///////////// // processes ///////////// [PROCESS] name = TUTORIAL1_PROCESS description = tutorial1 process filter = 1 cpu = 1 thread = STARTUP_THREAD thread = SHUTDOWN_THREAD thread = FREEFLIGHT_60HZ_THREAD thread = FREEFLIGHT_30HZ_PHASE0_THREAD thread = FREEFLIGHT_30HZ_PHASE1_THREAD

28 Conclusion MACCE is a great tool that allows software engineers the ability to pull together many different pieces of simulators and combine them to build a new simulator MACCE also provides software engineers with a debugging environment MACCE can save time and headaches

29 Questions?


Download ppt "MACCE and Real-Time Schedulers Steve Roberts EEL 6897."

Similar presentations


Ads by Google