$25
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).
• However, if the robotic bunny was foraging, since sleeping on the forest floor may lead to a wild animal eating the robot bunny, it will first hide and then sleep once hidden.
• 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.
If you have any questions on what you may not use then assume you can’t use it and ask a TA.
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).
• Remember that due to this FSM being a One-Hot FSM, you do not need to create minimized/reduced boolean expressions and can implement your circuit with simple sum-of-products expressions.
• 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.
5. A common cause of short-circuits is two pins (on an AND gate, splitter, etc) being unintentionallyconnected. These are often hard to spot, since the pins are so close to each other, but if you zoom into your circuit you may find such an error and fix it.