The document discusses direct memory access (DMA) and interrupts. It describes how DMA allows direct data transfer between memory and I/O devices without involving the CPU. This is handled by a DMA controller through a request-grant handshake using HOLD and HLDA pins. The document also categorizes different types of interrupts like hardware, software and exceptions. It explains how interrupts alter program flow and are serviced by interrupt service routines (ISRs) through an interrupt vector table.
(Ref : Computer System Architecture by Morris Mano 3rd edition) : Microprogrammed Control unit, micro instructions, micro operations, symbolic and binary microprogram.
(Ref : Computer System Architecture by Morris Mano 3rd edition) : Microprogrammed Control unit, micro instructions, micro operations, symbolic and binary microprogram.
Full information of about CPU register and type of CPU registers,
Use of registers in computer and their basic operation, category of registers and how to use them, flag register.
Full information of about CPU register and type of CPU registers,
Use of registers in computer and their basic operation, category of registers and how to use them, flag register.
This slide deals with the Input-Output Channel of an IBM 370 computer. It includes three Block diagrams of the I-O channels as well as the Memory Unit with the Description of each and every diagrams.
Online aptitude test management system project report.pdfKamal Acharya
The purpose of on-line aptitude test system is to take online test in an efficient manner and no time wasting for checking the paper. The main objective of on-line aptitude test system is to efficiently evaluate the candidate thoroughly through a fully automated system that not only saves lot of time but also gives fast results. For students they give papers according to their convenience and time and there is no need of using extra thing like paper, pen etc. This can be used in educational institutions as well as in corporate world. Can be used anywhere any time as it is a web based application (user Location doesn’t matter). No restriction that examiner has to be present when the candidate takes the test.
Every time when lecturers/professors need to conduct examinations they have to sit down think about the questions and then create a whole new set of questions for each and every exam. In some cases the professor may want to give an open book online exam that is the student can take the exam any time anywhere, but the student might have to answer the questions in a limited time period. The professor may want to change the sequence of questions for every student. The problem that a student has is whenever a date for the exam is declared the student has to take it and there is no way he can take it at some other time. This project will create an interface for the examiner to create and store questions in a repository. It will also create an interface for the student to take examinations at his convenience and the questions and/or exams may be timed. Thereby creating an application which can be used by examiners and examinee’s simultaneously.
Examination System is very useful for Teachers/Professors. As in the teaching profession, you are responsible for writing question papers. In the conventional method, you write the question paper on paper, keep question papers separate from answers and all this information you have to keep in a locker to avoid unauthorized access. Using the Examination System you can create a question paper and everything will be written to a single exam file in encrypted format. You can set the General and Administrator password to avoid unauthorized access to your question paper. Every time you start the examination, the program shuffles all the questions and selects them randomly from the database, which reduces the chances of memorizing the questions.
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
HEAP SORT ILLUSTRATED WITH HEAPIFY, BUILD HEAP FOR DYNAMIC ARRAYS.
Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first find the minimum element and place the minimum element at the beginning. Repeat the same process for the remaining elements.
A review on techniques and modelling methodologies used for checking electrom...nooriasukmaningtyas
The proper function of the integrated circuit (IC) in an inhibiting electromagnetic environment has always been a serious concern throughout the decades of revolution in the world of electronics, from disjunct devices to today’s integrated circuit technology, where billions of transistors are combined on a single chip. The automotive industry and smart vehicles in particular, are confronting design issues such as being prone to electromagnetic interference (EMI). Electronic control devices calculate incorrect outputs because of EMI and sensors give misleading values which can prove fatal in case of automotives. In this paper, the authors have non exhaustively tried to review research work concerned with the investigation of EMI in ICs and prediction of this EMI using various modelling methodologies and measurement setups.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
TOP 10 B TECH COLLEGES IN JAIPUR 2024.pptxnikitacareer3
Looking for the best engineering colleges in Jaipur for 2024?
Check out our list of the top 10 B.Tech colleges to help you make the right choice for your future career!
1) MNIT
2) MANIPAL UNIV
3) LNMIIT
4) NIMS UNIV
5) JECRC
6) VIVEKANANDA GLOBAL UNIV
7) BIT JAIPUR
8) APEX UNIV
9) AMITY UNIV.
10) JNU
TO KNOW MORE ABOUT COLLEGES, FEES AND PLACEMENT, WATCH THE FULL VIDEO GIVEN BELOW ON "TOP 10 B TECH COLLEGES IN JAIPUR"
https://www.youtube.com/watch?v=vSNje0MBh7g
VISIT CAREER MANTRA PORTAL TO KNOW MORE ABOUT COLLEGES/UNIVERSITITES in Jaipur:
https://careermantra.net/colleges/3378/Jaipur/b-tech
Get all the information you need to plan your next steps in your medical career with Career Mantra!
https://careermantra.net/
ACEP Magazine edition 4th launched on 05.06.2024Rahul
This document provides information about the third edition of the magazine "Sthapatya" published by the Association of Civil Engineers (Practicing) Aurangabad. It includes messages from current and past presidents of ACEP, memories and photos from past ACEP events, information on life time achievement awards given by ACEP, and a technical article on concrete maintenance, repairs and strengthening. The document highlights activities of ACEP and provides a technical educational article for members.
1. Page 1
Direct Memory Access
By,
Sharmila Chidaravalli
Assistant Professor,
Department of CS&E,
AIeMS
2. Page 2
Introduction
The direct memory access (DMA) I/O technique provides
direct access to the memory while the microprocessor is
temporarily disabled.
• A DMA controller temporarily borrows the address bus, data
bus, and control bus from the microprocessor and transfers the
data bytes directly between an I/O port and a series of memory
locations.
• The DMA transfer is also used to do high-speed memory-to
memory transfers.
• Used in disk controllers, video/sound cards etc, or between
memory locations.
3. Page 3
Basic DMA operation
• Two control signals are used to request and acknowledge a
DMA transfer in the microprocessor-based system.
HOLD pin - is an input used to request a DMA action
HLDA pin - is an output that acknowledges the DMA action
4. Page 4
•The HOLD signal is a bus request signal which asks the
microprocessor to release control of the buses after the current bus
cycle.
•HOLD is sampled in any clocking cycle
•when the processor recognizes the hold, it stops executing software
and enters hold cycles
• The HLDA signal is a bus grant signal which indicates that the
microprocessor has indeed released control of its buses by placing
the buses at their high-impedance states.
• The HOLD input has a higher priority than the INTR or NMI
interrupt inputs.
5. Page 5
Basic DMA Definitions
Direct memory accesses normally occur between an I/O device
and memory without the use of the microprocessor.
DMA read - transfers data from the memory
to the I/O device
DMA write - transfers data from an I/O device
to memory
Memory & I/O are controlled simultaneously.
which is why the system contains separate memory and
I/O control signals
6. Page 6
A DMA read causes the MRDC and IOWC signals to activate
simultaneously.
-transferring data from memory to the I/O device
A DMA write causes the MWTC and IORC signals to both
activate.
The control Buses are available to all microprocessors in the Intel
family expect 8086/8088.
8086/8088 require a controller or circuit for control bus signal
generation.
7. Page 7
Data transfers are performed by the control circuit that is a part of the I/O device
interface called DMA controller
DMA controller can transfer data without intervention of the processor, but its
operation must be under the control of a program executed by the processor.
To initiate the transfer of a block words, the processor sends the starting address,
the number of words in the block and the direction of the transfer.
Data transfer speed is determined by speed of the memory device or a DMA
controller.
-if memory speed is 50 ns, DMA transfers occur at rates up to 1/50 ns or 20
M bytes per second
-if the DMA controller functions at a maximum rate of 15 MHz with 50 ns
memory, maximum transfer rate is 15 MHz because the DMA controller is
slower than the memory
In many cases, the DMA controller slows the speed of the system when transfers
occur.
8. Page 8
• DMA is implemented using a DMA controller
– DMA controller
• Acts as slave to processor
• Receives instructions from processor
– Processor gives details to the DMA controller
» I/O device number
» Main memory Starting address
» Number of bytes to transfer
» Direction of transfer (memory I/O device, or
vice versa)
• On receiving this information, the DMA controller proceeds to
perform the requested operation.
• After completing, it informs the processor
9. Page 9
• Steps in a DMA operation
– Processor initiates the DMA controller
• Gives device number, memory buffer pointer, …
– Called channel initialization
• Once initialized, it is ready for data transfer
– When ready, I/O device informs the DMA controller
• DMA controller starts the data transfer process
– Obtains bus by going through bus arbitration
– Places memory address and appropriate control signals
– Completes transfer and releases the bus
– Updates memory address and count value
– If more to read, loops back to repeat the process
– Notify the processor when done
• Typically uses an interrupt
11. Page 11
What Are Interrupts ?
Interrupts alter a program’s flow of control
∗ Behavior is similar to a procedure call
» Some significant differences between the two
• Interrupt causes transfer of control to an interrupt
service routine (ISR) or Interrupt Service Procedure
» ISR is also called a handler
• When the ISR is completed, the original program resumes
execution
• Interrupts provide an efficient way to handle unanticipated
events
15. Page 15
The processor uses the interrupt vector to determine the address of
the ISR of the interrupting device.
In the 8088/8086 processor as well as in the 80386/80486/Pentium
processors operating in Real Mode (16-bit operation), the interrupt
vector is a pointer to the Interrupt Vector Table.
The Interrupt Vector Table occupies the address range from 00000H
to 003FFH (the first 1024 bytes in the memory map).
Each entry in the Interrupt Vector Table is 4 bytes long:
The first two represent the offset address and the last two the segment address
of the ISR.
The first 5 vectors are reserved by Intel to be used by the processor.
The vectors 5 to 255 are free to be used by the user.
16. Page 16
• Interrupt numbers range from 0 to 255
• Interrupt number acts as an index into the interrupt vector table
• Since each vector takes 4 bytes, interrupt number is multiplied by 4
to get the corresponding ISR pointer
Example
• For interrupt 2, the memory address is 2 ∗ 4 = 8H
• The first two bytes at 8H are taken as the offset value
• The next two bytes (i.e., at address AH) are used as the CS value
17. Page 17
Interrupt Types
Type 0: Divide error – Division overflow or division by zero
Type 1: Single step or Trap – After the execution of each instruction
when trap flag set
Type 2: NMI Hardware Interrupt – ‘1’ in the NMI pin
Type 3: One-byte Interrupt – INT3 instruction (used for
breakpoints)
Type 4: Overflow – INTO instruction with an overflow flag
Type 5: BOUND – Register contents out-of-bounds
Type 6: Invalid Opcode – Undefined opcode occurred in program
Type 7: Coprocessor not available – MSW indicates a coprocessor
Type 8: Double Fault – Two separate interrupts occur during the
same instruction
Type 9: Coprocessor Segment Overrun – Coprocessor call operand
exceeds FFFFH
18. Page 18
Interrupt Types
Type 10: Invalid Task State Segment – TSS invalid (probably not
initialized)
Type 11: Segment not present – Descriptor P bit indicates segment
not present or invalid
Type 12: Stack Segment Overrun – Stack segment not present or
exceeded
Type 13: General Protection – Protection violation in 286 (general
protection fault)
Type 14: Page Fault – 80386 and above
Type 16: Coprocessor Error – ERROR΄ = ‘0’ (80386 and above)
Type 17: Alignment Check – Word/Doubleword data addressed at
odd location (486 and above)
Type 18: Machine Check – Memory Management interrupt
(Pentium and above)
19. Page 19
Operation of a Real Mode Interrupt
Push Flags
Clear IF
Clear TF
Push CS
Push IP
Fetch ISR Address
Pop IP
Pop CS
Pop Flags
Mainline Program
ISR
Push Register
Pop Register
IRET
20. Page 20
Operation of a Protected Mode Interrupt
In the 80386/80486/Pentium processors operating in the Protected
Mode (32-bit operation), the interrupt vector is a pointer to the
Interrupt Descriptor Table.
The Interrupt Descriptor Table can be located anywhere in the
memory.
Its starting address is pointed by the Interrupt Descriptor Table Register
(IDTR).
Each entry in the Interrupt Vector Table is 8 bytes long:
Four bytes represent the 32-bit offset address, two the segment selector and
the rest information such as the privilege level.
The first 32 vectors are reserved by Intel to be used by the
processor.
The vectors 33 to 255 are free to be used by the user.
0
2
4
6
1
3
5
7 Offset (A31 - A16)
Offset (A15 - A0)
Segment Selector
00H01110PFThe protected mode
interrupt descriptor
21. Page 21
Exception Interrupts
Divide by zero error
CPU generates a type 0 interrupt whenever the div/idiv
instructions result in a quotient that is larger than the
destination specified or an attempt is made to divide by zero.
Single step Interrupt
∗ Useful in debugging
∗ To single step, Trap Flag (TF) should be set
∗ CPU automatically generates a type 1 interrupt after
executing each instruction if TF is set
∗ Type 1 ISR can be used to present the system state to
the user
22. Page 22
Exception Interrupts
There exists no instruction to directly set or reset trap flag.
TF=1 can be set by executing the following sequence of instructions:
PUSHF
MOV BP,SP
OR WORD PTR[BP+0],0100H
POPF
TF=0 can be set by executing the following sequence of instructions:
PUSHF
MOV BP,SP
AND WORD PTR[BP+0],0FEFFH
POPF
23. Page 23
Software Interrupts
Initiated by executing an instruction
INT, INTO, INT 3, BOUND
INT and INT3 behave in a similar way.
INT n:
- n is an integer from range 0 to 255
- Calls ISR located at vector n (n*4).
- The INT instruction requires two bytes of memory, opcode
plus n.
- Each interrupt type can be parameterized to provide
several services.
- For example, DOS interrupt service int 21H
provides more than 80 different services
∗ AH register is used to identify the required
service under int 21H.
24. Page 24
BOUND and INTO are both conditional.
BOUND:
Bound AX,DATA
AX is compared with DATA and DATA+1, if less than an
interrupt occurs.
AX is compared with DATA+2 and DATA+3, if greater than an
interrupt occurs.
INTO:
Checks the overflow flag (OF). If OF=1, the ISR is called.
IRET removes 6 bytes from the stack, 2 for IP, 2 for CS and 2 for
FLAGS.
25. Page 25
Hardware Interrupts
• Software interrupts are synchronous events
∗ Caused by executing the int
instruction
• Hardware interrupts are of hardware origin and
asynchronous in nature
∗ Typically caused by applying an
electrical signal to the processor chip
• Hardware interrupts can be
∗ Maskable (INTR)
∗ Non-maskable (NMI)
» Causes a type 2 interrupt
26. Page 26
Non-Maskable Interrupt
Non-maskable interrupt is triggered by applying an electrical signal to
the NMI pin of Pentium
∗ Processor always responds to this signal
∗ Cannot be disabled under program control
The non-maskable interrupt (NMI) is an edge-triggered input that
requests an interrupt on the positive edge (0-to-1 transition).
after a positive edge, the NMI pin must remain logic 1 until
recognized by the microprocessor
before the positive edge is recognized, NMI pin must be logic 0
for at least two clocking periods
The NMI input is often used for parity errors and other major faults,
such as power failures.
power failures are easily detected by monitoring the AC power
line and causing an NMI interrupt whenever AC power drops out .
27. Page 27
INTR and INTA
The INTR pin must be externally decoded to select a vector.
Any vector is possible, but the interrupt vectors between
20H and FFH are usually used (Intel reserves vectors
between 00H and 1FH).
INTA is an output of the microprocessor to signal the external
decoder to place the interrupt number on data bus connections
D7-D0.
The INTR pin is set by an external device (8259A) and cleared
in the ISR.
The input is automatically disabled by the microprocessor
once it is recognized and re-enabled by IRET or IRETD
instruction.
28. Page 28
INTR: Interrupt Request. Activated by a peripheral device to
interrupt the processor.
Level triggered. Activated with a logic 1.
INTA: Interrupt Acknowledge. Activated by the processor to
inform the interrupting device the interrupt request (INTR) is
accepted.
Level triggered. Activated with a logic 0.