data/full_repos/permissive/202237519/verilog/digitalsystem project/rhythm.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b'%Error: Cannot find file containing module: project,data/full_repos/permissive/202237519\n        ... Looked in:\n             data/full_repos/permissive/202237519/verilog/digitalsystem/project,data/full_repos/permissive/202237519\n             data/full_repos/permissive/202237519/verilog/digitalsystem/project,data/full_repos/permissive/202237519.v\n             data/full_repos/permissive/202237519/verilog/digitalsystem/project,data/full_repos/permissive/202237519.sv\n             project,data/full_repos/permissive/202237519\n             project,data/full_repos/permissive/202237519.v\n             project,data/full_repos/permissive/202237519.sv\n             obj_dir/project,data/full_repos/permissive/202237519\n             obj_dir/project,data/full_repos/permissive/202237519.v\n             obj_dir/project,data/full_repos/permissive/202237519.sv\n%Error: Cannot find file containing module: data/full_repos/permissive/202237519/verilog/digitalsystem\n%Error: Cannot find file containing module: project/rhythm.v\n%Error: Exiting due to 3 error(s)\n'
module rhythm(menu1, menu2,
             back, CLK, piezo, led, key,
             RESETN,LCD_E,LCD_RS,LCD_RW,LCD_DATA,
             R,G,B);

    input menu1, menu2, back;

    input [7:0]key;
    input CLK, RESETN;
    reg [2:0]state_game;
    reg [2:0]state_lcd;
    reg en;
    wire [5:0] rgb;
    wire em1,em2,em3;

    output piezo;
    output [7:0] led;
    wire [3:0]notes, notes2, notes3;
    reg [3:0]music_input;



    output LCD_E,LCD_RS,LCD_RW;
    output [7:0]LCD_DATA;




    output [3:0] R,G,B;
    integer CNT;
    reg [1:0] R_IN,G_IN,B_IN;

    LCD lcd_menu (RESETN,C_OUT,state_lcd,LCD_E,LCD_RS,LCD_RW,LCD_DATA);
    doremi doremi (RESETN, CLK, music_input, piezo);
    HB_FULL_LED LED (RESETN, CLK, R_IN, G_IN, B_IN, R,G,B);
    counter_100bit count1(RESETN, CLK, C_OUT);
    counter_100bit  count2(RESETN, C_OUT, C_OUT2);

    led8 led8(CLK, music_input, led);
    music1 music1(C_OUT2, notes, key[0], em1);
    music2 music2(C_OUT2, notes2, key[1], em2);
    music3 music3(C_OUT2, notes3, key[2], em3);
    score score(C_OUT2,RESETN,key,led,rgb,en);

    
    always @(posedge CLK) begin
            case(state_game) 
                3'b000 : state_lcd = 3'b000;
                3'b001 : state_lcd = 3'b001;
                3'b010 : state_lcd = 3'b010;
                3'b011 : state_lcd = 3'b011;
                3'b100 : state_lcd = 3'b100;
                3'b101 : state_lcd = 3'b101;
                default : state_lcd = 3'b000;
            endcase
        end

    always @(posedge CLK) begin
        case(state_game) 
            3'b000 : {R_IN,G_IN,B_IN} <= 6'b100000;
            3'b001 : {R_IN,G_IN,B_IN} <= 6'b001000;
            3'b010 : {R_IN,G_IN,B_IN} <= 6'b000010;
            3'b011 : {R_IN,G_IN,B_IN} <= rgb;
            3'b100 : {R_IN,G_IN,B_IN} <= rgb;
            3'b101 : {R_IN,G_IN,B_IN} <= rgb;
            default : {R_IN,G_IN,B_IN} <= 6'b100000;
        endcase
    end


    always @(posedge CLK or posedge RESETN) begin
        if (RESETN)
            begin
               state_game = 3'b000;
            end
        else if(state_game == 3'b000)
            begin
                if(menu1) begin
                    state_game = 3'b001;
                    end
                else if(menu2) begin
                    state_game = 3'b010;
                    end
            end
        else if(state_game == 3'b001)
            begin
                if(back) begin
                    state_game = 3'b000;
                    end
                else if(key) begin
                    if(key == 8'b00000001) begin
                        en = 1'b1;
                        state_game = 3'b011;
                        end
                    else if(key == 8'b00000010) begin
                        en = 1'b1;
                        state_game = 3'b100;
                        end
                    else if(key == 8'b00000100) begin
                        en = 1'b1;
                        state_game = 3'b101;
                        end
                    else begin
                        music_input = 4'd14;
                        end
                end
            end
        else if(state_game == 3'b010)
            begin
                if(back) begin
                    state_game = 3'b000;
                    end
            end
        else if(state_game == 3'b011)
            begin
                music_input = notes;
                if(back) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
                else if(em1 == 1'b1) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
            end
        else if(state_game == 3'b100)
            begin
                music_input = notes2; 
                if(back) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
                else if(em2 == 1'b1) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
            end
        else if(state_game == 3'b101)
            begin
                music_input = notes3;
                if(back) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
                else if(em3 == 1'b1) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
            end

    end

endmodule
module rhythm(menu1, menu2,
             back, CLK, piezo, led, key,
             RESETN,LCD_E,LCD_RS,LCD_RW,LCD_DATA,
             R,G,B);


    input menu1, menu2, back;

    input [7:0]key;
    input CLK, RESETN;
    reg [2:0]state_game;
    reg [2:0]state_lcd;
    reg en;
    wire [5:0] rgb;
    wire em1,em2,em3;

    output piezo;
    output [7:0] led;
    wire [3:0]notes, notes2, notes3;
    reg [3:0]music_input;



    output LCD_E,LCD_RS,LCD_RW;
    output [7:0]LCD_DATA;




    output [3:0] R,G,B;
    integer CNT;
    reg [1:0] R_IN,G_IN,B_IN;

    LCD lcd_menu (RESETN,C_OUT,state_lcd,LCD_E,LCD_RS,LCD_RW,LCD_DATA);
    doremi doremi (RESETN, CLK, music_input, piezo);
    HB_FULL_LED LED (RESETN, CLK, R_IN, G_IN, B_IN, R,G,B);
    counter_100bit count1(RESETN, CLK, C_OUT);
    counter_100bit  count2(RESETN, C_OUT, C_OUT2);

    led8 led8(CLK, music_input, led);
    music1 music1(C_OUT2, notes, key[0], em1);
    music2 music2(C_OUT2, notes2, key[1], em2);
    music3 music3(C_OUT2, notes3, key[2], em3);
    score score(C_OUT2,RESETN,key,led,rgb,en);

    
    always @(posedge CLK) begin
            case(state_game) 
                3'b000 : state_lcd = 3'b000;
                3'b001 : state_lcd = 3'b001;
                3'b010 : state_lcd = 3'b010;
                3'b011 : state_lcd = 3'b011;
                3'b100 : state_lcd = 3'b100;
                3'b101 : state_lcd = 3'b101;
                default : state_lcd = 3'b000;
            endcase
        end

    always @(posedge CLK) begin
        case(state_game) 
            3'b000 : {R_IN,G_IN,B_IN} <= 6'b100000;
            3'b001 : {R_IN,G_IN,B_IN} <= 6'b001000;
            3'b010 : {R_IN,G_IN,B_IN} <= 6'b000010;
            3'b011 : {R_IN,G_IN,B_IN} <= rgb;
            3'b100 : {R_IN,G_IN,B_IN} <= rgb;
            3'b101 : {R_IN,G_IN,B_IN} <= rgb;
            default : {R_IN,G_IN,B_IN} <= 6'b100000;
        endcase
    end


    always @(posedge CLK or posedge RESETN) begin
        if (RESETN)
            begin
               state_game = 3'b000;
            end
        else if(state_game == 3'b000)
            begin
                if(menu1) begin
                    state_game = 3'b001;
                    end
                else if(menu2) begin
                    state_game = 3'b010;
                    end
            end
        else if(state_game == 3'b001)
            begin
                if(back) begin
                    state_game = 3'b000;
                    end
                else if(key) begin
                    if(key == 8'b00000001) begin
                        en = 1'b1;
                        state_game = 3'b011;
                        end
                    else if(key == 8'b00000010) begin
                        en = 1'b1;
                        state_game = 3'b100;
                        end
                    else if(key == 8'b00000100) begin
                        en = 1'b1;
                        state_game = 3'b101;
                        end
                    else begin
                        music_input = 4'd14;
                        end
                end
            end
        else if(state_game == 3'b010)
            begin
                if(back) begin
                    state_game = 3'b000;
                    end
            end
        else if(state_game == 3'b011)
            begin
                music_input = notes;
                if(back) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
                else if(em1 == 1'b1) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
            end
        else if(state_game == 3'b100)
            begin
                music_input = notes2; 
                if(back) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
                else if(em2 == 1'b1) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
            end
        else if(state_game == 3'b101)
            begin
                music_input = notes3;
                if(back) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
                else if(em3 == 1'b1) begin
                    en = 1'b0;
                    state_game = 3'b001;
                    end
            end

    end

endmodule