Docsity

ECE 474a/574a Practice Problems: Finite State Machines and Digital Design, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 474a/574a – Optional Practice Problems
1. Convert the following Moore FSM to a Mealy FSM.
2. Convert the following Mealy FSM to a Moore FSM
3. Create a high-level state machine for a simple data encryption/decryption device. If a bit-
input b is 1, the device stores the data from a 32-bit input I as what is know as an offset
value. If b is 0 and another bit-input e is 1, then the device encrypts its input I by adding
the stored offset value to I, and outputs this encrypted value over a 32-bit output J. If
instead another bit-input d is 1, the device should decrypt the data on output J by
subtracting the offset value before outputting the decrypted value of J. Be sure to explicitly
handle all possible combinations of the three input bits (input b has the highest priority, then
e, then d).
4. Create a high-level state machine that loads the data from a digital camera into a RAM,
beginning at the address specified by input start, and ending at the address specified
by input stop. Input go initiates loading data from the digital camera into the RAM.
Setting RCPY = 1 signals the digital camera to output a data item on every clock cycle.
Once the loading process starts, it will continue until all values have been processed.
Lastly, the data bus may be shared by other peripherals.
5. Create a datapath for the following high-level FSM.
6. Perform two-level logic optimization for F(a, b, c, d) = a’b’c’d’ + a’c’d’ + a’cd’ + bcd’ + acd’ using K-maps.
Inputs: y; Outputs: e
A B
y’ / e = 1
y
’ / e = 0
y
/ e = 0
y / e = 1
A
B
D
Inputs: ab; Outputs: w
C
w
=
1
w
=
1
w
=
1
w
=
0
a’
a’b’
ab’
ab b’ ab
b
b’ + ab’
Inputs: A (8-bits), B (8-bits), go, hold
Outputs: M (16-bits)
Local Register: Sum (16-bits), A_reg (8-bits), B_reg (8-bits), count (8-bits)
A B
go’ count < B
Sum = 0
M = 0
C DE
_reg = A
B_reg = B
count = 0
Sum = Sum + A
count++
hold
(
count < B
)
’
hold’
M = Sum
go
Encrypt/Decrypt
Circuit
b
e
d
I J
32 32
Digital
Camera
Processo
r
65K x 8
ROM
Data
A
dd
r
R/w’
En
RA RW RE
RBUF
RCPY
go start stop
pf2

Partial preview of the text

Download ECE 474a/574a Practice Problems: Finite State Machines and Digital Design and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

ECE 474a/574a – Optional Practice Problems

  1. Convert the following Moore FSM to a Mealy FSM.
  2. Convert the following Mealy FSM to a Moore FSM
  3. Create a high-level state machine for a simple data encryption/decryption device. If a bit- input b is 1 , the device stores the data from a 32-bit input I as what is know as an offset value. If b is 0 and another bit-input e is 1 , then the device encrypts its input I by adding the stored offset value to I, and outputs this encrypted value over a 32-bit output J. If instead another bit-input d is 1 , the device should decrypt the data on output J by subtracting the offset value before outputting the decrypted value of J. Be sure to explicitly handle all possible combinations of the three input bits (input b has the highest priority, then e, then d).
  4. Create a high-level state machine that loads the data from a digital camera into a RAM, beginning at the address specified by input start, and ending at the address specified by input stop. Input go initiates loading data from the digital camera into the RAM. Setting RCPY = 1 signals the digital camera to output a data item on every clock cycle. Once the loading process starts, it will continue until all values have been processed. Lastly, the data bus may be shared by other peripherals.
  5. Create a datapath for the following high-level FSM.
  6. Perform two-level logic optimization for F(a, b, c, d) = a’b’c’d’ + a’c’d’ + a’cd’ + bcd’ + acd’ using K-maps.

Inputs: y; Outputs: e

A B

y’ / e = 1

y / e = 0 y’ / e = 0

y / e = 1

A B

D

Inputs: ab; Outputs: w

C

w = 1 w = 1

w = 0 w = 1

a’

a’b’

ab’

ab (^) b’

ab

b

b’ + ab’

Inputs: A (8-bits), B (8-bits), go, hold Outputs: M (16-bits) Local Register: Sum (16-bits), A_reg (8-bits), B_reg (8-bits), count (8-bits)

A B

go’ (^) count < B

Sum = 0 M = 0

C D E A_reg = A B_reg = B count = 0

Sum = Sum + A count++

hold (count < B)’

hold’

M = Sum

go

Encrypt/Decrypt b Circuit e d

I J 32 32

Digital Camera

Processor

65K x 8 ROM

DataAddrR/w’En

RBUF RA^ RW^ RE RCPY

go start stop

  1. Using the K-map provided, identify a) minterms b) implicants c) prime implicants d) essential prime implicants
  2. Assuming muxes have a delay of 5 ns, adders and shifters have 10 ns delay, multipliers have 20 ns delay, and wires have 2 ns delay,

a) What is the critical path of the datapath and it’s corresponding delay? b) What is maximum system clock frequency given the current datapath? c) What modifications can be made to the datapath to increase the system clock frequency?

  1. Convert the following C-like code to a high-level finite state machine.
  2. Using Quine-McCluskey (tabular minimization method) minimize F(a, b, c, d) = ∑m(1, 2, 3, 4, 5) + ∑d(12, 13, 14, 15).
  3. What is the difference between an exact algorithm and a heuristic?
  4. Using the Shannon expansion theorem, determine the positive and negative cofactors of F(a, b, c) = a’c + b + ab’c’ with respect to c.
  5. Convert the following state table to and FSM.
  6. What is the difference between a FSM and a high-level FSM?
  7. Describe the functionality of a 3-input XOR gate using an ASM chart.

Inputs: byte a[32], wait Outputs: byte max MAX_VALUE: byte temp; while(1){ while(wait); temp = 0; for( i=0; i<32; i++) { if( a[i] > temp)[ temp = a[i]; } } max = temp; }

A B C D

<<

  • 2

Z

s1 s0 gcnt n1 n0 x z

A 0 0 0 0 0 0 0

B 0 1 0 0 1 0 1

C 1 0 0 1 0 1 1

D 1 1 0 1 1 1 0

1 1 1 1 1 1

00 01 11 10

1

0

a

bc