UNIT 2 (ECS-10CS72) VTU Question paper solutions

Similar documents
COMPUTER STRUCTURE AND ORGANIZATION

Chapter 2 Instructions Sets. Hsung-Pin Chang Department of Computer Science National ChungHsing University

RISC (Reduced Instruction Set Computer)

Computer Architecture Dr. Charles Kim Howard University

ARM ARCHITECTURE. Contents at a glance:

Chapter 2 Logic Gates and Introduction to Computer Architecture

Computer Architecture Dr. Charles Kim Howard University

CN310 Microprocessor Systems Design

Introduction to Microcontrollers

Chapter 2: Data Manipulation

Computer and Hardware Architecture I. Benny Thörnberg Associate Professor in Electronics

Chapter 2: Data Manipulation

COS 140: Foundations of Computer Science

Microcontrollers. Microcontroller

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

Chapter 2 Sections 1 8 Dr. Iyad Jafar

Universität Dortmund. ARM Architecture

Von Neumann architecture. The first computers used a single fixed program (like a numeric calculator).

AVR Microcontrollers Architecture

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

BEng (Hons.) Telecommunications. BSc (Hons.) Computer Science with Network Security

Architectures & instruction sets R_B_T_C_. von Neumann architecture. Computer architecture taxonomy. Assembly language.

Typical Processor Execution Cycle

5 Computer Organization

Chapter 2: Data Manipulation. Copyright 2015 Pearson Education, Inc.

Introduction to Microprocessor

DC57 COMPUTER ORGANIZATION JUNE 2013

OUTLINE. STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and Pipelining Cortex-M0 Programming Model Toolchain and Project Structure

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

A Bit of History. Program Mem Data Memory. CPU (Central Processing Unit) I/O (Input/Output) Von Neumann Architecture. CPU (Central Processing Unit)

Memory management units

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

CS 101, Mock Computer Architecture

Microprocessors and Microcontrollers. Assignment 1:

CS 24: INTRODUCTION TO. Spring 2018 Lecture 3 COMPUTING SYSTEMS

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

ADVANCED COMPUTER ARCHITECTURE TWO MARKS WITH ANSWERS

CS1004: Intro to CS in Java, Spring 2005

QUESTION BANK UNIT-I. 4. With a neat diagram explain Von Neumann computer architecture

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMPUTER ARCHITECURE- III YEAR EEE-6 TH SEMESTER 16 MARKS QUESTION BANK UNIT-1

COMPUTER ORGANISATION CHAPTER 1 BASIC STRUCTURE OF COMPUTERS

Introduction to Computer Science. William Hsu Department of Computer Science and Engineering National Taiwan Ocean University

Microcomputer Architecture and Programming

Computer Organization

5 Computer Organization

Introduction to the Personal Computer

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

PART A (22 Marks) 2. a) Briefly write about r's complement and (r-1)'s complement. [8] b) Explain any two ways of adding decimal numbers.

VE7104/INTRODUCTION TO EMBEDDED CONTROLLERS UNIT III ARM BASED MICROCONTROLLERS

CISC / RISC. Complex / Reduced Instruction Set Computers

Unit 9 : Fundamentals of Parallel Processing

Computer Architecture: Part V. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Computer Architecture

2 MARKS Q&A 1 KNREDDY UNIT-I

Systems Architecture The ARM Processor

Chapter 2 Data Manipulation

Embedded Computing Platform. Architecture and Instruction Set

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institution of Technology, Delhi

THE MICROCOMPUTER SYSTEM CHAPTER - 2

ARM Processor. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design

Computer Fundamentals and Operating System Theory. By Neil Bloomberg Spring 2017

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design

Writing ARM Assembly. Steven R. Bagley

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Computer Organization and Assembly Language (CS-506)

IA-32 Architecture COE 205. Computer Organization and Assembly Language. Computer Engineering Department

Wednesday, January 28, 2018

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Monday, January 27, 2014

Computer Architecture and Assembly Language. Spring

Chapter 08: The Memory System. Lesson 01: Basic Concepts

ELCT 912: Advanced Embedded Systems

Introduction to Computers - Chapter 4

Course Description: This course includes concepts of instruction set architecture,

Introduction to OS. Introduction MOS Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

CHAPTER 5 A Closer Look at Instruction Set Architectures

8051 microcontrollers

STEVEN R. BAGLEY ARM: PROCESSING DATA

Overview of Computer Organization. Chapter 1 S. Dandamudi

EE 308: Microcontrollers

EE 3170 Microcontroller Applications

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

Module 2: Introduction to AVR ATmega 32 Architecture

Chapter One. Introduction to Computer System

Physical characteristics (such as packaging, volatility, and erasability Organization.

UNIVERSITY OF MORATUWA CS2052 COMPUTER ARCHITECTURE. Time allowed: 2 Hours 10 min December 2018

MLR INSTITUTE OF TECHNOLOGY DUNDIGAL , HYDERABAD QUESTION BANK

Overview of Computer Organization. Outline

Introduction to Microprocessor

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

CSEE 3827: Fundamentals of Computer Systems

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

The ARM processor. Morgan Kaufman ed Overheads for Computers as Components

Transcription:

UNIT 2 (ECS-10CS72) VTU Question paper solutions 1. Differentiate between Harvard and von Neumann architecture. Jun 14 The Harvard architecture is a computer architecture with physically separate storage and signal pathways for instructions and data. The term originated from the Harvard Mark I relay-based computer, which stored instructions on punched tape (24 bits wide) and data in electro-mechanical counters. These early machines had data storage entirely contained within the central processing unit, and provided no access to the instruction storage as data. Programs needed to be loaded by an operator; the processor could not boot itself. Today, most processors implement such separate signal pathways for performance reasons but actually implement a modified Harvard architecture, so they can support tasks such as loading a program from disk storage as data and then executing it. Under pure von Neumann architecture the CPU can be either reading an instruction or reading/writing data from/to the memory. Both cannot occur at the same time since the instructions and data use the same bus system. In a computer using the Harvard architecture, the CPU can both read an instruction and perform a data memory access at the same time, even without a cache. A Harvard architecture computer can thus be faster for a given circuit complexity because instruction fetches and data access do not contend for a single memory pathway. Also, a Harvard architecture machine has distinct code and data address spaces: instruction address zero is not the same as data address zero. Instruction address zero might identify a twenty-four bit value, while data address zero might indicate an eight bit byte that isn't part of that twenty-four bit value. 2. Define ARM processor. Explain advanced ARM features? Jun 14 ARM is a family of instruction set architectures for computer processors based on a reduced instruction set computing (RISC) architecture developed by British company ARM Holdings. A RISC-based computer design approach means ARM processors require significantly fewer transistors than typical CISC x86 processors in most personal computers. This approach reduces costs, heat and power use. These are desirable traits for light, portable, battery-powered devices including smart phones, laptops, tablet and notepad computers, and other embedded systems. A simpler design facilitates more efficient multi-core CPUs and higher core counts at lower cost, providing improved energy efficiency for servers. ARM Holdings develops the instruction set and architecture for ARM-based products, but does not manufacture products. The company periodically releases updates to its cores. Current cores from ARM Holdings support a 32-bit address space and 32-bit arithmetic; the ARMv8- A architecture, adds support for a 64-bit address space and 64-bit arithmetic. Instructions for ARM Holdings' cores have 32 bits wide fixed-length instructions, but later versions of the architecture also support a variable-length instruction set that provides both 32 and 16 bits wide instructions for improved code density. Some cores can also provide hardware execution of Java byte codes. 3. What is pipelining? Explain the c55x of a seven stages of pipeline with a neat diagram of ARM instructions? Jun 14/JAN 14 Pipelining is an implementation technique where multiple instructions are overlapped in execution. The computer pipeline is divided in stages. Each stage completes a part of an instruction in parallel. The stages are connected one to the next to form a pipe - instructions enter at one end,

progress through the stages, and exit at the other end. Pipelining does not decrease the time for individual instruction execution. Instead, it increases instruction throughput. The throughput of the instruction pipeline is determined by how often an instruction exits the pipeline. C55x has 7-stage pipe: fetch; decode; Address: computes data/branch addresses; Access 1: reads data; Access 2: finishes data read; Read stage: puts operands on internal busses execute 4. Explain memory system mechanisms? Jan 14 On an Embedded System, memory is at a premium. Some chips, particularly embedded VLSI chips, and low-end microprocessors may only have a small amount of RAM "on board" (built directly into the chip), and therefore their memory is not expandable. Other embedded systems have a certain amount of memory, and have no means to expand. In addition to RAM, some embedded systems have some non-volatile memory, in the form of miniature magnetic disks, FLASH memory expansions, or even various 3rd-party memory card expansions. Keep in mind however, that a memory upgrade on an embedded system may cost more than the entire system itself. An embedded systems programmer, therefore, needs to be very much aware of the memory available, and the memory needed to complete a task. Memory is an important part of embedded systems. The cost and performance of an embedded system heavily depends on the kind of memory devices it utilizes. In this section we will discuss about Memory Classification, Memory Technologies and Memory Management. Memory Classification Memory Devices can be classified based on following characteristics (a) Accessibility (b) Persistence of Storage (c) Storage Density & Cost (d) Storage Media (f) Power Consumption 5) What are interrupts? Discuss its mechanism, with a neat diagram. Jan 2015 Interrupts use the basic subroutine call mechanism. They are processed in four phases: 1. The interrupt request is received. 2. The interrupt request is acknowledged. 3. Prepare for the interrupt service routine by finishing execution of the current instruction, storing registers, and retrieving the interrupt vector. 4. Processing the interrupt service routine, which concludes with a return-from interrupt instruction.

