Imporatant Questions & Answers In Embedded Systems

  What is an embedded computing system? Write two functionalities of an embedded system.

  • An embedded system is 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.
Functionalities

  • An embedded system makes a system dedicated to being used for a variety of application and It provides high reliability and real-time computation ability.
  • Embedded system generally used to do a specific task that provides a real-time output based on various characteristics of an embedded system.
Explain the problems of hardware-software co-design in an embedded system.

Fundamental issues in H/w S/w Co-design

  •  Model Selection - A Model captures and describes the system characteristics and specifications.  It is hard to make a decision on which model should be followed in particular system design. Most often designers switch between a variety of models from the requirements specification to the implementation aspect of the system design. The objectives vary with each phase.
  • Architecture Selection - The architecture specifies how a system is going to implement in terms of the number and types of different components and the interconnection among them. CISC, RISC,  VLIW, etc are the commonly used architectures in system design.
  • Language Selection - A programming Language captures a ‘Computational Model’ and maps it into architecture. A model can be captured using multiple programming languages like C, C++, C#, Java etc for software implementations and languages like VHDL, System C, Verilog etc for hardware implementations.
  •  H/w and S/w Partitioning - it is an Implementation aspect of a System-level Requirement. Various hardware-software trade-offs like performance, re-usability, effort etc are used for making a decision on the hardware-software partitioning.
Draw a concurrent program model for Seat Belt Warning System of an automobile.




Explain the library file in the assembly language context. What is the 'library file'.

Libraries are specially formatted, ordered collection of object modules that may be used by the linker at a later time.
Benefits 
  • Library file is a kind of source hiding technique.
  • Helps in easier programming
e.g: LIB 51 for Keil


Briefly describe out of circuit programming in Embedded System.

  • Out-of-circuit programming is performed outside the target board. 
  • The processor or memory chip into which the firmware needs to embedded is taken out of the target board and it is programmed with the help of programming device. 
  • A programming device is a dedicated unit when contains the necessary hardware circuit to generate the programming signals. 
  • The programmer contains a ZIF socket with locking pin to hold the device to be programmed. 
  • The programming device will be under the control of a utility program running on a PC. 
  • The programmer is interfaced to the PC through RS-232C/USB/Parallel Port Interface. 
  • The commands to control the programmer are sent from the utility program to the programmer through the interface. 


Differentiate generic IDEs with IDEs used in embedded firmware development with suitable examples.

Generic IDE
  • A generic integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development.
  • An IDE normally consists of at least a source code editor, build automation tools and a debugger.
  • Examples: NetBeans and Eclipse etc
IDEs used in embedded firmware development
  • Embedded system IDE stands for an Integrated Environment for developing and debugging the target processor specific embedded software.
  • IDE is a software package which contains:
Text Editor(Source Code Editor)
Cross Compiler
Linker and debugger.
  • Some IDEs may provide an interface to an emulator or device programmer.
  •  
Explain hard real-time considerations and soft real-time considerations.

Hard real-time
  • In a hard real-time system, the size of the data file is small or medium.
  • In this system response time is in a millisecond.
  • In this system safety is critical.
  • For example Air Traffic Control, Medical System 
Soft real-time
  • In soft real-time system, the size of the data file is large.
  • In this system response time are higher.
  • In this system, safety is not critical.
  • For example Multimedia Transmission and Reception, Computer Games 

Differentiate monolithic kernel with microkernel.

What is the Difference Between Microkernel and Monolithic Kernel ...

Explain System on Chip technique (SOC).

  • A system on a chip (SoC) combines the required electronic circuits of various computer components onto a single, integrated chip (IC).
  •  SoC is a complete electronic substrate system that may contain analog, digital, mixed-signal or radio frequency functions. 
  • Its components usually include a graphical processing unit (GPU), a central processing unit (CPU) that may be multi-core, and system memory (RAM).
  • SOC includes both the hardware and software, it uses less power, has better performance, requires less space and is more reliable than multi-chip systems. 
  • Most system-on-chips today come inside mobile devices like smartphones and tablets.
Write any 4 bottlenecks available in the embedded industry.

