Presentation is loading. Please wait.

Presentation is loading. Please wait.

SIMOO A Platform for Object-Oriented Design and Simulation of Embedded Electronic Systems and Real-Time Automation Systems Flávio R. Wagner Universidade.

Similar presentations


Presentation on theme: "SIMOO A Platform for Object-Oriented Design and Simulation of Embedded Electronic Systems and Real-Time Automation Systems Flávio R. Wagner Universidade."— Presentation transcript:

1 SIMOO A Platform for Object-Oriented Design and Simulation of Embedded Electronic Systems and Real-Time Automation Systems Flávio R. Wagner Universidade Federal do Rio Grande do Sul Porto Alegre, Brazil Paderborn, 4th November 1999 UFRGS

2 Outline 1. Introduction 2. Basic modeling and simulation infra-structure 3. Hardware-software co-design methodology 4. Co-simulation infra-structure 5. Embedded electronic systems 6. Real-time automation systems 7. Final remarks UFRGS

3 SIMOO main features object-oriented modeling and simulation of discrete systems multiparadigm modeling visual interactive simulation graphical description of the static structure behavior described in C++ or state diagrams annotated with C++ 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

4 Design of embedded electronic systems goal: control of physical processes and equipments architecture –analog and digital hardware –off-the-shelf or dedicated processors –software requirements for a design environment –appropriate specification mechanisms for various abstraction levels –stepwise refinement process –co-simulation 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

5 Design of real-time automation systems goal: control of physical processes architecture –distributed system –off-the-shelf microcontrollers or microprocessors –real-time operating system –real-time constraints –analog interfaces –software requirements for a design environment –appropriate specification mechanisms for various abstraction levels –stepwise refinement process –co-simulation 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

6 Multiparadigm modeling and simulation each class may have a different modeling paradigm modeling paradigms are obtained by combining approaches for different modeling aspects –client or server perspective –behavior described by event-orientation or process-orientation –communication by messages or ports –active, semi-active or passive handling of messages other simulation packages or languages usually... –offer a single or limited repertory of paradigms –do not allow a combination of paradigms in the same model SIMOO approach enhances the reusability of models and classes 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

7 Autonomous and interface objects autonomous objects –correspond to the entities of the model logic –each object has ist own execution thread –do not support shared variables –communication through messages interface objects –visualization of results –data collection –interactive input of data –share a single thread 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

8 Software architecture Model Editor Tool library of autonomous objects C++ code SIMOO class library executable code compiler 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

9 Model Editor Tool supports construction of hierarchical object-oriented models models defined by hierarchical class diagrams and instance diagrams simulation-specific features: modeling paradigms access to user-defined class library class diagrams –relationships: inheritance, aggregation, acquaintance instance diagrams –concrete instantiation of the class diagram –gives concrete values to n-to-m relationships and to class parameters 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

10 Example of diagrams 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

11 MET - Describing behavior in C++ 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

12 MET - State diagrams 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

13 MET - State diagrams 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

14 User interface default user interface automatically added to all models specific user interface built by interface objects separation between model logic and user interface –autonomous objects x interface objects –increased reusability of autonomous and interface objects –easier debugging of the model logic tool-oriented approach –dynamic mapping from interface to autonomous objects –help verification and validation of models and closer inspection of desired model aspects a monitor controls the mappings –intercepts messages that modify attributes of autonomous objects and sends copies to corresponding interface objects 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

15 Basic user interface tracking variables modifying values of variables querying the model structure modifying the model structure –replacing methods that respond to messages –creating and removing objects –modifying mappings from interface objects to autonomous objects querying and modifying the event list time-stepping, stopping, resuming, setting breakpoints 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

16 Future work synchronization between objects –current version: conservative protocol –future: more optimistic protocol distributed version –current version: objects already have their own execution threads –distributed platform yet to define –first prototype based on Java RMI is being implemented 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

17 Basic design methodology initial specification –abstract behavior –C++ or state diagrams annotated with C++ objects corresponding to the physical world may be modeled by a continuous behavior validation by simulation design proceeds through a stepwise refinement –hierarchical refinement: same abstraction level –abstraction refinement: design decisions are taken abstract objects are mapped into objects of a target architecture –digital or analog hardware, software 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

