13.07.2015 Views

MASSACHVSETTS INSTITVTE OF TECHNOLOGY 6.004 ...

MASSACHVSETTS INSTITVTE OF TECHNOLOGY 6.004 ...

MASSACHVSETTS INSTITVTE OF TECHNOLOGY 6.004 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>MASSACHVSETTS</strong> <strong>INSTITVTE</strong> <strong>OF</strong> <strong>TECHNOLOGY</strong>DEPARTMENT <strong>OF</strong> ELECTRICAL ENGINEERING AND COMPUTER SCIENCE<strong>6.004</strong> Computation StructuresSpring 1997<strong>6.004</strong> Issued: 2/19/97Problem Set #2 Due: 2/26/97Reading Assignment: Ward and Halstead, Chapters 4 - 4.5.1, 5.2<strong>6.004</strong> Spring 1997 2/19/97


page 2 of 8 Problem Set #2Problem 1: Warm-up Exercises. [To be done without collaboration]A. Recall that we were able to compute the velocity of wire as a function of the inductanceper unit length (l) and the capacitance (c) per unit length. Your buddy Bob thinksthat he can make wire with zero l and c. If this were so how fast would signal travel onthis wire? Should we all go out and buy stock in Bob’s new company?B. Gill mentioned in lecture that some people were trying to build speaker wire with animpedance of 8 Ohms. Assume that speakers have an impedance of 8 Ohms. Whywould they bother trying to make wire like this? Let’s assume that such wire would bevery expensive. Is it worth the trouble?C. You are given an infinitely large bag of 2 input AND gates and asked to construct acombinational circuit implementing a Boolean function of 8 inputs (i.e. 8 input bitsand 1 output bit). Can you do this for all functions? How many possible 8 input/1 outputfunctions are there? How many of these can you construct? What if you were givenNOR gates?D. You are trying to construct a hazard free component for an elevator controller. You followall the rules for designing a hazard free circuit and then build it. You are convincedthat it works correctly. You are about to ship the controller when your partner says toyou, “Of course you realize that CMOS AND and OR gates are not hazard free”. Youdid not remember that fact from <strong>6.004</strong> and a brief panic comes over you. Is your partnercorrect? Does it matter to your design? (Refer to the CMOS gate implementationsgiven in lecture).Problem 2: An Elevator Controller[May be done collaboratively.]The Ophus elevator corporation is planning on constructing a new type of state-of-the artelevator. They have chosen the catchy jingle, “Its a hell of an elevator”. The engineersnicknamed it the Helevator. They have contacted your company Pretty Good Solutions toconstruct the controller for their new elevator.They have sent you the specs for the Helevator and an inventory of stuff lying around theoffice from their last project. Your mission, should you choose to finish this problem set, isto build a controller that will pick up people when they push the call button in the elevatorlobby and deposit them on the floor of their choice. In general they would like for the Helevatorto operate in high-rise buildings, but for the mean time assume the Helevator willserve Ophus world headquarters which has 4 floors.The Helevator has three distinct types of inputs (see Tables on the next page) and 6 typesof outputs (see Tables). In addition there is a single button installed in each elevator lobbyand a light. Ophus has also sent you a bunch of proto-boards, power supplies, variouslatches (RS-latches, Transparent latches, and D Flip Flops), some discrete logic, resistors,and a number of PLA’s.2/11/97 <strong>6.004</strong> Spring 1996


C U R T T A I P A L E ’ S C H U R C H S O U N D B O O T C A M PIn fact, the workshop agenda that you’ll find on page three of the workbook shows the materialbroken up into four sessions. In my Friday / Saturday format, Session One was held from 7:00 pm to10:00 pm on a Friday evening. That gave us time to get to know one another a little better, and allowedme time to lay out the plan of attack.Session Two was held from 9:00 am to 12:45 pm on Saturday. We broke at that point for lunch,and in an effort to encourage people to build relationships I called it the “Take A New Friend ToLunch” Break.Session Three started at 1:30 pm and picked up where we left off from the morning session. Theday ended at 4:30 pm with an invitation to spend the next hour or so taking turns mixing a multitrackADAT tape that I had prepared for that purpose.I’ve called Session Four a Bonus Study Section because some individuals may not be interested ingoing to that depth, and that’s okay. I think it will help everyone, but you’ll need to be the judge inyour own situation. In our case, we took a short dinner break, started the evening session at 6:00 pmand ended up around 9:30 pm. That made for a very long day, and my voice was toast by the end of it,but we had a great time. I expect you and your team would too if that’s the approach you’d like to take.One special note before we move on: If you choose this weekend class format, ask your Church topay for the lunch. It doesn’t matter if it’s catered, brought in from a favorite restaurant, or prepared byfolks in the church. Don’t look at it like you’re doing this great thing for your students by providingthis class for them. Your team is also making a major investment of their time specifically for improvingthe technical excellence at your Church, and for your Church’s leadership to honor that investment bysimply paying for a great-tasting, memorable lunch would be a wise gesture on their part.You can deliver an effective workshop in a single weekend, and if that’s all the time your team canafford to invest right now, or if your need for training is especially urgent, then by all means go for it.However, I would encourage you to invest more time than that. Shorter seminars spread over alonger time will have a more lasting impact on your team. One format that has worked well for me inthe past is a two or three hour class held, for example, each Monday night for ten weeks. Shorter classesspread over a longer time span will help your team absorb the information better. That also gives you anopportunity to reinforce the previous week’s lesson before you move on to the next subject.This short class format will also help the individuals in your ministry build lasting relationships overa period of time, and those relationships will help you build a “team” instead of “a-bunch-of-guys-whokinda-like-to-get-together-and-do-this-stuff-sometimes.”With just a little planning, I think you’ll easilydiscover a way to build a schedule that your team can work with. Here’s one suggestion.An Eight Week Workshop ScheduleWeek 1Week 2Week 3Week 4Week 5Week 6Week 7Week 8Microphones & Mic TechniqueHow to Hook Up Your Sound SystemMaximizing Your ConsoleEqualization & Signal ProcessingHow to Build a Great MixHands On Mixing SessionLoudspeaker UsageThe Only Stuff That Mattershttp://www.churchsoundcheck.com • CTaipale@aol.com Taipale Media Systems, Inc. N–3


page 4 of 8 Problem Set #2ABThe circuit diagramof an intermittent button.When the button is pressedA is connected to B.B. Draw a circuit diagram for a circuit that records the press of the elevator lobby button(i.e. remembers the press of the button until reset by the controller). Output a 1 whenthe button is pressed, 0 otherwise. We can use the outputs of these button circuits toconstruct the FBUT input to your controller which has 4 bits, one for each floor. The 4RESET lines are collected into a new output for the controller, FRESET.C. In the next sections it will prove handy to have a set of lines which tell us the floor thatthe elevator is on: CFLOOR (the i-th bit of CFLOOR equals 1 if and only if the elevatoris on the ith floor). CFLOOR is similar to FLOOR. How can you computeCFLOOR from FLOOR using Boolean logic?Let’s design a simple scheme to get the Helevator moving in the right direction. For thetime being we will ignore the buttons in the elevator and concentrate only on the elevatorlobby buttons. We will construct a Boolean expression to drive the MOVE and U/D inputsso that the Helevator begins to move in the correct direction when a button is pushed. Donot worry about the state of the doors for now.To solve this problem (and the rest in the problem set) we will find it easier to use an overloadedset of Boolean Algebraic operations. Assume that AND, OR and NOT can operatenot just on 1 bit Boolean variables but also on N bit boolean variables (in our case 4 bitBoolean words). So FOO+BAR is the OR of each of the bits of FOO and BAR separately.OR returns an N bit word (i.e. the 2nd bit of the result is the OR of the 2nd bit of FOO andthe 2nd BAR). In addition the you may use a new unary Boolean function called ZERO?which returns a 1 if all of the bits in its operand is zero (i.e. (ZERO? FBUT) returns a 1 ifand only if any of the floor buttons have been pressed). You can still write expressions thatinvolve a single bit of a word by referring to it with a subscript (e.g. FBUT 1 ).One possible solution is:MOVE = (NOT (ZERO? FBUT))(The elevator will move whenever one of the buttons is pressed)U/D = (ZERO? (AND FLOOR FBUT))((AND FLOOR FBUT) will be non-zero whenever a button has been pressed on a floorbelow the current floor, in that case we should head down.)D. Draw a diagram of a simple circuit that can implement ZERO? on 4 bit operands.2/11/97 <strong>6.004</strong> Spring 1996


