ELEC2141 – (Solution)

$ 29.99
Category:

Description

Your assignment solutions are to be submitted in pdf format on Moodle. Combine all scanned copies of your handwritten work and electronic documents into one pdf file for the submission.

In your submission file include a scanned copy of a completed and signed assignment submission form as the front page.

Use Xilinx ISE (or any other appropriate CAD tool) to simulate and verify your design. Attach all design and simulation materials such as schematics, HDL code, simulation outputs and testing fixtures.

Vending Machine
You are to design the control for a vending machine to the following specification:
The vending machine only sells toilet paper rolls that costs $25/pack and accepts only Australian banknotes* (excluding $100). Limited to only 1 pack per transaction.
*Acceptable Australian banknotes – $5, $10, $20, $50
• If $100 note is inserted, the machine will assert a refund (REF) signal and the note will be rejected/refunded.
• Only one banknote can be inserted at the time. A banknote sorter logic indicates to the Finite State Machine (FSM) the value of the banknote that has been inserted. Assume that the FSM advances from one state to the next when a banknote is inserted.
• The customer requires to press a ‘purchase’ button (PUR) to confirm the purchase. If the cumulative value inserted to the vending machine is less than the item price, the vending machine will remain in the same state until the customer inserts enough money. If the cumulative value inserted is exactly $25, the banknote sorter sends a release signal (REL) and a latch is released so the customer can get a pack of toilet paper rolls. If the amount deposited exceeds $25, the excess amount is refunded to the customer by asserting a refund (REF) signal to the banknote sorter and the latch will release a pack of toilet paper rolls.
• The customer can press a ‘refund’ button (REF) any time during the process and the deposited amount will be refunded. You can assume any excess amount will be available at a repository from one state to the other. For example, if the customer has already deposited $20 and then deposit another $50, the FSM will output a signal to the banknote sorter to release $45. Only when the customer press a ‘refund’ button the $25 withheld will be refunded.
Transform the word description into a finite‐state machine (FSM). Decide which features are implemented by the FSM and which features by combinational logic.
1. Draw a state diagram and list the state table for the FSM.
2. Implement the FSM using D, T and JK flip‐flops.
3. Verify the D flip‐flop implementation in (2).
4. Write Verilog HDL models for the machine based on the state diagram and the D flip‐flop sequential circuit that you implement.
• Make sure you have adequate and clear comments in your code.
• Write a test bench to verify the operation of the FSM. The test bench should consider all different scenarios.
• Simulate the behaviour of the FSM using the test bench you developed.
Refer to assignment II marking guidelines for detailed breakdown

Reviews

There are no reviews yet.

Be the first to review “ELEC2141 – (Solution)”

Your email address will not be published. Required fields are marked *