eecs270.org

Project 2B: Renee

Project 2A: Robbie

Due Date: September 25, 2026 at 11:59 PM

Before Starting

Helpful resources:

Starter Files

Design Specification

Renee is a more advanced robot than Robbie. She has two beacon sensors that provide distance information, four bumper sensors that detect collisions, and wheels that can move in reverse in addition to going forward.

Project 2B Interface

Figure 1: Project 2B Interface, module decomposition, and module instantiation graph.

Sensors and Wheels

  1. Beacon sensors: Renee has two sensors aimed at her left and right. Each sensor returns a 3-bit unsigned number indicating signal strength. The higher the value, the stronger the signal (7 is strongest, 0 is weakest).
  2. Bumper sensors: Renee has four bumper sensors (front, back, left, right). They are active low: they return 0 if Renee has bumped something in that direction, 1 otherwise.
  3. Wheels: Renee’s wheels can move forward (F), reverse (r), or stop (S). Each wheel’s action is displayed on a HEX display:
F
S
r

Renee’s Actions

Table 1 shows the actions Renee can perform and the corresponding wheel states.

Action Left Wheel Right Wheel
Forward F F
Left S F
Right F S
Stop S S
Left Back S r
Right Back r S
Reverse r r

Table 1: How Renee uses her wheels to perform her actions.

Behavior Rules

Renee should head in the direction of the sensor with the strongest signal (highest value). If both signals are the weakest possible (0), Renee should stop. If the two signals are the same but not the weakest possible, Renee should go forward.

The beacon sensors are ignored if Renee has hit something: in that case, her first priority is to move away from the obstacle. If any of her bumpers detect a collision, she should follow these rules:

  1. Only front bumper: Reverse
  2. Only back bumper: Forward
  3. Only left bumper: Right back
  4. Only right bumper: Left back
  5. Only left and front bumpers: Right back
  6. Only right and front bumpers: Left back
  7. Only left and back bumpers: Right
  8. Only right and back bumpers: Left
  9. Any two bumpers on opposite sides (front and back, left and right): Stop

Renee Module Interface

Net Size Direction Description
ls 3 bits Input Left beacon sensor signal strength (higher = stronger)
rs 3 bits Input Right beacon sensor signal strength (higher = stronger)
lb 1 bit Input Left bumper sensor (active low)
rb 1 bit Input Right bumper sensor (active low)
fb 1 bit Input Front bumper sensor (active low)
bb 1 bit Input Back bumper sensor (active low)
lwa 7 bits Output Left wheel action (displayed on HEX1)
rwa 7 bits Output Right wheel action (displayed on HEX0)

Top-level: Project2B Module

This module connects Renee to the FPGA pins. Create temporary wires called sw_bus [2:0] and assign them to SW and use those.

Net Direction Physical Description Correspondence to Renee
SW[2:0] Input rightmost 3 switches rs (right beacon sensor)
SW[6:4] Input left-center 3 switches ls (left beacon sensor)
KEY[0] Input rightmost button bb (back bumper)
KEY[1] Input second button fb (front bumper)
KEY[2] Input third button rb (right bumper)
KEY[3] Input leftmost button lb (left bumper)
HEX1[6:0] Output left 7-segment display lwa (left wheel action)
HEX0[6:0] Output right 7-segment display rwa (right wheel action)

Design Notes and Hints

Logical Operation Verilog
NOT ~, !
AND &
OR \|
XOR ^
XNOR ~^

Testbench

Your testbench for Renee (TestBench2B_tb.v) will be scored on the Autograder for test coverage. Your tests receive points for detecting specific input combinations that expose potential bugs in a design. Read the Renee specifications carefully to pick meaningful test cases. Thorough tests improve the chance of catching mutants.

Your testbench must instantiate the Renee module, not Project2B. Build off the starter file, which includes an example test case.

Deliverables

File Name Task Testing Process Grading Process
Renee.v Implement Renee controller module ModelSim Autograder
ReneeAction.v Implement wheel action display module ModelSim Autograder
unsignedComp.v Implement 3-bit unsigned comparator ModelSim Autograder
TestBench2B_tb.v Write test cases for Renee module ModelSim Autograder
Project2B.v Connect Renee to FPGA inputs LabsLand Autograder

To ensure that your design works with the Autograder, do not modify file names, module names, or interfaces for any of the starter files. All files must be submitted to the Autograder for grading and feedback.