


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this past exam are: Transparent Latches, State Machines, Computer Engineering, Task of Documenting, Employee At Trains, State Machine Diagram, Counter Design, Multiplexers,, Basic Gate, Transparent Latches
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



5 problems, 7 pages Exam Three Solutions 13 November 2003
Problem 1 (3 parts, 21 points) State Machines
Suppose you are an employee at Trains ’R Us and have been given the task of documenting the design of a toy train it sells. The train has a remote control box with two switches: one for direction (forward vs. reverse) and one for running the engine (go vs. apply break). The inputs to the state machine are the input signals generated by the two
switches: F / R (which is 1 for forward movement and 0 to run backward) and G / B (which is 1 to run the engine and 0 to apply the break). There is one output W. When W=1 , the train’s whistle is blown. The following state table summarizes its behavior. S 1 S (^0) F / R G / B NS 1 NS 0 W 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 0 1 0 1 1 0 0 0
Part A (12 points) Based on this state table, draw the state machine diagram that describes the train’s control logic. Use the state bubbles below, which are already labeled with mnemonic names. For maximum credit, merge redundant transitions into the most concise form. One possible solution:
Part B (9 points) Give simplified boolean expressions for the next state variables and for W.
NS 1 = S 0 RG NS 0 = S 1 FG W = S (^) 0 ⋅ S 1 ⋅ G
5 problems, 7 pages Exam Three Solutions 13 November 2003
Problem 2 (2 parts, 24 points) Counter Design
Part A (8 points) Implement a toggle cell using only transparent latches, 2 to 1 multiplexers, and inverters. Label inputs Toggle Enable (TE), -Clear (active low), Φ 1 and Φ 2. Do not use other basic gate types.
In Out
En
Latch
In Out
En
Latch
MUX Sel
1
(^00)
MUX Sel
1
0
Part B (10 points) Consider the following incomplete counter. Based on the completed Max Count detector, determine and describe the counter type. Then complete the counter by properly generating the active low Clr signal when either the external clear is asserted or the counter is about to exceed the maximum count. Use any basic gates required.
TE Out Clr
TE Out Clr
TE Out Clr
O 1
O 2
O 3
Ext CE TE Out Clr O 0
Ext Clr
Max Count
It’s a divide by _____ 11__________ counter.
Part C (6 points) How many toggle cells are required for the following counters?
counter type toggle cells required divide by 25 5 divide by 200 (^) 8 divide by 800K 20
5 problems, 7 pages Exam Three Solutions 13 November 2003
Problem 5 (3 parts, 16 points) Microcode Use the data path discussed in class (and attached to the exam) to answer the following. Part A (6 points) Suppose register 1 holds the variable A and register 2 holds the variable B. What algebraic expression is computed by the following microcode and stored in register 3? Express your answer in terms of A and B (e.g., 8A+B ). Unfortunately, don’t care values (X) have been converted to zeros in this microcode. # X Y Z rwe im en
im va au en
-a /s
lu en
lf su en
st ld en
st en
r/ -w
m sel
description
1 2 x 2 1 1 0xFFFF 0 0 0 0 1 1 0 0 0 0 R2 ← R2 asf -1 = 2B
2 1 x 1 1 1 0x0003 0 0 0 0 1 1 0 0 0 0 R1 ← A asf 3 = A/
3 1 2 3 1 0 0 1 1 0 0 0 0 0 0 0 0 R3 ← R1-R2 = A/8 – 2B
This microcode computes the expression: A/8 – 2B
Part B (4 points) Suppose register 4 holds the variable X and register 5 holds the variable Y. Write a microinstruction to compute the boolean expression X ⋅ Y and store it in register 6. Put an “x” in fields that are “don’t cares”. Express any immediate values in hexadecimal. # X Y Z rwe im en
im va au en
-a /s
lu en
lf su en
st ld en
st en
r/ -w
m sel
description
1 4 5 6 1 0 x 0 x 1 2 0 x 0 0 x (^0) R 6 ← R 4 ⋅ R 5
Part C (6 points) Write a microcode fragment (1 or more microinstructions) that loads the contents of the memory location 0x1024 and stores them in register 7. You may not need to use all the rows in the table. You may use other registers as needed. Assume all the registers initially hold 0. Express any immediate values in hexadecimal.
# X Y Z rwe im en
im va au en
-a /s
lu en
lf su en
st ld en
st en
r/ -w
m sel
description
1 x x 8 1 1 0x1024 0 x 1 C 0 x 0 0 x 0 R8 ← 1024
2 8 x 7 1 0 x 0 x 0 x 0 x 1 0 1 1 R7 ← (R8)