Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Imagine a state machine that has a two-bit input in[1:0] and an output out. Consider the initial state to be one where out = 0.

Imagine a state machine that has a two-bit input in[1:0] and an output out. Consider the initial state to be one where out = 0. In this state machine, all output changes should occur in synch with the clock.

The output should only change in response to the following input sequences. Each two-bit value represents an input condition that along with a clock trigger causes a state change. As indicated above, the output should only change on the clock trigger following the second two-bit value in the sequence.

The clocked input sequence ins[1:0] = 10, 00 causes the output to become 0.

The clocked input sequence ins[1:0] = 01, 00 causes the output to become 1.

The clocked input sequence ins[1:0] = 11, 00 causes the output to toggle (complement) its value.

image text in transcribed

Implement the state machine using a one-hot encoding for the state assignment and D flip-flops The module you write should instantiate the proper number of flip-flops to implement a one-hot state assignment. Use continuous assignments for the D flip-flop input logic and the Z output logic. Use the following model for your module declaration module state onehot (clock, init, in, out, state) input clock, init; inRutml1:0] in; output out; output ?:0] state; //2 is something that should be changed. How many states are there? When using a one-hot state code, every state including the initial state - is a one-hot code. Therefore, you must use the same init to set the initial state's hot bit that you use to reset the bits of the initial state that are not hot. Implement the state machine using a one-hot encoding for the state assignment and D flip-flops The module you write should instantiate the proper number of flip-flops to implement a one-hot state assignment. Use continuous assignments for the D flip-flop input logic and the Z output logic. Use the following model for your module declaration module state onehot (clock, init, in, out, state) input clock, init; inRutml1:0] in; output out; output ?:0] state; //2 is something that should be changed. How many states are there? When using a one-hot state code, every state including the initial state - is a one-hot code. Therefore, you must use the same init to set the initial state's hot bit that you use to reset the bits of the initial state that are not hot

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

2 Should monetary policy be made by rule rather than by discretion?

Answered: 1 week ago

Question

What is group replacement? Explain with an example. (2-3 lines)

Answered: 1 week ago