Following are some of the problems faced by the embedded devices industry:

  •  Memory Performance- The rate at which processors can process may have increased considerably but the rate at which memory speed is increasing is slower.
  • Lack of Standards/ Conformance to standards- Standards in the embedded industry are followed only in certain handful areas like Mobile handsets.
  • Lack of Skilled Resource- The most important aspect in the development of the embedded system is the availability of skilled labour. There may be thousands of developers who know how to code in C, C++, Java or .NET but very few in embedded software.
  • • Size
  • • Power
  • • Performance
  • • Cost


 With a suitable example, explain the specification phase of an embedded system.

  • Requirements gathered is refined into a specification. 
  • Specification serves as the contract between the customers and the architects.
  • Specification is essential to create working systems with a minimum of designer effort. It must be specific, understandable and accurately reflect the customer’s requirements.

  • Example:
    Considering the example of the GPS system, the specification would include details for several components:
    • Data received from the GPS satellite constellation
    • Map data
    • User interface
    • Operations that must be performed to satisfy customer requests
    • Background actions 


    Show the UML representation of an object and a class with a suitable example.

    Object Diagram Example: Writer



    Design a coin-operated public telephone unit based on FSM model for the 
    following requirements.

    1. The calling process is initiated by lifting the receiver (off-hook) of the
    telephone unit.
    2. After lifting the phone the user needs to insert a 1 rupee coin to make
    the call.
    3. If the line is busy, the coin is returned on placing the receiver back on
    the hook (on-hook).
    4. If the line is through, the user is allowed to talk till 60 seconds and at the
    end of 45th second, prompt for inserting another one rupee coin
    for continuing the call is initiated.
    5. If the user doesn't insert another 1 rupee coin, the call is terminated on
    completing the 60 seconds time slot.
    6. The system is ready to accept new call request when the receiver is
    placed back on the hook (on-hook).
    7. The system goes to the "Out of Order" state when there is a line fault.


    List and explain the non functional requirements in an embedded system.

    Non-functional requirements
    • Time required to compute output.
    • Size: The physical space required by the system, measured in bytes for software and gates or transistor for hardware.
    • Weight 
    • Power consumption: The amount of power consumed by a system which decides the lifetime of battery or cooling requirements of IC.
    • Reliability
    • Speed of the system
    • Cost: Target cost, purchase cost, manufacturing cost


    Draw a class diagram for a basic microwave oven, cooking time should be adjusted from 1 min to 60 min. Include classes for door, front panel and heating elements.






    With a neat diagram explain the steps in converting assembly language to machine language.

    • Assembly language provides mnemonics or symbols for the machine level code instructions. 
    • Assembly language program is consisting of mnemonics that are translated into machine code. 
    • A program that is used for this conversion is known as an assembler.
    Steps

    Assembly Language


    • Editor Program: At first, we use an editor for type in a program. Editors like MS-DOS program that comes with all Microsoft operating systems can be used for creating or edit a program. The editor produces an ASCII file. The ?asm? extension for a source file is used by an assembler during the next step.
    • Assembler Program: The "asm" source file contains the code created in Step 1. It is transferred to an 8051 assembler. The assembler is used for converting the assembly language instructions into machine code instructions and it produced the .obj file (object file) and .lst file (list file). It is also called a source file because some assembler requires that this file must have "src" extension.
    • Linker Program: The linker program is used for generating one or more object files and produces an absolute object file with an extension "abs".
    • OH Program: The OH program fetches the "abs" file and fed it to a program called "OH". OH is called an object to hex converter it creates a file with an extension "hex" that is ready for burn into the ROM.

    Explain the Debuggers used in Embedded System Development Environment.

    • A debugger is a tool used to debug your code and to test whether the code you is free from errors or not.
    • Debugger goes through the whole code and tests it for errors and bugs.
    • It tests your code for different types of errors, for example, a run time error or a syntax error and notifies you wherever it occurs.
    • The line number or location of the error is shown by debugger so you can go ahead and rectify it.
    • A debugger allows a programmer to stop a program at any point and examine and change the values of the variables.
    Briefly describe (i) decompiler (ii) disassemblers


    Is it possible to embed the firmware into the target processor/controller memory at the time of chip fabrication? Justify your answer.

    It is possible to embed the firmware into the target processor/controller memory at the time of chip fabrication itself. Such chips are known as ‘Factory Programmed Chips'.
    IT is used for mass production applications and reduces product development time.
    IT Can‟t be used if firmware undergoes frequent changes

    Explain the merits and demerits of assembly language based embedded firmware development.




    Consider a mobile phone device and look at the main menu. Explain how the events of touching the screen at different points on the screen are handled by an RTOS using two-level SR handling.

    ISRs have higher priorities over the RTOS functions and the tasks.
    Example:
    • Each device event has the codes for an ISR, which executes only on scheduling it by the RTOS and provided an interrupt is pending for its service. 
    • Assume that using an RTOS, the touch screen ISR, ISR_TouchScreen has been created using function OS_ISR_Create ( ).
    • The ISR can share the memory heap with other ISRs.
    • A function, IntConnect connects the touch screen event with the event identifier in an interrupt handler, ISR_handler.
    • When a touch screen event occurs on tap at the screen to select icon or menu the OS sends the signal on behalf of the ISR_handler to the waiting ISR_TouchScreen. 
    • ISR_TouchScreen runs on an interrupt call message.
    • ISR_TouchScreen executes as per its priority, IST_TouchScreenPriority among the other pending ISRs before it starts executing.
    • Before return from the ISR_TouchScreen, it sends a message to the kernel using a function OS_eventPost ( ) or OS_ISR_Exit ( ) just before the end of the codes in the ISR_TouchScreen.

    Explain the memory model of a thread in an operating system

    • Memory model describes the interactions of threads through memory and their shared use of the data.
    • A memory model allows a compiler to perform many important optimizations. 
    • Compiler optimizations like loop fusion move statements in the program, which can influence the order of reading and write operations of potentially shared variables.
    •  Changes in the ordering of reads and writes can cause race conditions. 
    • Without a memory model, a compiler is not allowed to apply such optimizations to multi-threaded programs in general, or only in special cases
    Depict four reasons to build network-based embedded systems.

    • Provides resource sharing (sharing of files, applications or hardware, an Internet connection, etc.)
    • Provides Communication support (email, live discussions, etc.)
    • Processes Communication (communication between industrial computers)
    • Provides access to information: Guarantees full access to information for a specified group of people through networked databases
    • Supports Multiplayer video games

    Imagine yourself as an Embedded System developer. A client approached your
    team to make an automated Coffee Vending machine. Develop requirements
    description of the machine.

    User Level Requirements :
    • The user shall get an empty cup placed right below the filter.
    • The user shall be able to choose his preferred beverage from the list of options(buttons).
    • There must be buttons(start, pause, stop, coffee, tea, milk) for a user to interact with the system.
    • The user shall be able to purchase one kind of available drink at a time and get back the exact changes if he has put extra money.
    • The user shall be able to quit the dispense of any beverage at any time during the dispensing.
    2.System-Level Requirements:
    • The system(machine) shall check for properly inserted coins.
    • The system shall be able to dispense coffee(or selected beverage) after a con has been inserted.
    • The system shall be able to detect the low amount of ingredients and a low number of cups and indicate with an indicator(small LED).


    Draw the Finite State Machine diagram for an automated Coffee Vending Machine
    enter image description here


    Describe the sequence diagram for a mouse click scenario. 
    Draw the Use case diagram for Seat Belt Warning System with explanation



    What is ‘Inline Assembly’ ? Explain with an example.

    Explain different types of files generated after cross-compilation.

    Once the compile button is clicked, myFile.asm is given to “Assembler Program”. This program produces 2 files, 1). myFile.lst and 2). myFile.obj

    .lst file: This file contains all the opcodes and the addresses as well as the errors that are detected by the assembler.

    .obj file : This is the object file.

    Now, the myFile.obj is given to the “Linker Program” with the other object file files to be linked. The linker again gives out 2 files 1). myFile.abs and 2). myFile.map

    .map : This file contains the information about how much memory is used, details regarding the stack etc.

    .abs file: This is an absolute file, which is passed on to further processes of compiling.

    Now the myFile.abs is given to “OH Program” (This is the program which converts the Object to Hex.). Finally, the OH Program outputs the file called “myFile.exe”. This can be loaded for execution.


    Three processes with process IDs P1, P2, P3 with estimated completion time 6,
    8, 2 milliseconds respectively, enters the ready queue together in the order.
    Process P4 with estimated execution completion time 4 milliseconds enters the
    ready queue after 1 millisecond. (Assuming there is no I/O waiting for the
    processes) in non- preemptive SJF scheduling algorithm.

    No comments:

    Post a Comment

    Monk and Inversions

    using System; public class Solution { public static void Main () { int T = Convert . ToInt32 ( Console . ReadLine...