EECS 373 Practice Midterm & Homework #2 Fall 2011

Similar documents
EECS 373 Practice Midterm / Homework #3 Fall 2014

EECS 373 Midterm Winter 2012

EECS 373 Midterm 2 Fall 2018

EECS 373 Midterm Winter 2013

EECS 373 Midterm Winter 2016

EECS 373 Midterm 2 Exam Winter 2018

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Midterm Winter 2017

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems

all: arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb main.c \ -T generic-hosted.ld -o main.out -g arm-none-eabi-objdump -S main.out > main.

EECS 373 Design of Microprocessor-Based Systems

EECS 373. Design of Microprocessor-Based Systems. Prabal Dutta University of Michigan. Announcements. Homework #2 Where was I last week?

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Fall 2018 Homework #3

EECS 373, Homework 4, Fall 2018 Assigned: Wednesday 10/3; Due: Wednesday 10/10 at 10pm

Hardware Implementation of AMBA Processor Interface Using Verilog and FPGA

Universität Dortmund. ARM Cortex-M3 Buses

CoreAHBtoAPB3 v3.1. Handbook

esi-multichannel Timer

AMBA 3 AHB Lite Bus Architecture

EECS 373 Lab 3: Introduction to Memory Mapped I/O

EECS 470 Midterm Exam

EECS 452 Midterm Closed book part Fall 2010

Design of Microprocessor-Based Systems Part II

EECS 270 Midterm Exam

APB4 GPIO. APB4 GPIO Datasheet Roa Logic, All rights reserved

May the Schwartz be with you!

EECS 470 Midterm Exam

Architectural design proposal for real time clock for wireless microcontroller unit

ENGR 100 Midterm (CSE Part) Winter 2014

1 Contents 2 2 Overview 3 3 Hardware Interface 4 4 Software Interface Register Map Interrupts 6 5 Revision History 8

Good Evening! Welcome!

The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 1 February 17, 2011

EECS 470 Midterm Exam Answer Key Fall 2004

Engineering 100 Midterm Exam Technical Part Fall 2010

Ref: AMBA Specification Rev. 2.0

EECS 373 Winter 2017 Homework #3

Roa Logic. APB4 Multiplexer. Datasheet. October, c Roa Logic B.V.

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM

One and a half hours. Section A is COMPULSORY

University of Florida EEL 4744 Summer 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 July Oct-14 6:41 PM

EECS 470 Final Exam Fall 2005

VLSI DESIGN OF AMBA BASED AHB2APB BRIDGE

University of Florida EEL 3744 Spring 2018 Dr. Eric M. Schwartz. Good luck!

EECS 470 Midterm Exam Fall 2006

Exam 1. Date: February 23, 2016

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

University of Florida EEL 4744 Spring 2011 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 31 March Apr-11 1:29 PM

(ARM&Standard&Parallel&Bus) Introduction

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

Interconnects, Memory, GPIO

Project 1a: Hello World!

University of Florida EEL 3744 Spring 2017 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 22 February Mar-17 1:44 PM

University of Florida EEL 4744 Spring 2012 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 22 February Jun-12 4:55 PM

EECS 473 Midterm Exam

EECS 470 Midterm Exam Winter 2015

Name: University of Michigan uniqname: (NOT your student ID number!)

EECS 452 Midterm Closed book part Fall 2010

Chapter Operation Pinout Operation 35

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

McGill University Faculty of Engineering FINAL EXAMINATION Fall 2007 (DEC 2007)

Interface DAC to a PC. Control Word of MC1480 DAC (or DAC 808) 8255 Design Example. Engineering 4862 Microprocessors

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8

problem maximum score 1 10pts 2 8pts 3 10pts 4 12pts 5 7pts 6 7pts 7 7pts 8 17pts 9 22pts total 100pts

University of Toronto Mississauga. Flip to the back cover and write down your name and student number.

EECS 470 Midterm Exam Winter 2008 answers

System Design Kit. Cortex-M. Technical Reference Manual. Revision: r0p0. Copyright 2011 ARM. All rights reserved. ARM DDI 0479B (ID070811)

EE 231 Fall EE 231 Homework 8 Due October 20, 2010

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

A VHDL 8254 Timer core

Review for Exam III. Analog/Digital Converters. The MC9S12 has two 10-bit successive approximation A/D converters - can be used in 8-bit mode

SoC Interconnect Bus Structures

EECS 373 Design of Microprocessor-Based Systems

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

University of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm

EECS 470 Final Exam Winter 2012

Microcontroller basics

Hello, and welcome to this presentation of the STM32L4 System Configuration Controller.

International Journal of Applied Sciences, Engineering and Management ISSN , Vol. 05, No. 02, March 2016, pp

CS303 LOGIC DESIGN FINAL EXAM

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

EECS 373 Design of Microprocessor-Based Systems

EE251: Tuesday December 4

EECS 470 Midterm Exam Fall 2014

A User s Experience with SystemVerilog

1 Contents. Version of EnSilica Ltd, All Rights Reserved

1 Contents. Version of EnSilica Ltd, All Rights Reserved

Product Series SoC Solutions Product Series 2016

EECS 373 Design of Microprocessor-Based Systems

EE251: Thursday November 30

Computer Memory. Textbook: Chapter 1