18 Target architectures 1 or more processors –off-the-shelf microprocessors –DSPs, RISCs, microcontrollers –ASIPs specialized digital hardware –FPGAs –ASICs analog hardware –DA and AD converters –sensors and actuators software running on top of the chosen processor(s) 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

19 Library-based synthesis selection of hardware objects from a previously built library of classes for the possible target architectures software objects may be automatically generated from the abstract specification –from C to assembly languages of the selected processors hardware objects must be described in an appropriate language (VHDL) 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

20 Conclusions this methodology applies both to... –embedded electronic systems –real-time automation systems target architectures are similar –distributed systems containing analog and digital hardware parts, processors, software specializations are necessary –in the target architecture –in the design methodology co-simulation is necessary future work: hardware-in-the-loop 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

21 Co-simulation requirements co-simulation for the validation of the initial specification –discrete behavior - algorithms or state diagrams –continuous behavior - physical world co-simulation for the validation of possible implementations –discrete behavior - algorithms or state diagrams for parts that have not been refined yet for software parts –continuous behavior for the physical world for analog hardware –VHDL for digital hardware 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

22 Coupling SIMOO and VHDL 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

23 Coupling SIMOO and VHDL 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks SIMOO simulatorVHDL simulator

24 Coupling SIMOO and VHDL interfaces in both domains are automatically generated –C-file in the VHDL domain –interface object in the SIMOO domain interfaces are responsible for... –communication - exchange of data and format conversion –synchronization between simulators conservative approach communication between simulators by sockets distributed simulation is possible –SIMOO currently runs on Windows –VSS runs on Unix workstations 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

25 Hybrid discrete-continuous simulation objects with analog behavior –modeled by a set of differential equations –implement the numerical integration method –object attribute defines integration time step signal-flow approach –mathematical functions from inputs to outputs –appropriate for objects that... don´t have a physical implementation yet model the physical world are modeled at a higher abstraction level than basic components (PID controllers, converters, filters) 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

26 Hybrid discrete-continuous simulation current situation –differential equations directly described in C++ –integration time step must be defined by the programmer scheduling the execution of analog objects –if there are more than one AO and they communicate with each other, they must be scheduled at each time step and exchange messages –if not, an AO may be scheduled at intervals that depend on the discrete objects and then execute several integration steps future work –better time advancement mechanism, including automatic time step definition –integration with Matlab / Simulink 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

27 Design methodology object-oriented specification stepwise refinement co-simulation combining C++, VHDL, analog behavior synthesis to a multiprocessor platform each object or group of objects may be mapped to a different processor 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

28 Example: crane benchmark for specification of heterogeneous systems physical plant: crane with a load, moving along a track control –assures smooth movement, without bumps and oscillations –verifies if displacement does not exceed limits and if angle of the load is acceptable (emergency break) –auto-test of sensors 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

29 First modeling of the crane 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks physical plant drives the dc motor (speed), control breaks and emergency break checks plausibility of car position and load angle controls car movement, sensor checking, output forces to Actuators

30 First modeling of the crane physical plant Plant_rk is an object with continuous behavior all other objects have discrete behavior M_Control combines two computation models –control algorithm for movement is a discrete computation of the state-variable method q n+1 =A*q n + B*[Motor_Voltage Car_Position] T at each 10 ms –sensor checking is an FSM Diagnosis is an FSM Actuators is an algorithm 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

31 Second modeling of the crane 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks main control algorithm, arithmetic operations M_Control split into two objects FSM for sensor checking

32 Third modeling of the crane 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks FSMs (Job_Control and Diagnosis) merged into a single object to be implemented as digital hardware and modeled in VHDL

33 Library of processors processors are characterized by attributes size of binary word types of instructions memory operand addressing modes execution time (in clock cycles) of each instruction number of busses to access memory type of memory number of registers use of pipeline and depth of eventual pipeline use of harvard architecture current library: C25, 8051, RISCO 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

