Docsity

Midterm Exam Questions - Hardware-Software Codesign | ECE 4530, Study notes of Computer Fundamentals

Toggle sidebar
bg1
ECE 4530 Midterm Test Questions Fall 2008
Hardware/Software Codesign
P. Schaumont, Virginia Tech 9/30/2008
Midterm Test Questions
Summary
• Below are a series of practice questions for the midterm on 10/8/07.
• On the closed-book midterm you are allowed to bring the following items.
o Pen
o Small calculator
Question 1
Find a firing vector that has a PASS on the following dataflow graph.
Question 2
Find a PASS that minimizes the required storage to implement edge BC.
pf3
pf4
pf5
Discount

On special offer

Partial preview of the text

Download Midterm Exam Questions - Hardware-Software Codesign | ECE 4530 and more Study notes Computer Fundamentals in PDF only on Docsity!

Hardware/Software Codesign

P. Schaumont, Virginia Tech 9/30/

Midterm Test Questions

Summary

• Below are a series of practice questions for the midterm on 10/8/07.

• On the closed-book midterm you are allowed to bring the following items.

o Pen

o Small calculator

Question 1

Find a firing vector that has a PASS on the following dataflow graph.

Question 2

Find a PASS that minimizes the required storage to implement edge BC.

Hardware/Software Codesign

Question 3

Design a single-rate equivalent dataflow graph for the following multi-rate dataflow

graph (i.e. perform a multi-rate expansion for the following graph).

Question 4

(a) Draw the control flow graph of the following program. Assume the input node

delivers N and x, and that the exit node extracts x.

(b) Find all data edges for x, and draw a (partial) dataflow graph that indicates those

edges.

unsigned char sqrt(unsigned int N, int x) { unsigned int x,j; for(j= 1<<7; j<>0; j>>=1) { x = x + j; if( x*x > N) x = x - j; } return x; }

Question 5

Draw a circuit that is equivalent to the following set of RTL expressions. Assume OUT

and IN are circuit output and input respectively.

reg a1, a2, a3 : ns(5); sig b1, b2, b3 : ns(5); always { b1 = IN + b3; b2 = a1 + a2; b3 = a3; a1 = IN; a2 = a1; a3 = b2; OUT = b1; }

Hardware/Software Codesign

Question 9

The following C statement implements a pseudorandom generator. It translates to the

sequence of assembly instructions as shown in the table below that. The assembly

instructions are those of a 5-stage pipelined StrongARM processor.

C Code:

unsigned rnstate; rnstate = (rnstate >> 1) ^ (-( signed int )(rnstate &1) & 0xd0000001u);

Corresponding Assembly Code:

Instruction Assembly

1 ldr^ r3,^ [fp,^ #-16];^ //^ load-register

2 mov^ r2,^ r3,^ lsr^ #1;^ //^ lsr^ =^ shift-right

3 ldr^ r3,^ [fp,^ #-16];

4 and^ r3,^ r3,^ #1;

5 rsb^ r3,^ r3,^ #0;

6 and^ r3,^ r3,^ #-805306367;

7 eor^ r3,^ r2,^ r3;

8 str^ r3,^ [fp,^ #-16];^ //^ store-register

Answer the following questions.

a. What is the purpose of instruction 5 in the StrongArm Code? Point out exactly what

part of the C expression it will implement.

Answer : _______________________________________________

b. Will StrongArm instruction 3 cause a control hazard?

Answer (Circle one): Yes No

Hardware/Software Codesign

Question 10

Below is the block diagram of the Atmel AT91 microcontroller. Answer the following

questions.

(a) What is the purpose of the block ‘AMBA Bridge’? What happens when you remove it

and use a single, large bus?

(b) Can this chip boot without any additional chips? Why (not)?

(c) How do each of the peripherals look like, as seen from software? (A general

description is sufficient).