Team Project

CMSC 411 / Olano, Spring 2012

In the five weeks remaining in the semester, you will be designing a processor architecture for a robot-war game.

  1. Form a team of 3-5 class members. Let me know your team members by Wednesday, April 4th. Anyone not in a team by the 4th will be assigned a team by random selection. Once teams are formed, let me know your final team make-up and team name by Friday, April 6th. The team name should consist of alpha/numeric characters only, as it will be the name of your team's code repository on CVS.
  2. Design an ISA (including instruction selection and encoding), and organization for a processor to control your robot. Your organization should assume that it takes a full cycle to access instruction memory, read or write data memory, perform any ALU operation (including integer multiply or divide), or perform any one of the special robot operations below.Since each of these units takes a full cycle, you will need either a multi-cycle or pipelined design. In addition, it is a structural hazard to: 1) read more than one instruction in a cycle, 2) access data memory more than once in a cycle, 3) read more than two registers or write more than one register, 4) perform more than one special robot operation.

    Your instruction set can use four special operations:
    1. Set a motion rate forward (positive) or backward (negative) in inches per second. Whatever motion rate you set, the robot will not move faster than one foot per second.
    2. Set a positive or negative rotation rate in degrees per second. Whatever rate you set, the robot will not turn faster than 90 degrees per second.
    3. Do a radar scan in the direction you are currently facing. This will return an integer distance in feet to the nearest other robot (positive) or wall (negative).
    4. Fire a projectile to hit at a given distance in feet in the direction you are currently facing.
  3. Create a simulator in C or C++ for your instruction set. The register file and memory should be represented as arrays. Internal registers should be represented with C variables. ALU and other blocks can use functionally equivalent C code. Your simulator should run as a command line program on the gl.umbc machines with these precise input/output specifications:
    1. It should take the name of a binary machine code file as a command-line argument. You can open a binary file with fopen(filename, "rb") and read it with the fread() function.
    2. Each time you hit return it should execute one clock cycle of your program. You can detect this with a scanf("%*c")
    3. Every cycle, write one of these values to the console (and if appropriate, read the result):
      Instruction Program output Response
      Move M <rate> none
      Rotate R <rate> none
      Scan S <signed distance>
      Fire F <distance> none
      None N none
  4. Write your best killer robot program in your machine code.
  5. Sumbit everything to CVS by Monday, May 7th. Also submit a written report in class describing your ISA and its encoding, organization, simulator, and killer robot program.
  6. Each team member should also send me an individual email by Monday, May 7th detailing the contributions all team members. For example: I designed the ISA, Alice created the organization, Bob and I wrote the simulator, Carol wrote the robot program, and Dave wrote the report. I will primarily use this to detect cases of gross unevenness in effort.
  7. We'll have a tournament of robots on the final day of class, Wednesday, May 9th. The winning team will get 12 extra credit points each. The second place team will get 8 extra credit points, and the 3rd place team will get 4 extra credit points.

You can test your robot with the provided robot driver program on in ~olano/RobotDriver. The driver that runs the game is called RobotDriver. There is also a sample TestRobot program showing the basic interface for your robot simulator.

To run in your own directory, create a robots.txt, each line in this file should list two items: the robot simulator executable (possibly including a path) and code file (possibly including path), separated by white space. See the provided robots.txt for an example. Then run the driver using ~olano/RobotDriver/RobotDriver.

The RobotDriver is in a public repository on bitbucket. You can get a copy for yourself with

hg clone ssh://

Once you've done that, you can get any updates by cd'ing into the directory and running

hg pull; hg update

The grading breakdown will be: