Docsity

Achieve the Listed - Computer Engineering - Solved Exam, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030 A 10:00am Computer Engineering Spring 2009
4 problems, 4 pages Exam Three Solutions 8 April 2009
1
Problem 1 (2 parts, 24 points) Counters
Part A (12 points) Design a toggle cell using transparent latches and basic gates. Use an icon for
the latch. Your toggle cell should have an active high toggle enable input TE, and an active low
clear input CLR¯¯¯, clock inputs Φ1 and Φ2, and an output Out. The CLR¯¯¯ signal has precedence
over TE. Label all signals. Also complete the behavior table for the toggle cell.
In Out
En
Latch
In Out
En
Latch
TE Out
CLR
Φ1Φ2
TE CLR¯¯¯ CLK Out
0 0 ↑↓ 0
1 0 ↑↓ 0
0 1 ↑↓ Qo
1 1 ↑↓ Qo
¯¯
Part B (12 points) Now combine these toggle cells to build a divide by six counter. Your counter
should have an external clear, external count enable, and three count outputs O2, O1, O0. Use any
basic gates (AND, OR, NAND, NOR, & NOT) you require. Assume clock inputs to the toggle
cells are already connected. Your design should support multi-digit systems.
O0
O1
O2
Ext Clr
Ext CE TE
Out
Clr
TE
Out
Clr
TE
Out
Clr
pf3
pf4

Partial preview of the text

Download Achieve the Listed - Computer Engineering - Solved Exam and more Exams Computer Science in PDF only on Docsity!

4 problems, 4 pages Exam Three Solutions 8 April 2009

Problem 1 (2 parts, 24 points) Counters

Part A (12 points) Design a toggle cell using transparent latches and basic gates. Use an icon for

the latch. Your toggle cell should have an active high toggle enable input TE, and an active low

clear input CLR¯¯¯, clock inputs Φ 1 and Φ 2 , and an output Out. The CLR¯¯¯ signal has precedence

over TE. Label all signals. Also complete the behavior table for the toggle cell.

In Out

En

Latch

In Out

En

Latch

TE Out

CLR

TE CLR¯¯¯ CLK Out

0 0 ↑↓ (^0)

1 0 ↑↓ (^0)

0 1 ↑↓ (^) Qo

1 1 ↑↓ Q¯¯o

Part B (12 points) Now combine these toggle cells to build a divide by six counter. Your counter should have an external clear, external count enable, and three count outputs O 2 , O 1 , O 0. Use any basic gates (AND, OR, NAND, NOR, & NOT) you require. Assume clock inputs to the toggle cells are already connected. Your design should support multi-digit systems.

O 0

O 1

O 2

Ext Clr

Ext CE TE Out Clr

TE Out Clr

TE Out Clr

4 problems, 4 pages Exam Three Solutions 8 April 2009

Problem 2 (2 parts, 18 points) Datapath Elements

Part A (9 points) Consider the following input and output values for a shift operation. Determine the shift type and amount required to achieve the listed transformation. I/Os are in hexadecimal. Input Value Output Value Shift Type Shift Amount (signed decimal value) (^87654321 43210000) arith / logical -16 bits

(^87654321 76543218) rotate -4 or +28 bits

(^87654321 00008765) logical +16 bits

Part B (9 points) Consider the following input and output values for a logical operation. Determine the logical function and function code (in hexadecimal) required for the operation. X Input Y Input Output Logical Function Function Code 87654321 0000FFFF (^00004321) AND 8

87654321 0000FFFF 8765FFFF (^) OR E

87654321 0000FFFF 8765BCDE (^) XOR 6

Problem 3 (3 parts, 30 points) Memory Systems

Part A (10 points) Consider a DRAM chip organized as 512 million addresses of eight bit words. Assume both the DRAM cell and the DRAM chip is square. The column number and offset concatenate to form the memory address. Using the organization approach discussed in class, answer the following questions about the chip. Express all answers in decimal.

number of columns 512M x 8 = 2 29 x 2^3 = 2^32 ; 2^16 = 64K column decoder required ( n to m ) (^) 16 to 64K

type of mux required ( n to m ) 64K/8 = 8K; 8K to 1 number of muxes required (^8) number of address lines in column number (^16)

number of address lines in column offset 13

Part B (10 points) Consider a 4 Gbyte memory system with 256 million addresses of 16 byte words using DRAM chips organized as 64 million addresses by 16 bit words.

word address lines for memory system log 2 (256M) = 28 chips needed in one bank 16 bytes / 16 bits = 8 chips banks for memory system (^) 256M / 64M = 4 banks

memory decoder required ( n to m ) 2 to 4 DRAM chips required (^) 8 x 4 = 32 chips

4 problems, 4 pages Exam Three Solutions 8 April 2009

Problem 4 (2 parts, 28 points) Microcode

Using the supplied datapath, write microcode fragments to accomplish the following procedures. Express all values in hexadecimal notation. Use ‘X’ when a value is don’t cared. For maximum credit, complete the description field.

Part A (14 points) (^7 ) 16

R

R

R − ×

×

= Modify only R5, R 6 and R 7.

# X Y Z rwe imen im va auen -a/s luen lf suen st lden enst r/-w msel description

1 5 5 7 1 0 X 1 0 0 X 0 X 0 0 X 0 R7 I R5 + R

2 7 7 5 1 0 X 1 0 0 X 0 X 0 0 X 0 R7 I R7 + R

(^3 7) X 7 1 1 4 0 X 0 X 1 1 0 0 X 0 R7 I R7 >> 4

(^4 6) X 6 1 1 FFF8 (^0) X 0 X 1 1 0 0 X 0 R6 I R6 << 8

(^5 7 6 7 1 0) X 1 1 0 X 0 X 0 0 X 0 R7 I R7 + R

6

7

Part B (14 points) Write a microcode sequence that loads a 32 bit word from memory location 0x4000, unpacks and averages two 15 bit unsigned values (A and B), and then stores the result back to memory location 0x4000. Assume the most significant two bits of the register are zero. Modify only R 1 , R 2 , and R 3.

0 0 A B 31 30 29 15 14 0

# X Y Z rwe imen im va auen -a/s luen lf suen st lden enst r/-w msel description

(^1) X X 1 1 1 4000 0 X 1 C 0 X 0 0 X 0 R1 I 0x

2 1 X 2 1 0 X 0 X 0 X 0 X 1 0 1 1 R2 I mem[R1]

(^3 2) X 3 1 1 7FFF (^0) X 1 8 0 X 0 0 X 0 R3 I R2 & 0x7FFF

4 2 X 2 1 1 F 0 X 0 X 1 0 0 0 X 0 R2 I R2 >> 15

(^5 2 3 2 1 0) X 1 0 0 X 0 X 0 0 X 0 R2 I R2 + R

6 2 X 2 1 1 1 0 X 0 X 1 1 0 0 X 0 R2 I R2 >> 1

7 1 2 X 0 0 X 0 X 0 X 0 X 0 1 0 1 mem[R1] I R

8