Features: Analog to Digital: 12 bit resolution TTL outputs, RS-232 tolerant inputs 4.096V reference (1mV/count) 115K max speed

EECS 373 Design of Microprocessor-Based Systems

Hardware OS & OS- Application interface

AMBA Peripheral Bus Controller

Military Grade SmartFusion Customizable System-on-Chip (csoc)

AvnetCore: Datasheet

Code No: R Set No. 1

Transcription:

Exam #: EECS 373 Practice Midterm & Homework #2 Fall 2011 Name: Uniquename: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Problem # Points 1 /20 2 /15 3 /10 4 /15 5 /10 6 /10 7 /10 8 /10 Total /100 NOTES: PUT YOU NAME/UNIQUENAME ON EVERY PAGE TO ENSURE CREDIT! Can refer to the ARM Assembly Quick Reference Guide Can use a basic/scientific calculator (but not a phone, PDA, or computer) Don t spend too much time on any one problem. You have 80 minutes for the exam. The exam is 7 pages long, including the cover sheet. Show your work and explain what you re doing. Partial credit w/o this is rare.

1) Fill-in-the-blank or circle the best answer. [20 points, -2 per wrong or blank answer] a) An N-bit SAR ADC requires 1 / lg(n) / N approximation cycles to produce a result. b) A DRAM / SRAM / PROM is non-volatile. DRAM most commonly uses a 1T / 4T / 6T cell. SRAM most commonly uses a 1T / 4T/ 6T cell. c) A 100 MHz clock with a duty cycle of 25% is high for ns per cycle. d) An EABI-compliant procedure could use registers / stack / both / neither to receive arguments from the caller, and the callee should never / sometimes / always save and restore the registers it uses. e) The I2C bus is most commonly used to connect chips on a board / devices in a rack / computers and modems. f) The SPI bus is most commonly used to connect one / two / many master device(s) to one / two / many slave device(s). g) You would expect that I2C / SPI would be able to support the higher data rate. h) Differential signaling over a twisted pair of wires is used in a number of modern buses to reduce the impact of external noise / make it easier to not have a shared clock / implement Manchester encoding / increase the speed of the data lines. i) Multiple devices can usually share an edge / level triggered interrupt line. j) The RESET interrupt is maskable / non-maskable. 2/7

2) Consider the following 3-bit ADC. Draw the conversion transfer function (binary output vs input voltage) on the top graph. Draw the quantization error transfer function (error voltage vs input voltage) on the bottom graph. Make sure the transition points are clear. Assume Vref is 5V. [15] 3) Assume you have a 3-bit SAR ADC. The analog input is 0.35 V and the Vref is 1V. Show how the SAR would approximate the analog input over three cycles. Label the cycles on the x-axis and show the approximation as a meandering stair-step line on the graph. [10] 3/7

4) ARM assembly [15] a) Write ARM assembly code that sets bits 4, 5, and 6 of register r0 to 1s without changing any other bits in that register. Use as few lines of assembly as you can. [5] b) After running the following code snippet, the value of r2 at done is. Show how your arrived at this conclusion. [5]... start: movs r0, #1 movs r1, #1 movs r2, #1 subs r0, r1 bne done movs r2, #2 done: b done... c) Write an ARM assembly language procedure that implements the following function in an EABI-compliant manner and conforms to the following signature. Identify which register holds which argument. [5] f(x,y,z) = x+y-z int32_t func(int32_t x, int32_t y, int32_t z); 4/7

5) Assume you have a memory-mapped register location REG_FOO on a 32-bit architecture. Modify main to add 7 to REG_FOO s value. Your code should compile without any warnings. [10] #include <stdio.h> #include <inttypes.h> #define REG_FOO 0x40000140 main () { // Your code here to declare reg and // add 7 to REG_FOO s value. } printf( 0x%x\n, *reg); // Prints out new value 6) Say your code writes the value 0x76543210 to memory location 0x20000604, on an ARM Cortex-M3. Assume this memory location sits in an SRAM with no access delay (i.e. a zero wait state). If you could attach a logic analyzer to the AHB bus, draw a timing diagram that shows what you would expect to see on the logic analyzer for this write operation. Make sure the actual values being transferred on the bus are clearly labeled. [10] AHB Bus FCLK ^ ^ ^ ^ HADDR[31:0] HWRITE HWDATA[31:0] HREADY(OUT) 5/7

7) Imagine that you want to attach an LED to the ARM Advanced Peripheral Bus (APB). Sketch out the glue logic needed to interface a D flip-flop (DFF) to the APB. Assume that the PSEL line is the peripheral select (i.e. it goes high when the processor is addressing the DFF) and that the DFF will be attached to data bits (PWDATA[0] and PRDATA[0]), perhaps through tri-state drivers. You should be able to change the value of the DFF by writing the memory location corresponding to the PSEL and read the current value of the DFFs by reading the location. Assume that the DFF has an enable (ENA) line that, when not asserted, ignores any inputs (e.g. D and CLK) but continues to drive Q and Q#. The APB signals available to you are: PCLK, PADDR, PWRITE, PSEL, PENABLE, PWDATA, and PRDATA. [10] 6/7

8) Write a C function void enable_interrupts(int x) that enables interrupt x. You need not check to validate that x is a legal interrupt number. The table below might be useful. [10] void enable_interrupts(int x) { } 7/7