LDCA Unit5
LDCA Unit5
Unit: 5
Other applications
computer system
CO 2 Analyze the design of arithmetic & logic unit and understand the 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
PO PO PO
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 10 11 12
CO1 3 2 1 1 1 1 1 - 1 1 1 2
CO2 2 2 2 2 1 1 - 1 1 1 1 2
CO3 3 2 2 1 2 2 1 1 2 2 1 2
CO4 3 2 2 2 2 1 1 - 1 1 1 2
CO5 2 2 2 1 2 - 1 - 1 2 2 2
Average 2.6 2 1.8 1.4 1.6 1 0.8 0.4 1.2 1.4 1.2 2
The COA 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.
1. Control Command -
A control command is issued to activate the peripheral and to inform
it what to do.
Each peripheral receives its own distinguished sequence of control
commands, depending on its mode of operation.
• For example, the computer may wish to check the status of the
peripheral before a transfer is initiated.
• During the transfer, one or more errors may occur which are
detected by the interface.
• These errors are designated by setting bits in a status register that
the processor can read at certain intervals.
• Consider an example with a tape unit. The computer starts the tape
moving by issuing a control command.
• The processor then monitors the status of the tape by means of a
status command.
• When the tape is in the correct position, the processor issues a data
output command.
• The interface responds to the address and command and transfers
the information from the data lines in the bus to its buffer register.
• The interface then communicates with the tape controller and
sends the data to be stored on tape.
1. Use two separate buses, one for memory and the other for I/O.
2. Use one common bus for both memory and I/O but have separate
control lines for each.
3. Use one common bus for memory and I/O with common control
lines.
• This is the case in computers that employ only one set of read and write
signals and do not distinguish between memory and I/O addresses.
• The computer treats an interface register as being part of the memory
system.
• The assigned addresses for interface registers cannot be used for memory
words, which reduces the memory address range available.
• Computers with memory-mapped I/O can use memory-type instructions to
access I/O data.
• It allows the computer to use the same instructions for either input–output
transfers or for memory transfers.
• 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 I/O
registers.
2. Asynchronous Transmission -
• In asynchronous, the internal timing in each unit is independent from
the other or in this each register uses its own private clock.
• In asynchronous transmission, binary information is sent only when it
is available and the line remains idle when there is no information to
be transmitted.
2. Handshaking
• In handshaking, each data item being transferred is accompanied
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.
Stop Bit –
• The last bit called the stop bit is always a 1.
• After the character bits are transmitted, one or two stop bits are sent.
• The stop bits are always in the 1-state and frame the end of the
character to signify the idle or wait state.
At the end of the character the line is held at the 1-state for a period of
at least one or two bit times so that both the transmitter and receiver
can resynchronize.
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.
UART-
• A circuit is called an asynchronous communication interface or a
universal asynchronous receiver transmitter (UART).
• The terminal has a keyboard and a printer
Each byte is read into a CPU register and then transferred to memory
with a store instruction.
Read Status
c Register
CheckcFlag bit
=0
Flag
=1
Read Datac Register
Transfer data
c to memory
no
Operation
Complete?
yes
c program
Continue with
11/9/2023 70
Khushboo LDCA Unit V
Programmed I/O
Disadvantage-
• In the programmed I/O method, the CPU stays in a program loop until
the I/O unit indicates that it is ready for data transfer.
• This is a time-consuming process since it keeps the processor busy
needlessly.
• 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 two devices interrupt the computer at the same time, the
computer services the device, with the higher priority first.
Khushboo LDCA Unit V
11/9/2023 74
Priority Interrupt
1. Software – Polling
2. Hardware –
a) Daisy chaining Priority (Serial connection)
b) Parallel Priority Interrupt (Parallel Connection)
• The device with the highest priority is placed in the first position,
followed by lower-priority devices up to the device with the lowest
priority, which is placed last in the chain.
•
• This method of connection between three devices and the CPU is
shown in Fig. 11-12.
• The daisy chain arrangement gives the highest priority to the device
that receives the interrupt acknowledge signal from the CPU.
• The farther the device is from the first position, the lower is its
priority.
The priority logic for a system of four interrupt sources is shown in Fig.
11-14.
Priority Encoder
Figure 11-16 shows two control signals in the CPU that facilitate the
DMA transfer.
BURST TRANSFER
• In DMA burst transfer, a block sequence consisting of a number of
memory words is transferred in a continuous burst while the DMA
controller is master of the memory buses.
• This mode of transfer is needed for fast devices such as magnetic
disks, where data transmission cannot be stopped or slowed down
until an entire block is transferred.
CYCLE STEALING
• The CPU merely delays its operation for one memory cycle to allow
the direct memory I/O transfer to “steal” one memory cycle.
CPU—IOP Communication
• The communication between CPU and IOP may take different forms.
• In most cases the memory unit acts as a message center where each
processor leaves information for the other.
• The sequence of operations may be carried out as shown in the
flowchart of Fig. 11-20.
CPU—IOP Communication
• The sequence of operations may be carried out as shown in the
flowchart of Fig. 11-20.
• The CPU sends an instruction to test the IOP path.
• The IOP responds by inserting a status word in memory for the CPU to
check.
• The bits of the status word indicate the condition of the IOP and I/O
device, such as IOP overload condition, device busy with another
transfer, or device ready for I/O transfer
1. Simplex Mode
• In Simplex mode, the communication is unidirectional, as on a one-
way street.
• Only one of the two devices on a link can transmit, the other can only
receive.
• The simplex mode can use the entire capacity of the channel to send
data in one direction.
• Example: Keyboard and traditional monitors.
The keyboard can only introduce input, the monitor can only give the
output.
2. Half-Duplex transmission
• In half-duplex mode, each station can both transmit and receive, but
not at the same time.
• When one device is sending, the other can only receive, and vice
versa.
• The half-duplex mode is used in cases where there is no need for
communication in both directions at the same time.
• The entire capacity of the channel can be utilized for each direction.
• The time required to switch a half-duplex line from one direction to
the other is called turnaround time.
• Example: Walkie-talkie in which message is sent one at a time and
messages are sent in both directions.
In I/O devices one of the bus control lines is dedicated for this purpose
and is called the Interrupt Service Routine (ISR).
• While the processor is handling the interrupts, it must inform the device
that its request has been recognized so that it stops sending the interrupt
request signal.
• Also, saving the registers so that the interrupted process can be restored
in the future, increases the delay between the time an interrupt is
received and the start of the execution of the ISR. This is called Interrupt
Latency.
Khushboo LDCA Unit V
11/9/2023 122
Interrupt
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.
•Edge and level triggered means that the TRAP must go high and remain
high until it is acknowledged.
5. The technique whereby the DMA controller steals the access cycles of
the processor to operate is called __________.
Ans: cycle stealing
6. _________ gives the required signals and addresses during DMA
transfers.
Ans: DMA controller
7. Write down full form of DMA.
131
11/9/2023 Khushboo LDCA Unit V
Daily Quiz
3. In _______ data transmission, each bit of the message has its own
path and the total message is transmitted at the same time.
a) Parallel
b) Serial
c) Asynchronous
d) None
132
11/9/2023 Khushboo LDCA Unit V
Daily Quiz
5. A hand-shake based protocol for data transfer is an example of
______ type of data transfer.
a) Parallel
b) Synchronous
c) Asynchronous
d) Serial
133
11/9/2023 Khushboo LDCA Unit V
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
11. The technique whereby the DMA controller steals the access cycles of
the processor to operate is called _________.
a) Memory stealing
b) Memory Con
c) Cycle stealing
d) Fast conning
137
11/9/2023 Khushboo LDCA Unit V
Expected Questions for University Exam
10. Write down the difference between Isolated I/O and Memory
mapped I/O. Also discuss the advantages and disadvantages of both.
11. What do you mean by Asynchronous data transfer? Explain source
and destination initiated strobe for data transfer using block diagram
and timing diagram.
12. What is DMA Controller? Draw and explain the block diagram of DMA
Controller.
13. What is parallel priority interrupt? Explain with help of diagram the
priority logic for four interrupt sources.
14. Define handshaking. Explain source - initiated and destination-
initiated transfer using handshaking with help of block diagram and
timing diagram.
15. Why does the DMA priority over CPU when both request memory
transfer?
16. Explain the concept of Strobe control with the help of timing diagram.
139
11/9/2023 Khushboo LDCA Unit V
Recap of Unit
• 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.
• Examples of external peripherals include mouse, keyboard, printer,
monitor, external Zip drive or scanner.
• Examples of internal peripherals include CD-ROM drive, CD-R drive or
internal modem.
• An interrupt is a signal to the processor emitted by hardware or
software indicating an event that needs immediate attention.
• Types of Interrupt: Hardware Interrupts, Software Interrupts, Maskable
and Non-Maskable, Vectored and Non-Vectored and Priority Interrupt
• Data transfer to and from peripheral device can be ahndlesd in three
modes:
1.Programmed I/O
2.Interrupt initiated I/O
3.DMA
140
11/9/2023 Khushboo LDCA Unit V