Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this question, you are going to model a system with state machines. When you draw a state machine, please include a legend of inputs,

In this question, you are going to model a system with state machines. When you draw a state
machine, please include a legend of inputs, outputs, and any additional variables you use in the
top left corner, following the labeling conventions from the textbook.
a) Draw a deterministic FSM (call it PWM) that has one pure input (tick) and two pure
outputs (up and down). PWM outputs up for 5 ticks and then outputs down for 3 ticks, and
repeats. This FSM should NOT be an extended state machine.
(The output of such a FSM could be used to control pulse width modulation, where an up
signal corresponds to a high level and a down signal corresponds to a low level)
b) For long sequences of 'up' and 'down' outputs, the FSM in part (a) quickly becomes
unwieldy. Redesign the FSM from part (a) as an EXTENDED state machine.
c) The PWM state machine in part (b) expects a clock input 'tick'. Suppose we want to
model a crystal oscillator as a timed automaton.
a. Draw a hybrid state machine CLOCK that generates a pure output signal 'tick' every 1
millisecond.
b. Suppose you manufacture your real-time clock device, but the crystal resonator is
faulty and resonates at half of its expected frequency. How would you update your
hybrid state machine CLOCK to reflect this change? Draw the updated state machine.
What is the new period of the clock?
d) Suppose you wanted to compose state machines PWM and CLOCK such that FSM
CLOCK generates the 'tick' input for FSM PWM. What kind of composition would you use,
and why?
e) Draw a nondeterministic FSM that can be used to model a button that is pressed at a
random time and then released at a random time. This FSM has no inputs but has two pure
outputs (pressed and released).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions