Report Date: March 30, 1996 From: Joe Cavallaro, cavallar@ece.rice.edu, Designer: Michael Hunt, Jessica Pistole, Tino Tran Design Description: Roving Robot Microcontroller Design Name: RVRBOT MOSIS Fab ID: N5CRHF1 MOSIS Design ID: 47628 Technology: 2 micron TINY-SCNA Design Size: 2000 x 2000 microns DESCRIPTION: A microcontroller which directs a robot towards a signal source by sampling signal intensity. BACKGROUND: The objective of this project was to design and fabricate a CMOS microcontroller for a robot which implements an algorithm that directs the robot towards a signal source by sampling the intensity value of the signal and using this information to localize the signal source in a 16x16 grid. The microcontroller consists of a 5 major components: 1) Control PLA; 2) ALU; 3) Register Files; 4) Multiplexer; 5) Glue Logic. In order to simplify the control of the robot, its operation was restricted to two degrees of motion in single-unit discrete steps. To triangulate the source of the signal, the robot stores a set of values which represent the boundaries of the region in which the robot has determined the source to be. As the robot travels through this space, it continually shrinks the boundaries according to the intensity of the signal by the following procedure: 1) Read the current intensity value; 2) Compare the current intensity value to the previous value; 3) Reset Boundaries; a) If the current value is less than the previous, the robot has moved away from the source and has moved the wrong way and so it must set a boundary in front of itself and return to the previous position; b) If the current value is greater than the previous, the robot is moving in the correct position and must set a boundary behind itself and keep moving in the same direction; c) If the the values are equal, the robot doesn't know if it has made either a good or bad move, so no boundary is set. However, the robot should make a right turn to place it on a perpendiular path to ensure that it doesn't keep retracing its path. This algorithm was minimized as much as possible into 31 states and translated into a meg file which was processed into a magic rendering using the meg2pla script provided. The functionality of the ALU for the controller required a 4-bit incrementer, decrementer and comparator. The increment and decrement circuits were implemented as cascaded combinational logic while the comparator was a ROM generated by a meg decription. The design goals for this microcontroller are: 1) Voltage supplies of Vdd = 5V and Vss = 0V (GND); 2) Clock Speed = 1 MHz; 3) Robot is able to find a static source at any location in the 16x16 grid. The five controller parts were designed individually and the microcontroller was laid out using MAGIC. The entire chip (including the pad frame) was then simulated using irsim. The simulation results indicated that the design goals were met and the transistor level implementation of the algorithm was correct. We attempted to determine the maximum clock speed of chip using crystal but the PLA, the latches and the mux confused crystal's critical timing analysis. The design was then fabricated and tested. TEST RESULTS: Since the anticipated application of this chip requires the implementation of a robot with a 4-bit digital sensor readout, the movement of the robot and the new sensor reading needs to correlate with a decrease in the readout when the robot moves away from the source and an increase in the readout when the robot moves towards the source. However, the scope of this project did not include the actual construction of the robot or the sensor hardware. Therefore, in order to simulate, the chip we needed to manually determine the position of the chip according to the algorithm parameters and set an appropriate sensor intensity value. We implemented 5 test vectors which cycled the pla through all possible states. Each boundary was tested to make sure that the robot never made a move such that it travelled beyond the 16x16 grid. Additionally, we designed a test vector which leads the robot around the grid until it eventually found the signal source and raised the done flag. This vector introduced the pla to all of the critical decisions in the algorithm (including movement in all directions, reversal of direction, boundary adjustments and comparisions, and ALU operations). Every component of the chip was rigorously subject to testing with this vector. Three of the four chips passed all our tests. The fourth chip seemed to have a problem with the ymin2 boundary register. This bit was permanently stuck at 1 despite being reset to 0. This error precluded the robot from ever finding the source since the done state requires that the y boundaries match (as well as the x boundaries). Analysis of the design led us to believe that this error is due to a fabrication defect, since the reset logic is common to all 4 bits in both the xmin and ymin registers. Additionally, the design of the latch is replicated over the entire bank of 32 register-bits throughout the chip. If the design were flawed in the reset logic, at least 31 other bits (across the four chips) would not have been correctly reset. If the latch design was flawed, 127 other bits should have been corrupted across the four chips. CONCLUSIONS: All of our design goals were met. In fact the maximum clock rate was greater than we anticipated. Using a non-overlapping clock, we were able to achieve a maximum clock rate of 8.52 MHz. The batch of chips we received from MOSIS had a 75% yield, however the defective chip was fully functioning except for the fabrication of a single latch in the boundary registers. Submitted by Michael Hunt, Jessica Pistole, Tino Tran Further information on this project may be obtained on the World Wide Web at http://www.rice.edu/~jessica/elec422/ ***** END OF MODEL REPORT *****