CS 2110 Timed Lab 2: Finite State Machines Solved

$ 24.99


Your Amazing TAs
1 Timed Lab Rules – Please Read 2
2 Overview 2
3 Instructions 3
3.1 State Transition Diagram 3
3.2 Building the Circuit 3
3.3 Restrictions 3
4 Hints 4
5 Common Errors 4
6 Autograder/Grading 4
7 Deliverables 5

Please take the time to read the entire document before starting the assignment. It is your responsibility to follow the instructions and rules.
1 Timed Lab Rules – Please Read
2 Overview
In this timed lab, you will implement a One-Hot State Machine in CircuitSim. This Finite State Machine will take in one 1-bit input (D), and it will output three 1-bit outputs (P, J, C). The state machine is a Moore State Machine, where your output is based solely on the current state. Diagrams and detailed instructions are provided below.
Dr. TwenTee OneTun is a roboticist and an avid nature photographer. Combining his passions, he decided to make a tiny robotic bunny with a camera to get beautiful pictures of animals in the local forest and he needs your help with the creation of his robot, the Little Cottontail MK.3. He has given you these specifications:
• The robotic bunny will start out hiding.
• If at any point, it senses daylight (D) outside, it will start foraging (State:100), activating the camera (C) and it’s robotic jaw (J) to take photographs of nearby animals.
• If at any point it senses that there is no daylight outside, it will “sleep”(State:010) to conserve energy, turning off the camera and robotic jaw while turning on the low-power mode (P).
• While Hidden (State:001), the bunny can and will still continue taking photographs with its camera (C) but will no longer move it’s jaw.
3 Instructions
3.1 State Transition Diagram

Figure 1: Transition diagram.
3.2 Building the Circuit
Use CircuitSim to build your circuit in the tl2.sim file provided in the assignment files. Complete the circuit so that the logic matches the diagram above.
3.3 Restrictions
The input / output pins we have given you in the skeleton file must not be renamed. Do not add any additional input / output pins other than the ones we have given you. Do not rename the sub-circuit we have given you. If you have issues, check out the ”Common Errors” section below.
You are only allowed to use the following components in CircuitSim:
• Basic logic gates (NAND, NOR, AND, OR, NOT)
• Registers (for this assignment, exactly ONE).
• Wires, splitters/joiners, tunnels, constants, plexers
4 Hints
• Connect your clock and reset first.
• Be careful while using the splitter component to separate your register output or combine register inputs. Remember to first set the bitsize, then the number of fan-outs and finally assign each bit to each fan-out (Bit 0 refers to the least significant bit).
• Don’t forget to provide ALL necessary inputs to your register as well as specifying its bitsize so that it functions appropriately.
5 Common Errors
Use the autograder’s output to determine where you have gone wrong. The names of the tests you fail should usually (but not always) point you in the right direction.
Some common errors and their remedies:
1. Be careful that the bits on your splitters are ordered correctly. A common error is that the register inputs are combined in the opposite order, causing your state transitions to be wrong.
2. Make sure you haven’t added extra any input/output pins to your circuit. It is common to confuseconstants with input pins, and probes with output pins.
3. Make sure you have not renamed input/output pins, or else the autograder won’t be able to find them.
4. Make sure you haven’t changed the name of your sub-circuit.
6 Autograder/Grading
To run the autograder locally, navigate to the directly containing your timed lab and the tester and run the following command:
java -jar tl2-tester.jar
The output of the autograder is an approximation of your score on this timed lab, so that you can evaluate how much of the assignment expectations your submission fulfills. We reserve the right to change the autograder test cases before finalizing grades. Timed labs are not manually graded or reviewed by the TAs, and there will not be opportunities for partial credit beyond the autograder. Submissions that are not runnable will receive a 0.
7 Deliverables
Please upload the following files to Gradescope:
1. tl2.sim
Note: if you were granted an extension, you will still turn in the assignment over Gradescope.
Download and test your submission to make sure you submitted the right files


There are no reviews yet.

Be the first to review “CS 2110 Timed Lab 2: Finite State Machines Solved”

Your email address will not be published. Required fields are marked *