data/full_repos/permissive/123318949/07 - State machine/tb_machine.v
1: b'%Error: Invalid Option: -\n'
module load (
  output send,
  output [7:0] data
  );

  integer file;
  reg flag = 1'b0;
  reg [2:0] counter = 3'b0;
  reg [7:0] transfer = 8'b0;
  reg [7:0] amount [6:0];

  initial begin
    file = $fopen("C:/Users/Piotr/Desktop/input.txt", "rb");
    for (counter = 0; counter < 7; counter = counter + 1) begin
      amount[counter] = $fgetc(file);
    end
    $fclose(file);
    counter = 0;
    while (1) begin
      transfer = amount[counter];
      counter = counter + 1;
      #5; flag <= 1;
      #5; flag <= 0;
      if (counter == 7)
        counter = 0;
    end
  end

  assign data = transfer;
  assign send = flag;

endmodule
module load (
  output send,
  output [7:0] data
  );


  integer file;
  reg flag = 1'b0;
  reg [2:0] counter = 3'b0;
  reg [7:0] transfer = 8'b0;
  reg [7:0] amount [6:0];

  initial begin
    file = $fopen("C:/Users/Piotr/Desktop/input.txt", "rb");
    for (counter = 0; counter < 7; counter = counter + 1) begin
      amount[counter] = $fgetc(file);
    end
    $fclose(file);
    counter = 0;
    while (1) begin
      transfer = amount[counter];
      counter = counter + 1;
      #5; flag <= 1;
      #5; flag <= 0;
      if (counter == 7)
        counter = 0;
    end
  end

  assign data = transfer;
  assign send = flag;

endmodule