data/full_repos/permissive/451861474/GCD Implementation using FSM/A5Q1_gcd.v
1: b'%Error: Cannot find file containing module: Implementation\n        ... Looked in:\n             data/full_repos/permissive/451861474/GCD/Implementation\n             data/full_repos/permissive/451861474/GCD/Implementation.v\n             data/full_repos/permissive/451861474/GCD/Implementation.sv\n             Implementation\n             Implementation.v\n             Implementation.sv\n             obj_dir/Implementation\n             obj_dir/Implementation.v\n             obj_dir/Implementation.sv\n%Error: Cannot find file containing module: using\n%Error: Cannot find file containing module: FSM,data/full_repos/permissive/451861474\n%Error: Cannot find file containing module: data/full_repos/permissive/451861474/GCD\n%Error: Cannot find file containing module: FSM/A5Q1_gcd.v\n%Error: Exiting due to 5 error(s)\n'
module gcd (
  input [7:0] inX, inY,
  output [7:0] out
);

  reg [7:0] X, Y, out, swap;
  integer done;

  always @(*) begin
    done = 0;
    X = inX; Y = inY;
    while ( !done )
    begin
      if ( X < Y ) begin
        swap = X;
        X = Y;
        Y = swap;
      end
      else if ( Y != 0 )
        X = X - Y;
      else
        done = 1;
    end
  out = X;
  end

endmodule
module gcd (
  input [7:0] inX, inY,
  output [7:0] out
);


  reg [7:0] X, Y, out, swap;
  integer done;

  always @(*) begin
    done = 0;
    X = inX; Y = inY;
    while ( !done )
    begin
      if ( X < Y ) begin
        swap = X;
        X = Y;
        Y = swap;
      end
      else if ( Y != 0 )
        X = X - Y;
      else
        done = 1;
    end
  out = X;
  end

endmodule