Docsity

Solutions to Embedded Real-Time Systems (AME 3623) Homework 1 - Prof. Andrew Fagg, Assignments of Aerospace Engineering

Partial preview of the text

Download Solutions to Embedded Real-Time Systems (AME 3623) Homework 1 - Prof. Andrew Fagg and more Assignments Aerospace Engineering in PDF only on Docsity!

Embedded Real-Time Systems (AME 3623)

Homework 1 Solutions

February 27, 2005

Question 1

Consider the following function:

A B C D f 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1

  1. (10pts) Show the corresponding Karnaugh map and a set of covering clusters. A AB B CD 00 01 11 10

%

&

D

'

&

$

%

C

$ 1 0 1

' 1

  1. (10pts) What is the algebraic description of the reduced circuit?

f = D¯ B¯ + AC

  1. (10pts) Show the reduced circuit.

B

D

A

C

f

  1. (10pts) Starting with the original algebraic description of the function (A′B′C′D′^ +A′B′CD′^ +....), use the definitions and identities discussed in class to prove that it is equivalent to the reduced description that you gave above.

A^ ¯ B¯ C¯ D¯ + A B¯ C¯ D¯ + A¯ BC¯ D¯ + A BC¯ D¯ +ABC D¯ + A BCD¯ + ABCD

A^ ¯ B¯ C¯ D¯ + A B¯ C¯ D¯ + A¯ BC¯ D¯ + A BC¯ D¯

A

AB B

CD 00 01 11 10

∑

∏

∫

π

'

&

$

%

D

∫

π

∑

∏

'

&

$

%

C

  1. (10pts) What is the algebraic description of the reduced circuit?

f = AC + DA + BCD + B¯ C¯ D¯ or f = A(C + D) + BCD + B¯ C¯ D¯

Question 3

Consider the following function:

A B C D f 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0

  1. (10pts) Show the corresponding Karnaugh map and a set of covering clusters. There are several equivalent coverings of the ’1’s. Here is one: A AB B CD 00 01 11 10

∂

μ

≥

¥

'

&

$

%

∂

μ

≥

¥

∂ μ

≥ ¥

D

'

&

$

%

C

∂ μ

≥ ¥

This solution involves six clusters. However, there is a much simpler

  1. (10pts) Show the reduced circuit.

Solution 1:

f

B

A

C

D

Solution 2:

A

B

D

C

f

Note: 2-input XOR gates are constructed from 2 AND and 1 OR gate (so this circuit is more expensive to implement than solution 3).

Solution 3:

A

B

C

D f

Question 4

From the perspective of the transistor count, it is cheaper to implement a NAND gate than an AND gate (we typically implement an AND gate as a NOT - NAND). Consider the following circuit:

A

B

C

D

  1. (10pts) Redesign this circuit such that it implements the same function, but uses only NAND and NOT gates. Show this new circuit.

Question 5

(10pts) Using the algebraic definitions and identities discussed in class, prove the following:

( A¯ + B¯ + C¯) = ABC

( A¯ + B¯ + C¯) (( A¯ + B¯) + C¯) Associative Law (AB + C¯) DeMorgan′s Law; X = X (ABC) DeMorgan′s Law; X = X ABC X = X (1)

Question 6

(10pts) Using two-output demultiplexers (1 select line) and the basic gates (AND, OR, NOT, NOR, NAND, and XOR), design an eight-output demul- tiplexer (three select lines).

D

S

S

S

A

A

A

A

A

A

A

A

So: the clock input for flip-flop 0 (CLK0) should be as follows: CLK0 = R ∗ CLK For flip-flop 1, the situation is more complex. Here is the truth table for CLK1: R X0 CLK CLK 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 x 1 1 1 x

The last two cases are “don’t cares” because these cases will never occur (i.e., R ∗ X0 will never be true). The corresponding Karnaugh map is:

X

X 0 , CLK CLK

R 00 01 11 10

1 0 1 x x

So: CLK1 = CLK ∗ X0 + CLK ∗ R = CLK ∗ (X0 + R)

For CLK2, we must also consider the state of X1 (on top of X0, R, and CLK). Here is the truth table:

R X1 X0 CLK CLK

1 0 0 0 x 1 0 0 1 x 1 0 1 0 x 1 0 1 1 x 1 1 0 0 0 1 1 0 1 1 1 1 1 0 x 1 1 1 1 x

Again, the “don’t care” cases correspond to those cases that cannot occur. Here is the Karnaugh map:

X X 0 , CLK CLK R, X 1 00 01 11 10

X

11 0 1 x x R 10 x x x x

So: CLK2 = CLK ∗ X 0 ∗ X1 + CLK ∗ R = CLK ∗ (X 0 ∗ X1 + R)

Putting it all together, here is the resulting circuit: