data/full_repos/permissive/12496495/ticket-machine/systemverilog/TicketMachine.sv
 line:19: before: "package"
1: b'%Error: data/full_repos/permissive/12496495/ticket-machine/systemverilog/TicketMachine.sv:31: syntax error, unexpected TIME NUMBER, expecting TYPE-IDENTIFIER\n  parameter CLOCK_CYCLE = 20ms;\n                          ^~~~\n%Error: data/full_repos/permissive/12496495/ticket-machine/systemverilog/TicketMachine.sv:33: syntax error, unexpected TIME NUMBER, expecting TYPE-IDENTIFIER\n  parameter IDLE_CLOCKS = 2ms;\n                          ^~~\n%Error: Exiting due to 2 error(s)\n'
module TicketVendorBotOneHot (input Clock,
                              input Clear,
                              input Ten,
                              input Twenty, 
                              output reg Ready,
                              output reg Dispense,
                              output reg Return,
                              output reg Bill);

  import definitions::*;






  always @(posedge Clock)
  begin 
   if (Clear)
	  State <= RDY;
   else
	  State <= NextState;
  end





  always @(State)
  begin
  case (State)
	  RDY:	  begin
	    Ready    = ON;
		  Bill     = OFF;
		  Dispense = OFF;
		  Return   = OFF;
		  end

	  DISP:	  begin
		  Ready    = OFF;
		  Bill     = OFF;
		  Dispense = ON;
		  Return   = OFF;
		  end

	  RTN:	  begin
		  Ready    = OFF;
		  Bill     = OFF;
		  Dispense = OFF;
		  Return   = ON;
		  end

	  BILL10: begin
		  Ready    = OFF;
		  Bill     = ON;
		  Dispense = OFF;
		  Return   = OFF;
		  end

	  BILL20: begin
		  Ready    = OFF;
		  Bill     = ON;
		  Dispense = OFF;
		  Return   = OFF;
		  end

	  BILL30: begin
		  Ready    = OFF;
		  Bill     = ON;
		  Dispense = OFF;
		  Return   = OFF;
		  end

  endcase
  end







  always @(State or Ten or Twenty)
  begin
  case (State)
	  RDY:	begin
		  if (Ten)
			  NextState = BILL10;
		  else if (Twenty)
			  NextState = BILL20;
		  else
			  NextState = RDY;
		  end

	  BILL10:	begin
		  if (Ten)
			  NextState = BILL20;
		  else if (Twenty)
			  NextState = BILL30;
		  else
			  NextState = BILL10;
		  end

	  BILL20:	begin
		  if (Ten)
			  NextState = BILL30;
		  else if (Twenty)
			  NextState = DISP;
		  else
			  NextState = BILL20;
		  end

	  BILL30:	begin
		  if (Ten)
			  NextState = DISP;
		  else if (Twenty)
			  NextState = RTN;
		  else
			  NextState = BILL30;
		  end

	  DISP:	begin
			  NextState = RDY;
		  end

	  RTN:	begin
			  NextState = RDY;
		  end

  endcase
  end


endmodule
module TicketVendorBotOneHot (input Clock,
                              input Clear,
                              input Ten,
                              input Twenty, 
                              output reg Ready,
                              output reg Dispense,
                              output reg Return,
                              output reg Bill);


  import definitions::*;






  always @(posedge Clock)
  begin 
   if (Clear)
	  State <= RDY;
   else
	  State <= NextState;
  end





  always @(State)
  begin
  case (State)
	  RDY:	  begin
	    Ready    = ON;
		  Bill     = OFF;
		  Dispense = OFF;
		  Return   = OFF;
		  end

	  DISP:	  begin
		  Ready    = OFF;
		  Bill     = OFF;
		  Dispense = ON;
		  Return   = OFF;
		  end

	  RTN:	  begin
		  Ready    = OFF;
		  Bill     = OFF;
		  Dispense = OFF;
		  Return   = ON;
		  end

	  BILL10: begin
		  Ready    = OFF;
		  Bill     = ON;
		  Dispense = OFF;
		  Return   = OFF;
		  end

	  BILL20: begin
		  Ready    = OFF;
		  Bill     = ON;
		  Dispense = OFF;
		  Return   = OFF;
		  end

	  BILL30: begin
		  Ready    = OFF;
		  Bill     = ON;
		  Dispense = OFF;
		  Return   = OFF;
		  end

  endcase
  end







  always @(State or Ten or Twenty)
  begin
  case (State)
	  RDY:	begin
		  if (Ten)
			  NextState = BILL10;
		  else if (Twenty)
			  NextState = BILL20;
		  else
			  NextState = RDY;
		  end

	  BILL10:	begin
		  if (Ten)
			  NextState = BILL20;
		  else if (Twenty)
			  NextState = BILL30;
		  else
			  NextState = BILL10;
		  end

	  BILL20:	begin
		  if (Ten)
			  NextState = BILL30;
		  else if (Twenty)
			  NextState = DISP;
		  else
			  NextState = BILL20;
		  end

	  BILL30:	begin
		  if (Ten)
			  NextState = DISP;
		  else if (Twenty)
			  NextState = RTN;
		  else
			  NextState = BILL30;
		  end

	  DISP:	begin
			  NextState = RDY;
		  end

	  RTN:	begin
			  NextState = RDY;
		  end

  endcase
  end


endmodule