Question: What is the error of the following verilog code? module vending ( clk , reset,one,two,five,d , r ) ; input clk , reset,one,two,five; output reg
What is the error of the following verilog code?
module vendingclkreset,one,two,five,dr; input clkreset,one,two,five; output reg d; output reg :r; reg :cntb; counter for counting money always@posedge clk begin ifreset begin d; r; end else ifone begin cntcntb; end if entered token is then count increases by else iftwo begin cntcntb; end if entered token is then count increases by else iffive begin cnt:cnt:b; end if entered token is then count increases by end always@posedge clk begin ifcnt begin if sufficient money enetered then drink will be issued d; r:cnt:b; end remaining amount else begin d; r; end end endmodule
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