6) Draw the format of ARM data processing instructions Jan 2015 This begs the question of how we get an address into a register we need to be able to set a register to an arbitrary 32-bit value. In the ARM, the standard way to seta register to an address is by performing arithmetic on the program counter, which is stored in r15. By adding or subtracting to the PC a constant equal to the distance between the current instruction (i.e. the instruction that is computing the address) and the desired location, we can generate the desired address without performing a load. The ARM programming system provides an ADR pseudo-operation to simplify this step. Thus, as shown in above figure, if we give location 0x100 the name FOO, we can use the pseudo-operation 7) What is associative cache? Explain. Jan 2015 As the program s working set changes, we expect locations to be removed from the cache to make way for new locations. When set-associative caches are used, we have to think about what happens when we throw out a value from the cache to make room for a new value. We do not have this problem in direct-mapped caches because every location maps onto a unique block, but in a setassociative cache we must decide which set will have its block thrown out to make way for the new block. One possible replacement policy is least recently used (LRU) that is, throw out the block that has been used farthest in the past. We can add relatively small amounts of hardware to the cache to keep track of the time since the last access for each block. Another policy is random replacement, which requires even less hardware to implement. 8) Explain the various data operations in ARM. (08 M) June/July 2015 Arithmetic and logical operations in C are performed in variables. Variables are implemented as memory locations. Therefore, to be able to write instructions to perform C expressions and assignments, we must consider both arithmetic and logical instructions as well as instructions for reading and writing memory. Figure 2.7 shows a sample fragment of C code with data declarations and several assignment statements. The variables a, b, c, x, y, and z all become data locations in memory. In most cases data are kept relatively separate from instructions in the program s memory image. The negative (N) bit is set when the result is negative in two s-complement arithmetic. The zero (Z) bit is set when every bit of the result is zero.

The carry (C) bit is set when there is a carry out of the operation. The overflow(v) bit is set when an arithmetic operation results in an overflow. These bits can be used to check easily the results of an arithmetic operation. However, if a chain of arithmetic or logical operations is performed and the intermediate states of the CPSR bits are important, then they must be checked at each step since the next operation changes the CPSR values. The arithmetic operations perform addition and subtraction; the with-carry versions include the current value of the carry bit in the computation. RSB performs a subtraction with the order of the two operands reversed, so that RSB r0, r1, r2 sets r0 to be r2_r1.the bit-wise logical operations perform logical AND, OR, and XOR operations (the exclusive or is called EOR). The BIC instruction stands for bit clear: BIC r0, r1, r2 sets r0 to r1 and not r2. This instruction uses the second source operand as a mask: Where a bit in the mask is 1, the corresponding bit in the first source operand is cleared.

Fig 5: ARM data instructions. 9) Explain in detail the programming of I/O devices. (12 M)June/July 2015 The basic techniques for I/O programming can be understood relatively independent of the instruction set. In this section, we cover the basics of I/O programming and place them in the contexts of both the ARM and C55x. We begin by discussing the basic characteristics of I/O devices so that we can understand the requirements they place on programs that communicate with them.

Fig 6: Structure of a typical I/O device. Input and output devices usually have some analog or non-electronic component for instance, a disk drive has a rotating disk and analog read/write electronics. But the digital logic in the device that is most closely connected to the CPU very strongly resembles the logic you would expect in any computer system. Figure 3.1 shows the structure of a typical I/O device and its relationship to the CPU.The interface between the CPU and the device s internals (e.g., the rotating disk and read/write electronics in a disk drive) is a set of registers. The CPU talks to the device by reading and writing the registers. Devices typically have several registers: Data registers hold values that are treated as data by the device, such as the data read or written by a disk. Status registers provide information about the device s operation, such as whether the current transaction has completed. Input and Output Primitives Microprocessors can provide programming support for input and output in two ways: I/O instructions and memory-mapped I/O. Some architectures, such as the Intel x86, provide special instructions (in and out in the case of the Intel x86) for input and output. These instructions provide a separate address space for I/O devices. But the most common way to implement I/O is by memory mapping even CPUs that provide I/O instructions can also implement memory-mapped I/O. As the name implies, memory-mapped I/O provides addresses for the registers in each I/O device. Programs use the CPU s normal read and write instructions to communicate with the devices. Example 3.1 illustrates memory-mapped I/O on the ARM. Memory-mapped I/O on ARM We can use the EQU pseudo-op to define a symbolic name for the memory location of our I/O device: DEV1 EQU 0x1000 Given that name, we can use the following standard code to read and write the device register: LDR r1, #DEV1; set up device address LDR r0, [r1]; read DEV1 LDR r0, #8; set up value to write STR r0, [r1]; write 8 to device