Question: QUESTION STATE MACHINE DESIGN VERILOG CODE PART - 1 PART 2 TEST-BENCH CODE PART 1 PART 2 PART 3 WAVEFORM The code above was written

QUESTION

QUESTION STATE MACHINE DESIGN VERILOG CODE PART - 1 PART 2 TEST-BENCH

STATE MACHINE DESIGN

CODE PART 1 PART 2 PART 3 WAVEFORM The code above was

VERILOG CODE

PART - 1

written to answer the question. However, the code only gives the output

PART 2

for S1. Please correct the error in the code. (If necessary, I

TEST-BENCH CODE

PART 1

can send the code, I had to attach pictures of the code

PART 2

because it took up too much space). Design the given system on

PART 3

Verilog. As per Covid-19 requirements, electronic labs of a well-known university requires

WAVEFORM

a vending machine for dispensing hand sanitizers and masks. Vending Machine only

The code above was written to answer the question. However, the code only gives the output for S1. Please correct the error in the code. (If necessary, I can send the code, I had to attach pictures of the code because it took up too much space).

Design the given system on Verilog. As per Covid-19 requirements, electronic labs of a well-known university requires a vending machine for dispensing hand sanitizers and masks. Vending Machine only accepts following rupee notes: a. PKR 50 b. PKR 100 Price of each item is as follow: a. Masks - Rs.50 b. Hand Sanitizers Rs. 100 Vending Machine only returns following rupee note: a. PKR 50 If the amount is greater than the item cost, a change will be given back. If the amount is less than the item cost, RED LED has to be switched ON, otherwise OFF. + If the transaction is successful, GREEN LED has to be switched on, otherwise OFF. Make a report which includes the state diagram with proper labelling. Verilog code, Test bench with multiple inputs, simulation waveform and also explain your design. Date: o Sb d=1 L=0 b Thao ha SO m0 mo et SEO do LO TO fa 1 me S3 S=0 (0 LO hai 150 52 d LO to mo mei See SL 4-0 fo1 d. 1 L=0 SE/ S1 d=0 L: 1 ht Ao ms 1 S: ha hundred (100) F = fifty (50) morts Sceanitizer d-ous pense 1. less than =change CamScanner module FSM_1(input clk, input reset, input h, input f, input m, input S, output reg d, 1, c); reg state, nextstate; parameter SO=3"b000, S1=3'b001, S2= 3'b010, S3=3"b011, S4=3'b100, S5=3'b101, S6=3'b110, S7=3"b111; always @(posedge clk or posedge reset) if(reset) state

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!