Problem Set #2 page 5 of 8E. The design spec states 1) if no button is pressed the elevator should sit at some floorwith its doors wide open and 2) the elevator should not move if the doors are open. Toensure this behavior you will need to create a new expression for O/C and possiblymodify the expressions for MOVE and U/D. (HINT: You will need to use the FRESETlines to solve this problem.)(Special Note: The Ophus helevator will never stop between floors. As a result we willnot need to worry about stopping the elevator precisely on the floor.)F. While the current controller gets the elevator moving in the right direction it does notstop at the calling floor. Modify the expressions for MOVE, U/D, and O/C so that theelevator will stop at all the floors where the lobby button has been pressed and opensits doors to accept passengers.G. If we are not careful we are going to end up with a lot of unhappy people on our elevator.Currently the floor buttons inside the elevator are not hooked up. Suggest a simplecircuit that can be used to modify the current controller so that it will drop people offon the floor they selected. The existing controller need not change too much.The design is nearly complete, it needs only to be implemented. Take a minute to thinkabout the importance of hazards in this design. Assume that the worse case glitches are10ns. Since our device is a large physical system a tiny glitch should be unnoticeable.H. On the last page of the problem set is a diagram of the PLA that you will use to implementthe Helevator controller (see section 5.2 of the text for a description of PLAs).Some of the inputs and outputs of the PLA are already labelled. Note that among theseare the CFLOOR inputs. You do not need to compute these from FLOOR in the PLA ithas already been done for you. Also note that some of the inputs are labelled BUT--assume that your solution to Part G is used to compute these inputs. There are a fewextra input and output lines that you can use as you see fit. If it makes your design anysimpler, you may invert invert any output of the PLA.Remember that your design will consist of a set of PULLDOWNs in the AND PLANEand a set of PULLUPs in the OR PLANE. In the text these are shown as AND and ORgates. Don’t worry about drawing these pictures. A single blackened dot will suffice.Be sure to add some documentation to vertical lines in the PLA (these correspond toproducts in your controller). In many cases a single comment will suffice for manylines.Note: The Remainder of the Problem Set is to be done without collaboration.<strong>6.004</strong> Spring 1997 2/11/97


page 6 of 8 Problem Set #2Problem 3: Gates, can they be hazardous to your health? [To be done without collaboration]Shown below is a CMOS implementation of a logic gate. In this problem we willdetermine the whether it has input hazards.AOUTBA. Hazards can potentially occur when there is a transition from one input state toanother. List all state transitions with potential hazards. Remember that the only hazardswe care about in <strong>6.004</strong> are those that result from 1 input bit changing.B. For the transition 00 -> 01 argue why it either does (or does not) have a hazard.C. Does this circuit have any hazards?Problem 4: Karnaugh Maps [No Collaboration]f = A C + A B C + A C DA. Draw the Karnaugh map of the Boolean function f. Circle the implicants that correspondto each product term from the Boolean expression above.B. Label the hazards that would result if f were implemented using the implicants circledin Part A.C. Write out the minimal Sum of Products form for f which is hazard free (i.e. the resultingexpression should have the fewest possible product terms and no hazards).Problem 5: The Muller C Element [No Collaboration]A. Do Problem 4.2 from the text.Note: The Muller C element is used in asynchronous computing2/11/97 <strong>6.004</strong> Spring 1996


Problem Set #2 page 7 of 8Problem 6: Latches and Flip-flops [No Collaboration]Given the following sequences A and B, draw the timing diagrams for the outputs Q1, Q2,and Q3. All the signals are positive logic, and reset overrides set on the RS Latch. Assumesetup and hold times are met in all cases and that the propagation delay is negligible. Also,assume a low signal as the initial value for Q1, Q2, and Q3.ABTransparent latchD flip-flopRS LatchABDGQQ1 A D QBQ2ABRSQQ3<strong>6.004</strong> Spring 1997 2/11/97


page 8 of 8 Problem Set #2MOVEO/CU/DFRESET1FRESET2FRESET3FRESET4OPENCLOSEDBUT1BUT2BUT3BUT4FLOOR1FLOOR2FLOOR3FLOOR4CFLOOR1CFLOOR2CFLOOR3CFLOOR42/11/97 <strong>6.004</strong> Spring 1996

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!