BASIC BUILDING BLOCKS OF ESD - {MID-1 }
FPGA/ASIC Memory SOFTWARE
PS
Sensors ADC CPU DAC Actuators
Human Diagnostic Auxilliary
Interface Tools Systems/
Cooling/Packing
Electromechanical Backup
and safety
External environment
1A-1
Embedded System
• Embedded systems is an encapsulation of H/W and S/W which is designed to perform specific dedicated task.
An embedded system can be thought of as a computer hardware system having software embedded in it.
• An embedded system can be an independent system or it can be a part of a large system.
• An embedded system is a microcontroller or microprocessor based system which is designed to perform a
specific task. For example, a fire alarm is an embedded system; it will sense only smoke.
• An embedded system has three components −
• It has hardware.
• It has application software.
• It has Real Time Operating system (RTOS) that supervises the application software and provide mechanism to let
the processor run a process as per scheduling by following a plan to control the latencies. RTOS defines the way
the system works. It sets the rules during the execution of application program. A small scale embedded system
may not have RTOS.
1A-1
Building Blocks of an ES
• Sensor − It measures the physical quantity and converts it to an electrical signal
which can be read by an observer or by any electronic instrument like an A2D
converter. A sensor stores the measured quantity to the memory.
• A-D Converter − An analog-to-digital converter converts the analog signal sent by
the sensor into a digital signal.
• Processor & ASICs − Processors process the data to measure the output and
store it to the memory.
• D-A Converter − A digital-to-analog converter converts the digital data fed by the
processor to analog data
• Actuator − An actuator compares the output given by the D-A Converter to the
actual (expected) output stored in it and stores the approved output.
1A-1
Real time example - {Digital Camera}
• One real-time example of an embedded system is a digital camera. A digital camera is a complex device
that integrates a wide range of hardware and software components, including a lens, image sensor,
processor, storage, and display.
• The embedded system in a digital camera is responsible for controlling and coordinating all of these
components to capture, process, and display images. The system includes specialized hardware such as
analog-to-digital converters, image processors, and memory controllers as well as software components
such as firmware and device drivers.
• The system operates in real-time, continuously processing image data at high speeds to capture and
display images with minimal delay. It also performs tasks such as autofocus, exposure control, and image
stabilization, all of which require precise timing and coordination between different hardware and
software components.
• Overall, digital cameras are an excellent example of how embedded systems can be used to create
complex, real-time applications that require high performance and reliability.
1A-1
C vs Embedded C
• C Language:
• C is a general-purpose programming language that is widely used for developing applications for desktop, web,
and mobile platforms.
• C offers a rich set of features and libraries that make it easy to write complex programs.
• C is a high-level language that provides abstractions for memory management, I/O operations, and other system
resources.
• C includes a powerful preprocessor that allows developers to customize their code for different environments.
• C programs are compiled into machine code, which can run on any platform that supports the C standard library.
• Embedded C
• Embedded C is a variant of the C programming language that is optimized for use in embedded systems.
• Embedded C is designed to work with limited memory and processing resources that are common in embedded
systems.
• Embedded C includes specialized libraries and syntax for controlling low-level hardware components, such as
timers, GPIOs, and ADCs.
• Embedded C includes features for optimizing code size and speed, such as inline functions and macros.
• Embedded C programs are compiled into machine code that is specific to the target microcontroller or
processor, which provides a high degree of control over system resources.
1A-2
Compiler vs Cross-compiler
Compiler:
• A compiler is a software program that translates high-level programming code into machine code that can be
executed by a computer.
• Compilers can generate code for specific hardware and operating systems, which can improve performance and
compatibility.
• Compilers typically include a range of optimization techniques to improve code efficiency and reduce memory usage.
• Compilers are often used to develop applications for desktop, web, and mobile platforms.
• Compilers can be installed on a developer's machine and used to compile code locally.
Cross-Compiler:
• A cross-compiler is a compiler that is designed to generate code for a different hardware or operating system than
the one on which it is running.
• Cross-compilers are commonly used in embedded systems development, where the target system may not have
sufficient resources to run a compiler locally.
• Cross-compilers can generate code for a wide range of architectures, including microcontrollers, DSPs, and FPGAs.
• Cross-compilers often include specialized libraries and headers for working with specific hardware components, such
as GPIOs and timers.
• Cross-compilers can be used to develop applications on a host system and then transfer the compiled code to a
target system for execution.
1A-2
Software development tools in an ES
1B-1
1B-1
1B-1
1B-1
1B-1
1B-1
1B-1
Locator
• It gives information of memory of target board.
• It uses information to assign physical address to code.
• It produces output file that contains binary memory image
which can be loaded into memory
1B-1
1B-1
Peripherals in Microcontrollers
1B-2
UART INTRODUCTION
1B-2
I2C
1B-2
1B-2
Important Points :
• GPIO (General Purpose Input/Output):
• GPIO pins are used to interface microcontrollers with external devices such as sensors, switches, and LEDs.
• GPIO pins can be configured as inputs or outputs, and can be used to read or write digital signals.
• ADC/DAC (Analog-to-Digital/Digital-to-Analog Converter):
• ADCs are used to convert analog signals, such as temperature or pressure, into digital signals that can be processed by a
microcontroller.
• DACs are used to convert digital signals into analog signals, such as audio or voltage.
• Memory:
• Memory is used to store data and code in embedded systems, such as program instructions, variables, and user data.
• Memory can be classified into several types, including RAM, ROM, Flash, and EEPROM, each with its own characteristics and
trade-offs.
• RTC (Real-Time Clock):
• RTC is a clock that keeps track of time even when the system is powered off.
• RTC is commonly used in embedded systems to time-stamp data, schedule tasks, and trigger events at specific times.
• USB (Universal Serial Bus):
• USB is a common interface for connecting external devices to embedded systems, such as keyboards, mice, and cameras.
• USB can also be used for communication between two embedded systems, such as transferring data or firmware updates.
1B-2
Important Points :
• HDMI (High-Definition Multimedia Interface):
• HDMI is a digital interface for transmitting audio and video signals between devices, such as TVs, monitors, and cameras.
• HDMI can support high resolutions and frame rates, making it ideal for multimedia applications.
• VGA (Video Graphics Array):
• VGA is an analog interface for transmitting video signals between devices, such as monitors and projectors.
• VGA is commonly used in embedded systems for low-cost, low-power display applications.
• PWM (Pulse-Width Modulation):
• PWM is a technique for controlling the output voltage of a microcontroller by varying the width of a pulse.
• PWM is commonly used in embedded systems for controlling the speed of motors, dimming LEDs, and generating audio
signals.
• Timers:
• Timers are hardware modules that can generate precise time intervals and trigger events at specific times.
• Timers are commonly used in embedded systems for timing and scheduling tasks, measuring time intervals, and generating
periodic signals.
• DMA (Direct Memory Access):
• DMA is a technique for transferring data between memory and peripherals without involving the CPU.
• DMA is commonly used in embedded systems to offload data transfer tasks from the CPU, improve performance, and reduce
power consumption.
1B-2
2A-1
2A-1
2A-1
2A-1
2A-1
2A-1
2A-1
2A-1
2A-1
Important Issues - {Extra}
• Partitioning: Deciding which components of an embedded system should be
implemented in hardware and which should be implemented in software.
• Interface Design: Designing the interfaces between the software and hardware
components to ensure correct communication and synchronization.
• Co-Simulation and Co-Verification: Ensuring the correctness and performance of the
integrated system through co-simulation and co-verification.
• System-Level Optimization: Optimizing the overall system performance, power
consumption, and cost through joint hardware and software optimization
techniques.
• Design for Testability: Designing the system components with testability in mind to
facilitate testing and debugging of the integrated system.
2A-1
Co-Simulation, Co-synthesis and Co-verification
• Co-simulation is a process of simulating both the software and hardware components of an
embedded system simultaneously.
• Co-simulation allows designers to evaluate the performance of the system as a whole,
taking into account the interactions between software and hardware.
• Co-simulation can be used to validate system-level requirements, optimize the design
parameters, and reduce the overall development time.
• Co-simulation requires accurate models of both the software and hardware components,
which may be provided by the vendors or developed in-house.
• Co-simulation can be implemented using specialized tools, such as SystemC or
SystemVerilog, that enable the integration of software and hardware models.
2A-2
Co-Simulation, Co-synthesis and Co-verification
• Co-synthesis is a process of synthesizing both the software and hardware components of an
embedded system together.
• Co-synthesis allows designers to optimize the system performance by generating hardware
accelerators for computationally intensive software functions.
• Co-synthesis can also reduce the system cost by minimizing the hardware resources
required for a given set of software functions.
• Co-synthesis requires accurate performance models of both the software and hardware
components, as well as a suitable optimization algorithm.
• Co-synthesis can be implemented using specialized tools, such as High-Level Synthesis (HLS)
or Electronic System-Level (ESL) tools, that enable the integration of software and hardware
design flows.
2A-2
Co-Simulation, Co-synthesis and Co-verification
• Co-verification is a process of verifying both the software and hardware components
of an embedded system together.
• Co-verification ensures that the software and hardware components of the system
are functionally correct and interact correctly with each other.
• Co-verification can detect and resolve the issues that may arise due to the software-
hardware interaction, such as timing constraints and communication protocols.
• Co-verification requires accurate models of both the software and hardware
components, as well as a suitable verification methodology, such as simulation or
formal verification.
• Co-verification can be implemented using specialized tools, such as Co-Emulation or
Co-Simulation tools, that enable the integration of software and hardware
verification flows. 2A-2
Co-design process overview
• Co-design is a collaborative design process that involves multiple disciplines working together to
create a system. In the context of embedded systems, co-design involves the integration of
hardware and software components to create a complete system
• Co-design Process Overview:
• Requirements Gathering: The first step in the co-design process is to gather the requirements of
the system. This includes the functional requirements of the system as well as any constraints, such
as power consumption, size, and cost.
• System Design: Once the requirements are gathered, the system design can begin. This involves
creating a high-level design of the system that defines the architecture, interfaces, and components
of the system.
• Hardware Design: With the high-level system design in place, the hardware design can begin. This
involves selecting and designing the physical components of the system, including the
microcontroller, sensors, actuators, and other hardware components.
• Software Design: The software design involves creating the software components of the system.
This includes the firmware that runs on the microcontroller, as well as any application software that
runs on a separate processor or computer.
• Integration and Testing: Once the hardware and software components are designed, they are
integrated and tested to ensure that they work together as a cohesive system. This involves both
functional testing and testing for compliance with any regulatory requirements.
• Deployment and Maintenance: After the system is tested and validated, it can be deployed in the
field. Ongoing maintenance and support may be required to ensure that the system continues to
function properly and meets the changing needs of its users. 2B-1
Development life cycles
• Development Life Cycle of an Embedded System:
• Requirements Gathering: As described above, the first step in the development life cycle is to
gather the requirements of the system.
• System Design: Once the requirements are gathered, the system design can begin. This includes
creating a high-level design of the system that defines the architecture, interfaces, and components
of the system.
• Hardware Design: With the high-level system design in place, the hardware design can begin. This
involves selecting and designing the physical components of the system, including the
microcontroller, sensors, actuators, and other hardware components.
• Software Design: The software design involves creating the software components of the system.
This includes the firmware that runs on the microcontroller, as well as any application software that
runs on a separate processor or computer.
• Implementation: After the hardware and software designs are complete, the system is
implemented by assembling the physical components and programming the microcontroller.
• Integration and Testing: Once the system is implemented, it is integrated and tested to ensure that
it works as intended. This involves both functional testing and testing for compliance with any
regulatory requirements.
• Deployment: After the system is tested and validated, it can be deployed in the field.
• Maintenance and Support: Ongoing maintenance and support may be required to ensure that the
system continues to function properly and meets the changing needs of its users.
2B-1
IDE role in Embedded Design
• An Integrated Development Environment (IDE) is a software tool that provides a comprehensive
development environment for creating embedded software. The IDE streamlines the development
process by providing a set of tools for editing, compiling, debugging, and deploying the software.
• Code Editing: The IDE provides a code editor that allows the developer to write, edit, and organize
the source code. The code editor typically includes features such as syntax highlighting, code
completion, and code templates to help the developer write code efficiently.
• Compiling and Building: The IDE includes a compiler that translates the source code into executable
code that can run on the target hardware. The IDE also includes tools for building the software, such
as linker and makefile tools that help automate the build process.
• Debugging: The IDE includes a debugger that allows the developer to test and debug the software.
The debugger provides tools for setting breakpoints, inspecting variables, and stepping through the
code to identify and fix errors.
• Device Emulation: The IDE may also include a device emulator that simulates the behavior of the
target hardware. This allows the developer to test the software on a virtual device before deploying
it to the actual hardware.
• Deployment: The IDE provides tools for deploying the software to the target hardware. This
includes tools for generating binary files, downloading the code to the hardware, and testing the
software in the actual environment.
2B-2
Major Applications of ESD
• Embedded systems are computer systems that are designed to perform specific functions within larger systems
or devices. They are found in a wide range of applications and industries, from consumer electronics to
automotive and aerospace systems.
• Consumer Electronics: Embedded systems are widely used in consumer electronics such as smartphones,
tablets, and home appliances. They are responsible for controlling the device's functionality, such as its display,
touch interface, and connectivity features.
• Automotive and Transportation: Embedded systems are used in various applications in the automotive and
transportation industries, including engine control systems, vehicle infotainment systems, and navigation
systems. They are also used in traffic control systems and public transportation systems.
• Medical Devices: Embedded systems are used in medical devices such as pacemakers, insulin pumps, and
patient monitoring systems. They are responsible for controlling the device's functionality and ensuring its
reliability and safety.
• Industrial Control Systems: Embedded systems are used in industrial control systems to monitor and control
various processes, such as manufacturing, production, and distribution. They are used in control systems for
robots, process control systems, and energy management systems.
• Aerospace and Defense: Embedded systems are used in aerospace and defense systems, such as spacecraft,
satellites, and military vehicles. They are responsible for controlling the system's functionality and ensuring its
reliability and safety.
• Communication Systems: Embedded systems are used in communication systems such as cellular networks,
Wi-Fi networks, and satellite communication systems. They are responsible for managing the communication
protocols and ensuring the reliability and security of the communication.
• Smart Grids: Embedded systems are used in smart grids to monitor and control the distribution of electricity.
They are responsible for managing the power grid's functionality and ensuring its reliability and safety.
3A-1
safety and reliability techniques
• Safety and reliability are critical concerns in embedded systems design, particularly in applications such as
automotive, medical, and aerospace systems where the consequences of failure can be severe.
• Fault Tolerance: Fault tolerance is the ability of a system to continue operating even in the presence of faults or
errors. One common technique used to achieve fault tolerance is redundancy, which involves duplicating
critical components or systems to ensure that there is always a backup in case of failure.
• Error Detection and Correction: Error detection and correction techniques are used to detect and correct
errors in data transmission or storage. These techniques can help ensure the integrity of data and prevent
system failures.
• Formal Verification: Formal verification is a technique for proving that a system or component meets its
specifications or requirements. This involves using mathematical models and analysis tools to ensure that the
system is correct and reliable. For example, in the design of a safety-critical system such as a nuclear power
plant control system, formal verification techniques can be used to ensure that the system meets its safety
requirements.
• Testing and Validation: Testing and validation are crucial for ensuring that embedded systems are reliable and
safe. This involves testing the system under various conditions to identify potential failures or errors. For
example, in the design of an automotive brake system, extensive testing is performed to ensure that the
system can stop the vehicle safely under a wide range of conditions.
• Safety-Critical Standards: Many industries have developed safety-critical standards and regulations that govern
the design and operation of embedded systems. These standards, such as ISO 26262 for automotive systems 3A-2
and IEC 62304 for medical devices, provide guidelines and requirements for ensuring the safety and reliability 3B-1
Proactive approach technique
• A proactive approach to safety in embedded systems involves identifying potential safety hazards and addressing them
during the design and development stages, rather than waiting for failures to occur and addressing them after the fact.
• Safety Requirements: The first step in a proactive approach to safety is to identify safety requirements for the system.
This involves analyzing the system and identifying potential hazards and risks, and defining safety requirements to
mitigate these risks. For example, in the design of a medical device, safety requirements may include requirements for
accuracy, reliability, and error detection and correction.
• Safety Analysis: Safety analysis is a process of systematically identifying and analyzing potential hazards and risks
associated with the system. This includes identifying potential failure modes and their causes, and determining the
likelihood and severity of each failure mode. Safety analysis can be used to inform the development of safety
requirements and to identify areas of the system that require additional safety measures.
• Safety Guidelines and Standards: Proactive safety in embedded systems can be supported by adhering to safety
guidelines and standards, such as those provided by industry organizations like ISO or IEC. These standards provide best
practices and guidelines for designing and developing safe embedded systems, including techniques for hazard
identification and mitigation.
• Testing and Verification: Proactive safety can also be supported by testing and verifying the system during the
development stage. This includes testing the system under various conditions and scenarios, including abnormal or edge
cases, to ensure that it is safe and reliable. Verification involves verifying that the system meets its safety requirements
and adheres to safety guidelines and standards.
• Continuous Monitoring and Improvement: Finally, a proactive approach to safety involves continuous monitoring and
improvement of the system. This involves monitoring the system for potential safety hazards and addressing them before
they become critical. Additionally, it involves evaluating the system's safety performance over time and continuously
improving it to ensure that it remains safe and reliable throughout its lifetime.
3B-2