34 Characterizing the application 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks APP = P P + M + C APC = C P + M + C APM = M P + M + C C++CDFG machine- independent 3-address code application is characterized as: - data-dominated - memory-dominated - control-dominated

35 Selecting the processor performance profiles measure, for the given application, the relative cost of the processor for each aspect (data, control, memory) selection algorithm weighs the performance profiles and chooses the processor best suited for the application 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks PPP i = PiPi P i + M i + C i PPC i = CiCi P i + M i + C i PPM i = MiMi P i + M i + C i

36 Future work selection of processors considering a multi-dimensional space of aspects –cost, area, power consumption, performance automatic algorithm for exploring various partitionings of objects into processors library-based synthesis of communication –map abstract communication mechanisms of SIMOO (ports, messages) to busses and channels –measure communication costs –select communication protocol according to application requirements 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

37 Introduction SIMOO used as a front-end –extensions for the specification of real-time constraints back-end is AO/C++, an extension of C++ adapted for real-time systems target architecture is a distributed system composed of low-cost microcontrollers connected by an industrial bus methodology for the transition from the simulation model to the implementation code 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

38 Extensions in the specification 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks cyclic methods

39 Extensions in the specification 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks timed methods (deadline) default value for the deadline

40 Extensions in the specification 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks code for handling exceptions

41 AO/C++ target language combines OO properties of C++ with benefits of Unix- RTOS –maps logically distributed OO model of C++ to physically distributed process-oriented model of Unix-RTOS primitives added to C++ –definition of active objects (own execution thread) –time-triggered methods –timing constraints (deadlines, cyclic operations, exception handling code) AO/C++ programs are parsed and converted to standard C++ with calls to the underlying run-time environment (Unix-RTOS) 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

42 Example 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

43 Example 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks cyclic method for sampling physical plant timed method for activating the pump

44 Example 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks cyclic method for sampling physical plant timed method for activating the pump interface objects are mapped to these autonomous objects

45 Generating the implementation model simulation model must be transformed into a model which is amenable for the physical implementation objects corresponding to the physical plant are removed objects corresponding to physical interfaces from the controlling host to the physical plant must be inserted interface objects are replaced by autonomous objects messages between objects are modified according to the AO/C++ communication paradigm in the example –SIMOO / Windows 2690 lines –AO/C++ 730 lines –C++ / QNX 2310 lines 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

46 Example 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks physical interfaces

47 Example 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks interface objects

48 Future work more automatic generation of the implementation model automatic generation of the supervisory system –user interface in the simulation model is automatically transformed into the supervisory system hardware-in-the-loop –smooth transition from the simulation model to the implementation –selective replacement of simulation objects by physical objects –user interface is maintained 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

49 Conclusions SIMOO is used as a high-level modeling and verification front-end back-ends for two different application fields –embedded electronic systems –real-time automation systems co-simulation: SIMOO is used as a seamless environment for both high-level design and implementation –stepwise refinement: progressive replacement of abstract descriptions by implementation descriptions 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

50 Future work basic simulation infra-structure –optimize the hybrid simulation mechanisms –distributed simulation with an optimistic protocol embedded electronic systems –communication synthesis –find optimal selection algorithms –explore partitioning of objects into processors –model larger examples where multiprocessor platforms are needed real-time automation systems –automatic generation of the supervisory systems hardware-in-the-loop: progressive replacement of simulation objects by physical objects 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

51 Cooperation The research on embedded electronic systems is being performed in cooperation with Prof. Luigi Carro The research on real-time automation systems is being performed in cooperation with Prof. Carlos Eduardo Pereira 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks

52 For more information... 1 Introduction 2 SIMOO 3 Hw-Sw codesign 4 Co-simulation 5 Embedded systems 6 Real-time automation 7 Final remarks http://www.inf.ufrgs.br/gpesquisa/simoo software for downloading user and programmer manuals small examples papers in pdf http://www.inf.ufrgs.br/~flavio flavio@inf.ufrgs.br


Download ppt "SIMOO A Platform for Object-Oriented Design and Simulation of Embedded Electronic Systems and Real-Time Automation Systems Flávio R. Wagner Universidade."

Similar presentations


Ads by Google