{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw2 - Homework 2 CSEE W4824 Prof Luca Carloni Handout 7...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSEE W4824 Prof. Luca Carloni Homework 2 Handout 7 September 28, 2011 This homework is due at the beginning of class on Monday, October 10. A correct answer without adequate explanation or derivation will have points deducted. To get full credit, write legibly/type, and show all work (label relevant items, show deriviations, include explanations). 1. (10 points) . The operations of a soda vending machine are controlled by a finite state machine (FSM). All soda in the machine cost only 25 cents. At each step the machine accepts exactly one coin. The coin can be one of the following (the corresponding input signal for the FSM is denoted in parenthesis): a nickel (N), a dime (D), or a quarter (Q). When enough coins have been inserted the machine should return a soda (together with any necessary change) and be ready to start accepting coins for a new soda. Consequently, the output signals of the FSM are: DispenseSoda (DS) : asserted only one step after enough coins have been inserted; ReturnNickel (RN) : asserted only one step after enough coins have been inserted if one nickel should be returned as part of the change; ReturnDime (RD) : asserted only one step after enough coins have been inserted if one dime (but not two) should be returned as part of the change; ReturnTwoDimes (RT) : asserted only one step after enough coins have been inserted if two dimes should be returned as part of the change; Derive the state transition diagram (STD) of the FSM (Moore implementation). 2. (15 points) . Consider the code fragment in Figure 1 and start with the following general assumptions: the implementation is based on the classic RISC five-stage integer pipeline; the branch execution is completed in the EX stage; all instructions memory accesses take 1 clock cycle and all data memory accesses take 1 clock cycle.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern