San Diego State University CS 370 Computer Architecture
Lab Assignment 3: The “Gottcha Anti-Theft” Machine
(100 points, weight 15%, due 11:59pm on November 19) Goal: The purpose of this exercise is to create Finite State Machine (FSM) which can detect a certain eight digit binary sequence in a continuous serial binary input stream. When the correct sequence is detected, the single output signal should be a logical true value, in all other cases it should be a logical false. This exercise is designed to allow a gradual transition from strictly combinational circuits to a simple sequential circuit. Note that this lab assignment is a group assignment with each group having 2 students. If you need help to find out a partner, please send an email to the instructor. Problem Statement: The “Gottcha Anti-Theft” Machine There are many anti-theft devices on the market that attempt to foil a would-be robber from starting your car and driving off with it. One popular item has a keypad like a touch-tone telephone. In order to start your car, you must key in a secret four digit decimal code, such as ‘3719’. It only “remembers” the most recent four digits you have keyed in. Thus the sequence ‘3723719’ will let you start your car. For simplicity here we use a code based on a sequence of eight bits, and use two push buttons to enter a sequence serially. Each press of a button enters the corresponding digit.
Figure 1. The Gottcha machine in action.
As you key in the bits in sequence, the device outputs E = 0 until the most recent eight bits agree with a built-in secret code byte. Then E switches to 1. The shut-off gottcha: If 16 bits are toggled in without the secret code being observed, the system shuts off and won’t accept any more bits. Add a reset button to the system that presumably only the owner could control: when RESET is pressed the system is again enabled and can accept bits. Design and test (on LogicWorks) the miracle Gottcha machine. Do this in two different ways (thus designing and simulating two different circuits): 1) The Factory Preset Model: The specific secret byte preset at the factory MUST be one of your team members’ secret keys. For groups with single member, please use your assigned secret key. A table of secret key corresponding to each student’s RedID is attached
to this document. You can find your secret key from the table. All groups, please explicitly explain which key is used for Factory Preset Model in your Readme file. Your group will receive zero point if you don’t follow this key use policy specified above. Do not use registers: solve for the finite state machine with the fewest states and flip-flops possible.
Some Hints: 1) These systems have no actual clock – the release of either pushbutton produces a transition that is used to trigger the flip flops involved. The main flip flops in the circuit are triggered by this transition. 2) You might put the outputs of the two pushbuttons into asynchronous inputs of a flip flop, which therefore instantly stores the value (i.e. informs “which” pushbutton was pressed) of the newest input bit. The output of this flip flop is then used as the actual “input” value. 3) Use a shift register in part 2 to store the most recently received bits. Compare the shift register output to the programmed code word. (So part 2 is very simple.) Submission Instructions: a) A one-student group only needs to complete the Factory Preset Model. A two-student group needs to accomplish both the Factory Preset Model and the User-Programmable Model. For one-student groups: please find out your assigned 8-bit binary secrete key associated to your SDSU RedID in the table attached to this document. For two-student groups: please use an 8-bit binary secrete key assigned to one of your members in the table attached; Please tell us which member’s secrete key is used. b) Write a Readme text file that includes (1) your group member names and the contribution of each member (who did what); (2) list each file enclosed in your submission package and briefly explain its function and usage. c) A brief description of the design process you used to obtain the circuits. Be sure to point out why you chose a particular design, along with the steps you took to minimize the amount of hardware required in each case. d) Your LogicWorks files including your circuit schematic file (.cct) and your library file (.clf). In your .cct file, please document each section using the Text tool (Ctrl_E) so that the grader knows how it works. Note that documentation is essential for full credit. e) Zip all your LogicWorks files and the Readme text file into one document and name it using the first initial and the last name of one of your group members (e.g., assume that Nathan Adams is in your group, your zip file should be NAdams.zip). Note that only one member should submit this lab assignment on behalf of the entire group.
f) Submit your zip file from within the Canvas. Secret keys:
RedID Lab #3 Key
823287160 10011111 826614744 10111001 826382005 11000000 821333403 10001110 822920430 10011001 824088233 10101100 823653773 10111101 824115494 10001111 824167663 10010100 826499109 10111010 827235091 10001011 822086285 10110110 820670806 10111110 819483035 10001001 821184111 10000001 821490742 10010101 826676845 10100100 825739532 10001100 821497970 10010111 820604909 10100010 823987444 11000001 822581065 10011000 823659597 10111000 822489714 11000010 826761332 10010000 823927956 10110000 822309027 10011011 820087964 10100111 824368877 10101101 824472084 10101111 825946544 11000011 820112599 10011100 823046348 10101110 827224405 10001101
823843846 10000011 824401923 10101000 823668580 10111011 822628762 10110011 826457561 10110100 827223690 10110101 822774843 10000101 827216904 10100000 827213459 10001000 821257730 10110010 827216826 10100101 822740094 11000100 823512294 10010001 823866557 10111100 821533109 10010010 825590136 10110001 827231789 10000110 823978214 10101001 820532161 10011110 821399976 10100110 817314271 10101010 821770255 10000010 822535344 10110111 822614514 10100011 823983271 10011010 824470810 10101011 820402811 10010011 822176869 10001010 827251094 10000111 821592688 10011101 822956570 10100001 826681278 10111111 820226180 10000100 823984402 10010110