ECS154A Homework #2

Assignment (Written):

  1. Do Problem 7.1 in the book
  2. Given a 60MHZ clock signal, derive a circuit using only DFF's that will generate a 30MHZ and a 15MHZ signal. Draw timing diagrams for all 3 clock signals, assuming reasonable delays.
  3. Show how an RSFF can be built using only a DFF and some other logic.
  4. Show how a JKFF can be built using only a TFF and some other logic.
  5. For the flip-flops in the counter in figure 7.25, assume that the setup time is 4ns, the hold time is 2ns, and the propagation delay through a flip-flop is 2ns. Assume that each AND, XOR and 2-1 Mux has a propagation delay of 1ns. What is the maximum clock frequency that can be used that will ensure correct operation of the circuit?
  6. Do Problem 7.35 in the book, only assume that a NAND has a propagation delay of 2ns (the inverter propagation delay is still 1ns).
  7. Do Problem 8.2 in the book (use T instead of JK FF's)
  8. Do Problem 8.5 in the book, detecting 101 or 110 patterns
  9. Do Problem 8.6 in the book, detecting 101 or 110 patterns
  10. Given the following information:

  11. The propagation delay through a DFF is 8ns
    The setup time for a DFF is 3ns
    The hold time for a DFF is 2ns
    The delay through an AND gate is 4ns
    The delay through a MUX is 5ns
    X, Y and SEL are fixed and do not change

    Find the worst case path through the following circuit.


Assignment (Quartus):

  1. Do Problem 7.15 in the book

  2. Do Problem 8.11 in the book (detecting 0111 or 0101 patterns) and implement.
  3. Do Problem 8.12 in the book, only do it over 5 bits and make p=1 if the number of 1's is even. Implement the circuit.
  4. Consider a coin-operated vending machine. Assume that the
    machine accepts only quarters, dimes, and nickels. Coins are inserted 
    until a total of 25 cents or more is deposited. Only 
    one coin is deposited at a time. The output signal z1=1 should indicate 
    that merchandise should be provided; z1=0 indicates no merchandise.
    
    Coincident with the last coin input, the (change) outputs are to be set.
    Assume the machine can give a dime (z2=1) and/or a nickel (z3=1).
    Use the binary outputs z2 and z3 to represent the 4 distinct possibilities
    (No change, 1 nickel, 1 dime, 1 nickel and 1 dime.)  If a customer does
    something unwise, like puts in a dime and a nickel followed by a quarter, 
    correct change does not have to be provided (but the maximum amount change 
    does.)
    
    Design the circuit in Maxplus.