0% found this document useful (0 votes)
16 views

Opens in A New Window: Types of Direct Memory Access (DMA)

Fzv3 149cc

Uploaded by

manikumarsk82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Opens in A New Window: Types of Direct Memory Access (DMA)

Fzv3 149cc

Uploaded by

manikumarsk82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

DMA, or Direct Memory Access, is a technique that allows

certain hardware subsystems to access main system memory


independently of the CPU. This offloads data transfer tasks
from the CPU, significantly improving system performance,
especially for high-speed data transfers like those involving
network interfaces, disk drives, and graphics cards.

Opens in a new window


www.geeksforgeeks.org
DMA block diagram
A DMA controller manages the data transfer process. It
receives a request from a peripheral device, configures the
DMA transfer parameters (source address, destination
address, transfer size, and transfer mode), and initiates the
data transfer. The DMA controller then takes control of the
system bus and directly transfers data between the
peripheral device and system memory. Once the transfer is
complete, the DMA controller generates an interrupt to
notify the CPU.
Types of Direct Memory Access (DMA)
There are four popular types of DMA.
• Single-Ended DMA
• Dual-Ended DMA
• Arbitrated-Ended DMA
• Interleaved DMA
Single-Ended DMA: Single-Ended DMA Controllers read and
write from a single memory address. They are the simplest
DMA.
Dual-Ended DMA: Dual-Ended DMA controllers can read and
write from two memory addresses. Dual-ended DMA is more
advanced than single-ended DMA.
Arbitrated-Ended DMA: Arbitrated-Ended DMA works by
reading and writing to several memory addresses. It is more
advanced than Dual-Ended DMA.
Interleaved DMA: Interleaved DMA are those DMA that read
from one memory address and write from another.
Explain the structure of OS with neat diagrams.
An operating system (OS) is a software layer that manages
hardware resources and provides application services. It
typically consists of the following layers:

Opens in a new window


www.javatpoint.com
OS layered structure
• Kernel: The core of the OS, responsible for managing
system resources like CPU, memory, and I/O devices. It
handles process scheduling, memory allocation, device
drivers, and system calls.
• Device Drivers: Software components that interface
with specific hardware devices, translating hardware-
specific commands into OS-level operations.
• System Libraries: A collection of reusable functions and
routines that provide common services to applications,
such as file I/O, network communication, and string
manipulation.
• User Applications: Programs that run on top of the OS
and interact with the user or perform specific tasks.

Layers of Operating System Architecture:

1. Hardware Layer: Interacts with peripheral devices (printer,


mouse, keyboard).
2. CPU Scheduling Layer: Manages process scheduling for
CPU allocation.
3. Memory Management Layer: Handles memory allocation,
swapping, and deallocation.
4. Process Management Layer: Manages process execution,
priority, and scheduling.
5. I/O Buffer Layer: Manages input/output device buffers.
6. User Programs Layer (Application Layer): Runs user
applications (word processors, games).

Advantages of Layered Structure:

1. Modularity: Each layer performs specific tasks.


2. Easy Debugging: Discrete layers simplify error
identification.
3. Easy Update: Modifications in one layer don't affect others.
4. No Direct Hardware Access: Hardware protection from user
modifications.
5. Abstraction: Layers hide implementation details from each
other.
Explain about computational models of an embedded
systems.
Embedded systems can be based on various computational
models, each with its own characteristics and advantages:
• Von Neumann Architecture: This is the most common
model, characterized by a single processor and a shared
memory space for both instructions and data. It's
suitable for general-purpose computing and many
embedded systems.
• Harvard Architecture: This model separates the memory
space for instructions and data, allowing for faster
instruction fetching and execution. It's often used in
digital signal processors (DSPs) and other high-
performance embedded systems.
• Parallel Processing: This model employs multiple
processors to execute tasks concurrently, improving
performance for computationally intensive applications.
• Distributed Systems: This model involves multiple
processors connected over a network, enabling
distributed computation and resource sharing.
• Explain the differences between the host machine and
the target machine.
Feature Host Machine Target Machine
Development Execution
Purpose
platform platform
Lower
Processing
Generally higher processing
Power
power
Memory Larger memory Limited memory
Full-fledged OS
Operating Embedded OS or
(Windows, Linux,
System no OS
macOS)
Specialized
Input/Output Keyboard, mouse,
devices (sensors,
Devices monitor, etc.
actuators)
IDEs, compilers, Limited or no
Software Tools
debuggers software tools
Development User-friendly Limited or no
Environment environment user interface
Explain software development tools.
1. Integrated Development Environments (IDEs)
- Comprehensive software suites for coding, debugging,
and testing.
2. Compilers and Assemblers
- Tools translating code into machine-readable format.
3. Debuggers
- Software analyzing and resolving code errors.
4. Simulators and Emulators
- Virtual environments mimicking hardware behavior.
5. Version Control Systems
- Tools managing code changes and collaborations.
6. Build Tools
- Automation software streamlining compilation processes.
7. Real-Time Operating Systems (RTOS)
- Multitasking platforms ensuring timely task execution.
8. Libraries and Frameworks
- Pre-written code repositories simplifying development.
Converting Code to Machine Language

Step 1: Preprocessing
- Prepares code for translation.

Step 2: Compilation
- Breaks code into small parts (Lexical Analysis).
- Checks code grammar (Syntax Analysis).
- Ensures code makes sense (Semantic Analysis).
- Creates temporary code (Intermediate Code Generation).
- Optimizes code for speed (Code Optimization).
- Translates to machine language (Code Generation).

Step 3: Assembly
- Translates assembly language to machine code.
- Creates object file.

Step 4: Linking
- Combines object files and libraries.
- Connects code references.
- Generates final executable file.
Integration of Hardware and Software Techniques
The integration of hardware and software is a critical step in
the development of embedded systems. It involves
combining the physical components (hardware) with the
logical components (software) to create a functional system.
Key Steps in Hardware-Software Integration:
1. Hardware Design and Development:
o System Architecture: Define the overall system
architecture, including the choice of processor,
memory, and peripheral devices.
o Circuit Design: Design the hardware circuits,
including digital logic and analog circuitry.
o PCB Design: Design the printed circuit board (PCB)
layout to connect the hardware components.
o Hardware Testing: Test the hardware components
individually and as a system to ensure they meet
specifications.
2. Software Development:
o Requirements Analysis: Define the software's
functional and non-functional requirements.
o Software Design: Design the software architecture,
modules, and algorithms.
o Coding: Implement the software using a suitable
programming language (e.g., C, C++).
o Software Testing: Test the software for correctness
and performance.
3. Hardware-Software Interface Design:
o Define Communication Protocols: Establish
protocols for communication between hardware
and software components (e.g., memory-mapped
I/O, interrupt-driven I/O, serial communication).
o Design Hardware-Software Interfaces: Develop
interfaces to connect hardware components to
software modules.
o Implement Device Drivers: Write device drivers to
control hardware devices from software.
4. Integration and Testing:
o Combine Hardware and Software: Physically
connect the hardware components and load the
software onto the target system.
o System Integration Testing: Test the integrated
system to ensure it meets all functional and
performance requirements.
o Debugging: Identify and fix any issues that arise
during integration and testing.
Debugging Techniques for Embedded Systems
• Hardware Debuggers:
o Provide low-level access to the target hardware.
o Can be used to inspect registers, memory, and I/O
ports.
o Often require specialized hardware and software.
• Software-Based Debuggers:
o Run on the host computer and communicate with
the target system through a serial or JTAG interface.
o Less powerful than hardware debuggers but more
accessible.
• Simulation and Emulation:
o Simulate the behavior of the target hardware on a
host computer.
o Identify and fix issues early in the development
process.
Boundary Scan Technique

What: Tests digital circuits without touching them.

How:

1. Special test port (TAP) in each chip.


2. Small control circuit (TLB) manages test.
3. Special cells connect to chip inputs/outputs.

Test Steps:

1. Enter test mode.


2. Send test data.
3. Capture data.
4. Check response.

Benefits:

1. No physical touch needed.


2. Finds faults early.
3. Faster testing.
4. Better fault detection.

Limitations:

1. May miss some faults.


2. Costs more.
3. Adds complexity.

You might also like