data/full_repos/permissive/451861474/Graycode counter/A4Q1_graycode.v
1: b'%Error: Cannot find file containing module: counter,data/full_repos/permissive/451861474\n        ... Looked in:\n             data/full_repos/permissive/451861474/Graycode/counter,data/full_repos/permissive/451861474\n             data/full_repos/permissive/451861474/Graycode/counter,data/full_repos/permissive/451861474.v\n             data/full_repos/permissive/451861474/Graycode/counter,data/full_repos/permissive/451861474.sv\n             counter,data/full_repos/permissive/451861474\n             counter,data/full_repos/permissive/451861474.v\n             counter,data/full_repos/permissive/451861474.sv\n             obj_dir/counter,data/full_repos/permissive/451861474\n             obj_dir/counter,data/full_repos/permissive/451861474.v\n             obj_dir/counter,data/full_repos/permissive/451861474.sv\n%Error: Cannot find file containing module: data/full_repos/permissive/451861474/Graycode\n%Error: Cannot find file containing module: counter/A4Q1_graycode.v\n%Error: Exiting due to 3 error(s)\n'
module graycode(
  input x,
  output reg z
);

parameter S0=3'b000,S1=3'b001,S2=3'b011,S3=3'b010, S4=3'b110,S5=3'b111,S6=3'b101,S7=3'b100;
reg [2:0] NS;
reg [2:0] PS=3'b000;

always @ (posedge x)
  begin


    if(PS==S0) begin $display(0, ,0, ,$time); end
    else if(PS==S1) begin $display(1, ,0, ,$time); end
    else if(PS==S2) begin $display(2, ,0, ,$time); end
    else if(PS==S3) begin $display(3, ,0, ,$time); end
    else if(PS==S4) begin $display(4, ,0, ,$time); end
    else if(PS==S5) begin $display(5, ,0, ,$time); end
    else if(PS==S6) begin $display(6, ,0, ,$time); end
    else if(PS==S7 && x) begin $display(7, ,1, ,$time); end
    else begin $display(7, ,0, ,$time); end
    
    

    case(PS)
        S0 :begin NS = x ? S1 : S0 ;
        end
        S1 :begin NS = x ? S2 : S1 ;
        end
        S2 :begin NS = x ? S3 : S2 ;
        end
        S3 :begin NS = x ? S4 : S3 ;
        end
        S4 :begin NS = x ? S5 : S4 ;
        end
        S5 :begin NS = x ? S6 : S5 ;
        end
        S6 :begin NS = x ? S7 : S6 ;
        end
        S7 :begin NS = x ? S0 : S7 ;
        end
    endcase
    

    PS=NS;
    z=(PS==S7 && x) ? 1'b1:1'b0;
    
  end

endmodule
module graycode(
  input x,
  output reg z
);


parameter S0=3'b000,S1=3'b001,S2=3'b011,S3=3'b010, S4=3'b110,S5=3'b111,S6=3'b101,S7=3'b100;
reg [2:0] NS;
reg [2:0] PS=3'b000;

always @ (posedge x)
  begin


    if(PS==S0) begin $display(0, ,0, ,$time); end
    else if(PS==S1) begin $display(1, ,0, ,$time); end
    else if(PS==S2) begin $display(2, ,0, ,$time); end
    else if(PS==S3) begin $display(3, ,0, ,$time); end
    else if(PS==S4) begin $display(4, ,0, ,$time); end
    else if(PS==S5) begin $display(5, ,0, ,$time); end
    else if(PS==S6) begin $display(6, ,0, ,$time); end
    else if(PS==S7 && x) begin $display(7, ,1, ,$time); end
    else begin $display(7, ,0, ,$time); end
    
    

    case(PS)
        S0 :begin NS = x ? S1 : S0 ;
        end
        S1 :begin NS = x ? S2 : S1 ;
        end
        S2 :begin NS = x ? S3 : S2 ;
        end
        S3 :begin NS = x ? S4 : S3 ;
        end
        S4 :begin NS = x ? S5 : S4 ;
        end
        S5 :begin NS = x ? S6 : S5 ;
        end
        S6 :begin NS = x ? S7 : S6 ;
        end
        S7 :begin NS = x ? S0 : S7 ;
        end
    endcase
    

    PS=NS;
    z=(PS==S7 && x) ? 1'b1:1'b0;
    
  end

endmodule