Unit5 - COA (Autosaved)
Unit5 - COA (Autosaved)
Unit5 - COA (Autosaved)
Unit: 5
Swarnima LDCA 5
1
05/17/24
Evaluation scheme
Other applications
computer system
CO 2 Analyze the design of arithmetic & logic unit and understand the K1, K4
• These relate to the skills, knowledge, and behavior that students acquire
through the programmed.
1. Engineering knowledge
2. Problem analysis 9. Individual and team work
3. Design/development of solutions 10. Communication
4. Conduct investigations of complex 11. Project management and
problems finance
5. Modern tool usage 12. Life-long learning
6. The engineer and society
7. Environment and sustainability
8. Ethics
Average 2.6 2 1.8 1.4 1.6 1 0.8 0.4 1.2 1.4 1.2 2
Computer 100%
Organization
and Architecture
Renewable 98.57%
Energy
Resources
Universal 90.74%
Human Values
Introduction to 95.61%
Microprocessor
Question Paper
Template -100 Marks
The Logic Design & Computer Architecture is one of the most important and
comprehensive subject that includes many foundational concepts and
knowledge used in design of a computer system. This subject provides in-depth
knowledge of internal working, structuring, and implementation of a computer
system.
The LDCA important topics include all the fundamental concepts such
as computer system functional units , processor micro architecture , program
instructions, instruction formats , addressing modes , instruction pipelining,
memory organization , instruction cycle, interrupts and other important related
topics.
Input/output
Peripheral devices
I/O interface & I/O ports
Interrupts: interrupt hardware, types of interrupts and exceptions.
Modes of Data Transfer:
Programmed I/O, interrupt initiated I/O
Direct Memory Access.,
I/O channels and processors.
Serial Communication: Synchronous & asynchronous communication
standard communication interfaces.
Swarnima LDCA 5
05/17/24 17
Course Objective
Swarnima LDCA 5
05/17/24 18
Course Outcome
Swarnima LDCA 5
05/17/24 19
CO-PO Mapping
CO.K PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
KCS-
502.5 2 2 2 1 2 1 1 1 1 2 2 2
05/17/24 20
Swarnima LDCA 5
CO- PSO Mapping
Swarnima LDCA 5
05/17/24 21
Prerequisite and Recap
• Basics of Computer
• Control Unit
Swarnima LDCA 5
05/17/24 22
Peripheral devices
A peripheral is a device that can be attached to the computer processor.
• Devices are usually classified as input, output or backing
storage devices.
Peripheral devices can be external or internal.
Swarnima LDCA 5
05/17/24 23
Peripheral devices
Swarnima LDCA 5
05/17/24 24
Peripheral devices
Swarnima LDCA 5
05/17/24 26
Input Output interface
Swarnima LDCA 5
05/17/24 27
Input Output bus and interface module
Swarnima LDCA 5
05/17/24 28
Input Output bus and interface module
Each interface decodes the address and control received from the
I/O bus, interprets them for the peripheral, and provides signals
for the peripheral controller. It also synchronizes the data flow
and supervises the transfer between peripheral and processor. Each
peripheral has its own controller that operates the particular
electromechanical device. for example, the printer controller
controls the paper motion, the print timing, and the selection of
printing characters.
Each interface attached to the I/0 bus contains an address decoder
that monitors the address lines.
The processor provides a function code in the control lines. The
function code is referred to as an IO command and is in essence
an instruction that is executed in the interface and its attached
peripheral unit.
There are four types of commands that an interface may receive.
They are classified as control, status, data output, and data input.
Swarnima LDCA 5
05/17/24 29
IO interface
Swarnima LDCA 5
05/17/24 30
IO interface
Swarnima LDCA 5
05/17/24 31
Isolated versus Memory-Mapped I/O
Swarnima LDCA 5
05/17/24 32
ISOLATED I/O
Swarnima LDCA 5
05/17/24 33
Memory-mapped
• The advantage is that the load and store instructions used for
reading and writing from memory can be used to input and
output data from l/0 registers. In a typical computer, there are
more memory-reference instructions than l/0 instructions.
With memory mapped l/0 all instructions that refer to memory
are also available for l/0.
Swarnima LDCA 5
05/17/24 34
IO INTERFACE
Swarnima LDCA 5
05/17/24 35
Asynchronous Data Transfer
• If the registers in the interface share a common clock with the CPU
registers, the transfer between the two units is said to be synchronous.
• In most cases, the internal timing in each unit is independent from the
other in that each uses its own private clock for internal registers.
• In that case, the two units are said to be asynchronous to each other.
• One way of achieving this is by means of a strobe pulse supplied by one
of the units to indicate to the other unit when the transfer has to occur.
• Another method commonly used is to accompany each data item being
transferred with a control signal that indicates the presence of data in the
bus.
• The unit receiving the data item responds with another control signal to
acknowledge receipt of the data.
• This type of agreement between two independent units is referred to as
handshaking .
Swarnima LDCA 5
05/17/24 36
Strobe control
Swarnima LDCA 5
05/17/24 37
Handshaking
Swarnima LDCA 5
05/17/24 38
Handshaking
Swarnima LDCA 5
05/17/24 39
Asynchronous serial transmission
A serial asynchronous data transmission technique used in many interactive terminals
employs special bits that are inserted at both ends of the character code. With this technique,
each character consists of three parts: a start bit, the character bits, and stop bits. The
convention is that the transmitter rests at the 1-state when no characters are transmitted. The
first bit, called the start bit, is always a 0 and is used to indicate the beginning of a character.
The last bit called the stop bit is always a 1.
A transmitted character can be detected by the receiver from knowledge of the transmission
rules:
1 . When a character is not being sent, the line is kept in the 1-state.
2. The initiation of a character transmission is detected from the start bit, which is always 0.
3. The character bits always follow the start bit.
4. After the last bit of the character is transmitted, a stop bit is detected when the line returns
to the 1-state for at least one bit time.
Swarnima LDCA 5
05/17/24 40
Asynchronous communication interface
Swarnima LDCA 5
05/17/24 41
Modes of Transfer
Swarnima LDCA 5
05/17/24 42
Programmed I/O
• Programmed I/O operations are the result of I/O instructions
written in the computer program.
• Each data item transfer is initiated by an instruction in the program.
Usually, the transfer is to and from a CPU register and peripheral.
• Other instructions are needed to transfer the data to and from CPU and
memory.
• In the programmed I/0 method, the CPU stays in a program loop until the
I/O unit indicates that it is ready for data transfer.
• It can be avoided by using an interrupt facility and special commands to
inform the interface to issue an interrupt request signal when the data are
available from the device.
• When the interface determines that the device is ready for data transfer, it
generates an interrupt request to the computer. Upon detecting the external
interrupt signal, the CPU momentarily stops the task it is processing,
branches to a service program to process the I/O transfer, and then returns
to the task it was originally performing.
Swarnima LDCA 5
05/17/24 43
DMA
• In direct memory access (DMA), the interface transfers data into and out
of the memory unit through the memory bus.
• When the transfer is made, the DMA requests memory cycles through the
memory bus.
• When the request is granted by the memory controller, the DMA transfers
the data directly into memory. The CPU merely delays its memory access
operation to allow the direct memory I/O transfer.
Swarnima LDCA 5
05/17/24 44
Example of Programmed I/O
• Transfer from an I/O device to memory requires the execution of
several instructions by the CPU, including an input instruction to transfer
the data from the device to the CPU and a store instruction to transfer the data
from the CPU to memory.
• When a byte of data is available, the device places it in the I/O bus and enables
its data valid line.
• The interface accepts the byte into its data register and enables the data accepted
line. The interface sets a bit in the status register that we will refer to as an F or
"flag" bit.
• The device can now disable the data valid line, but it will not transfer another
byte until the data accepted line is disabled by the interface.
• If the flag is equal to 1, the CPU reads the data from the data register. The
flag bit is then cleared to 0 by either the CPU or the interface, depending on
how the interface circuits are designed.
• Once the flag is cleared, the interface disables the data accepted line
and the device can then transfer the next data byte.
Swarnima LDCA 5
05/17/24 45
Modes of Transfer
Swarnima LDCA 5
05/17/24 46
Modes of Transfer
Swarnima LDCA 5
05/17/24 47
Interrupt-Initiated I/O
• While the CPU is running a program, it does not check the flag.
However, when the flag is set, the computer is momentarily interrupted
from proceeding with the current program.
• The CPU responds to the interrupt signal by storing the return address
from the program counter into a memory stack and then control
branches to a service routine that processes the required I/O transfer.
• The way that the processor chooses the branch address of the service
routine varies from one unit to another.
Swarnima LDCA 5
05/17/24 48
Interrupt & Exception
• In computer architecture, an interrupt is a signal to the processor
emitted by hardware or software indicating an event that needs
immediate attention.
• Interrupt is a signal which has highest priority from hardware or
software which processor should process its signal immediately.
TYPES OF INTERRUPTS
Interrupts have highest priority than other signals, there are many type
of interrupts but basic type of interrupts are -
• Hardware Interrupts: If the signal for the processor is from
external device or hardware is called hardware interrupts.
Example: from keyboard we will press the key to do some action this
pressing of key in keyboard will generate a signal which is given to the
processor to do action, such interrupts are called hardware interrupts.
Swarnima LDCA 5
05/17/24 49
Interrupt & Exception
Hardware interrupts can be classified into two types –
Swarnima LDCA 5
05/17/24 50
Interrupt & Exception
Based on address:
• Vectored Interrupt: In this type of interrupt, the interrupt address is known
to the processor. For example: TRAP.
• Non Vectored Interrupt: In this type of interrupt, the interrupt address is not
known to the processor so, the interrupt address needs to be sent externally by
the device to perform interrupts. For example: INTR.
Swarnima LDCA 5
05/17/24 51
Trap
•It is non-maskable edge and level triggered interrupt.
•Edge and level triggered means that the TRAP must go high and remain
high until it is acknowledged.
Swarnima LDCA 5
05/17/24 52
Interrupt
Swarnima LDCA 5
05/17/24 54
Priority Interrupt
Swarnima LDCA 5
05/17/24 55
Priority Interrupt
Swarnima LDCA 5
05/17/24 56
Priority Interrupt
Swarnima LDCA 5
05/17/24 57
Input / Output Subsystem
Swarnima LDCA 5
05/17/24 58
Programmed I/O
Swarnima LDCA 5
05/17/24 59
Interrupt driven I/O
Swarnima LDCA 5
05/17/24 60
Interrupt driven I/O
Swarnima LDCA 5
05/17/24 61
Interrupt Control I/O
Swarnima LDCA 5
05/17/24 62
DMA
Swarnima LDCA 5
05/17/24 63
DMA
Swarnima LDCA 5
05/17/24 64
DMA
Swarnima LDCA 5
05/17/24 65
DMA
Swarnima LDCA 5
05/17/24 66
DMA
Swarnima LDCA 5
05/17/24 67
Serial Communication
Swarnima LDCA 5
05/17/24 68
Serial Communication
Asynchronous Transmission
In asynchronous transmission, data moves in a half-paired
approach, 1 byte or 1 character at a time. It sends the data in a constant
current of bytes.
Swarnima LDCA 5
05/17/24 69
Synchronous Vs. Asynchronous
Swarnima LDCA 5
05/17/24 70
Faculty Video Links, You tube Courses
Details
Swarnima LDCA 5
05/17/24 71
Daily Quiz
72
05/17/24 Swarnima LDCA 5
Weekly Assignment
Discuss the various type of Interrupts and Exception in computer
organization with suitable examples.
Swarnima LDCA 5
05/17/24 73
MCQ
1 To avoid loading during read operation, the device used is
a) latch b) flipflop c) buffer d) tristate buffer
2. The device that enables the microprocessor to read data from the
external devices is, a) printer b) joystick c) display d) reader
3. The controller is connected to the ____
a) Processor BUS b) System BUS c) External BUS
4. The DMA transfers are performed by a control circuit called as
5. The DMA controller has _______ registers
a) 4 b) 2 c) 3 d) 1
6. The INTR interrupt may be
a) Maskable b) nonmaskable
7. The INTR interrupt may be masked using the flag
a) direction flag b) overflow flag c) interrupt flag d) sign flag
Solution 1 d. 2b. 3 b. 4 DMA controller . 5 c 6 a 7 c
Swarnima LDCA 5
05/17/24 74
Old Question Papers
76
05/17/24 Swarnima LDCA 5
Expected Questions for University Exam
77
05/17/24 Swarnima LDCA 5
Summary
Input/output Unit:
Peripheral devices
I/O interface & I/O ports
Interrupts: interrupt hardware, types of interrupts and
exceptions.
Modes of Data Transfer:
Programmed I/O, interrupt initiated I/O
Direct Memory Access.,
I/O channels and processors.
Serial Communication: Synchronous & asynchronous
communication , standard communication interfaces
78
05/17/24 Swarnima LDCA 5