Computer Science 37 HW 2
Computer Science 37 HW 2
Computer Science 37 HW 2
Due on Friday, July 12th, at the beginning of class. Note that each problem herein must be turned in as a separate deliverable, each one clearly labeled with your name.
LogicWorks
One problem in this assignment requires the use of LogicWorks. The solution to this problem must be submitted in two different ways: 1. A printout of your circuit, to be labeled with the problem number and your name, delivered separately from other parts of this assignment. On this printout you are asked to indicate whether, to the best of your knowledge, the circuit performs to specification or not. The accuracy of this information will help our graders in evaluating your work. In the case where full credit is not due, your indication that the circuit is not totally correct will save us time and thus may win you some leniency in the assignment of partial credit. 2. The LogicWorks file correspondent to the circuit printout handed in for item (1) above. This file must be copied to the CS37 folder in the Dartmouth PUBLIC directory structure.
Before you do anything serious with LogicWorks, allow yourself time to play around with different devices and options. At this point, the devices youll be interested in can be found in libraries Simulation Gates (logic gates such as NOT, AND, OR, etc) and Simulation IO (the binary probe lets you see the bit-value of a signal and the binary switch allows you to provide input to your circuits: double-clicking on the switch toggles the value it produces). Make sure you know how to draw, rotate, select, move and delete devices and wires. Use the pencil tool (Edit->Name) and click on the wire you want to name, double-click on the textbox that appears, type a string and press enter: this will label a signal and allow you to identify it in the timing window. These labels can also be used to connect components far away from each other, what can greatly decrease the visual clutter when your circuits get complex.
S (stop or run)
S = 0 (run) makes the counter run. S = 1 (stop) makes the counter stop.
The circuit must have three output lines [Out 2 Out1Out 0 ] , which give the 3-bit binary representation of numbers between 0 and 7, inclusively, where Out 2 is the most significant bit and Out 0 is the least significant bit. You are asked to produce a solution to this problem in two parts. (1) A written part:
a. Identify the states of the counter and represent it as a Moore finite state machine. Note that since there are 4 possible combinations of the two control inputs, you must specify 4 different transitions from every possible state.
b. Write the truth table for the state transition function and the corresponding logic equation.
c. Write the truth table for the output function and the corresponding logic equation. Note that if you label the states carefully, the output function is trivial. d. Design your circuit in LogicWorks using whatever types of gates you see fit and submit a printout of your circuit with the rest of this part of the problem.
(2) A file containing your LogicWorks implementation that must be deposited in the CS37->HW1 folder under PUBLIC. The file must be named according to the following scheme: CS37-X02-HW2-1-lastname-firstname where lastname and firstname are your last and first names, of course.
c) What are setup time and hold time? To what kind of devices are these values relevant? d) What is the difference between a latch and a flip-flop? Why arent the former used as the memory elements in finite state machine implementations? e) If the height of a memory chip is 1024 and its width is 8 bits: (i) How many bits can this chip hold? (ii) How many lines are used to address a word in this chip? (iii) How many lines come out of the read port in this chip?