Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please re-check the solution provided for below question Complete question is below previous ANS provided by chegg expert is wrong, hope again new expert will

Please re-check the solution provided for below question

Complete question is below previous ANS provided by chegg expert is wrong, hope again new expert will not copy paste same wrong solution.

Find a State Machine as the following and as expressed in a floorplan diagram. At the default state, the lights are all turned off. When you enter the house, you can press one of the 2 push buttons you have, p1 or p2. When you press any of those buttons, the l1 light turns on. Imagine this is the entrance light, and you can take your jacket off. Once you are done, you decide which room you want to enter (kitchen or bedroom, for example). If you press the button p1, l1 turns off and l2 turns on. Instead if you press the button p2, l1 turns off and l3 turns on. Pressing another time any of the 2 buttons, p1 or p2, the light that is currently on will turn off, and well get back at the initial state of the system. Model the system using SystemC and write test bench to run the simulation. You need to submit a single pdf file containing the problem statement, FSM diagram, zSystemC code, test bench, and assumptions made if any. The code should be commented on appropriately.

In below snippet where l2 and l3 are turned ON?

image text in transcribed case L1_ON: if(pl.read() == true) { state = KITCHEN; l2.write(false); l1.write(false); } else if(p2.read() == true) { state = BEDROOM; l3.write(false); l1.write(false); } break;

case KITCHEN: if(pl.read() == true) { state = OFF; l1.write(false); } break;

case BEDROOM: if(p2.read() == true) { state = OFF; l1.write(false);

This solution was written by a subject matter expert. It's designed to help students like you learn core concepts. Chegg Step-by-step Writing lab closed? Get plagiarism checks, expert paper help \& more Step 1/4 The complete description/problem statement of the given finite state machine is given below as pointwise: - The problem is modeling a state machine system using SystemC that controls the lights in the My Textbook Solutions house. The system has two buttons (p1 and p2) and three indicators ( 11,12 and 13). - In the default state, all indicators are off. When either button is pressed, the 11 indicator lights up. - After removing the jacket, the user can enter either the kitchen or the bedroom. When user presses p1, l1 turns off and 12 turns on, when user presses p2, l1 turns off and 13 turns on. - Pressing p1 or p2 twice turns off the currently lit indicator and returns the system to its default state. To simulate the behavior of the state machine, a test bench is created. Chegg This is pointwise representation of the given finite state machine. It can be further described in logic format as: Writing lab closed? State: OFF Input: pl or p2 Get plagiarism checks, Action: None expert paper help \& more Next State: L1_ON State: L1_ON Input: pl or p2 Action: Turn on L1 Next State: KITCHEN or BEDROOM

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_2

Step: 3

blur-text-image_step3

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

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago