




























































































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!





























































































Lectures Hardware basics ISO 26262: titled "Road vehicles – Functional safety", is an international standard for functional safety of electrical and/or electronic systems in production automobiles defined by the International Organization for Standardization (ISO) in 2011. It contains the guidelines for the processes, methods and tools used during the development of any electronic device present in automotive industry. AUTOSAR: is a worldwide development partnership of vehicle manufacturers, suppliers, service providers and companies from the automotive electronics, semiconductor and software industry. The primary goal of the AUTOSAR partnership is the standardization of a common methodology, basic system functions and functional interfaces.
The CPU is able to do two operations only: reading or writing. A generic read cycle or write cycle always start with an address line: it is necessary to specify where the operation (no matter what) is going to be performed. The second instruction contains the actual operation that is wanted (read or write). CPUs contain memory elements inside. These memories, called registers, are very fast but also very expensive, that’s why they are very limited. Each element of the registers has a specific role in the overall loop.
Why are there two different types of architecture? Because it depends on the application. A control device for a fixed and specific system, needs only a few memory and a very small computational power, the processor has to compute specific tasks only, therefore it could be more efficient to choose a MCU. By contrast, when dealing with possible upgrade due to the increasing complexity of the system, it could be necessary to add memory, then a SoC shall be used. What is the best solution for an embedded system? A MCU in general. Why? Because it is cheaper, more compact and designed to do a precise task. What is the drawback? Since the processor is not very powerful and designed for a specific task only, the control algorithm must be as simple as possible. There are special MCU that guarantees a working condition also in the presence of failure. These architecture implementations, such as the Infineon AURIX family, are used when safety is the most important parameter (for example when dealing with airbags). The first operation that a CPU does is to associate a certain address to any device present into the system.
The basic software is not something we are going to discuss, it is behind the control algorithm, it allows the system to work properly.
Model-based software design What’s the problem with the standard coding procedure? That it requires too much time. The handwritten coding part can be easily avoided by means of a software that automatically produces the code.
The key point of the modelling phase is that a model doesn’t have to be a precise copy of the original system, it must be able to behave like the original one, but in a simplified version, namely without all the features that are not relevant for our purposes. Obviously, omitting information, we approximate the original system. This approximation can be good or not depending on the precision level we need to
achieve, there is not a unique solution. Moreover, depending on the situation, we could obtain two different models starting from the same origin, because the relevant features could be different! Models are created to test different alternatives for the solution. Furthermore, they are the starting point for the code generation, depending on the model, a certain code will be produced.
Nevertheless, the key point is that the model is the same irrespective of the used code language , the transformation tool will deal with some transformation rules depending on the desired output. What to do with the code? It depends on the configuration. Rapid prototyping or not? Static models can’t be simulated, cannot be fed by inputs to evaluate the output. Static model can also describe different states of a machine (basically different working conditions). On the contrary, dynamic models can be simulated over time to see how the output reacts depending on the input. For developing these models, it is necessary a modelling language. In particular, as we want a model that is independent from the platform we are going to use , the language must be platform independent domain specific language : language that allows to define models that abstract the details of the execution platform (don’t care about them). Simulink is the PIDSL we will use to develop control strategies. Stateflow is the PIDSL we will use to define state machines. Depending on the purpose it is necessary to select the correct DSL (the correct software that allows to model our system). Then this platform independent model is converted into a platform specific model that a computer can run.
Model in the loop testing : what does it means? We have a model of the plant, a model of the controller and we test them. If something is not working, we have to perform changes. In this scenario the working environment is a development PC. We define test scenarios (different inputs) and then we evaluate the outputs checking whether the system is able to follow the reference we placed as input. All the components are developed in Simulink or Stateflow and tested on our development PC.
Code generation : the code generation comes after the model in the loop testing. Once we are 100% sure about the model and the controller, we continue the process with the automatic code generation. The code generation is based on a transformation tool that will produce an artefact (a code), given all the specifications we provided. Obviously, this code depends on the platform we are going to use for our system, however the starting model is always the same.
Processor in the loop testing : We are no longer working with a development PC, we put the real code on the real platform (embedded system to be used in the final application) and we test it. The embedded system has a bounded amount of power with respect to the development PC, since it only requires performances and it must be cheap. In this case we are working with a real platform (rapid prototyping system, actual ECU) and the Simulink plant model on a development PC. Why? Because we need to test the code on a system which has the same power as the final one. However, the real time is still missing. The Simulink model cannot work as the plant, there are delays introduced by the PC due to the interaction between the development PC and the actual board. Therefore, we can validate whether the software is working properly or not, but we cannot evaluate the real performances (real time behaviour).