data/full_repos/permissive/496231454/VGA_Controller.srcs/sources_1/imports/test folder/7_segment_controller.v
1: b'%Error: Cannot find file containing module: folder,data/full_repos/permissive/496231454\n        ... Looked in:\n             data/full_repos/permissive/496231454/VGA_Controller.srcs/sources_1/imports/test/folder,data/full_repos/permissive/496231454\n             data/full_repos/permissive/496231454/VGA_Controller.srcs/sources_1/imports/test/folder,data/full_repos/permissive/496231454.v\n             data/full_repos/permissive/496231454/VGA_Controller.srcs/sources_1/imports/test/folder,data/full_repos/permissive/496231454.sv\n             folder,data/full_repos/permissive/496231454\n             folder,data/full_repos/permissive/496231454.v\n             folder,data/full_repos/permissive/496231454.sv\n             obj_dir/folder,data/full_repos/permissive/496231454\n             obj_dir/folder,data/full_repos/permissive/496231454.v\n             obj_dir/folder,data/full_repos/permissive/496231454.sv\n%Error: Cannot find file containing module: data/full_repos/permissive/496231454/VGA_Controller.srcs/sources_1/imports/test\n%Error: Cannot find file containing module: folder/7_segment_controller.v\n%Error: Exiting due to 3 error(s)\n'
module Seven_segment_LED_Display_Controller(

    input clk,
    input reset,
    input [7:0] digits,
    output reg [3:0] Anode_Activate,
    output reg [6:0] LED_out
    );
    reg [26:0] one_second_counter;
    wire one_second_enable;
    reg [15:0] displayed_number;
    reg [7:0] LED_BCD;
    reg [19:0] refresh_counter;

    wire [1:0] LED_activating_counter;
    
    always @(posedge clk or posedge reset)
    begin
        if(reset==1)
            one_second_counter <= 0;
        else begin
            if(one_second_counter >= 99999999)
                one_second_counter <= 0;
            else
                one_second_counter <= one_second_counter + 1;
        end
    end

    assign one_second_enable = (one_second_counter==99999999) ?1:0;
    always @(posedge clk or posedge reset)
    begin
        if(reset==1)
            displayed_number <=0;
        else if (one_second_counter==1)
            displayed_number <= displayed_number+1;
    end
    always @(posedge clk or posedge reset)
    begin
        if(reset==1)
            refresh_counter <= 0;
        else
            refresh_counter <= refresh_counter + 1;
    end
    assign LED_activating_counter = refresh_counter[19:18];


    always @(*)
    begin
        case(LED_activating_counter)
        2'b00: begin
            Anode_Activate = 4'b0111;
            if (digits[7:0] == 8'h00) 
            Anode_Activate = 4'b1111; 
            else 
            LED_BCD = 8'b10000000;
        end
        2'b01: begin
            Anode_Activate = 4'b1011;
            if (digits[7:0] == 8'h00)
            Anode_Activate = 4'b1111;
            else
            LED_BCD = digits[7:4];
        end
        2'b10: begin
            Anode_Activate = 4'b1101;
            if (digits[7:0] == 8'h00)
            Anode_Activate = 4'b1111;
            else
            LED_BCD = digits[3:0];
        end
        2'b11: begin
            Anode_Activate = 4'b1110;
            if (digits[7:0] == 8'h00)
            Anode_Activate = 4'b1111;
            else
            LED_BCD = 8'b10000000;
        end
        endcase
    end
    always @(*)
    begin
        case(LED_BCD)
        8'b00000000: LED_out = 7'b0000001;
        8'b00000001: LED_out = 7'b1001111;
        8'b00000010: LED_out = 7'b0010010;
        8'b00000011: LED_out = 7'b0000110;
        8'b00000100: LED_out = 7'b1001100;
        8'b00000101: LED_out = 7'b0100100;
        8'b00000110: LED_out = 7'b0100000;
        8'b00000111: LED_out = 7'b0001111;
        8'b00001000: LED_out = 7'b0000000;
        8'b00001001: LED_out = 7'b0000100;
        
        8'b00001010: LED_out = 7'b0001000;
        8'b00001011: LED_out = 7'b1100000;
        8'b00001100: LED_out = 7'b0110001;
        8'b00001101: LED_out = 7'b1000010;
        8'b00001110: LED_out = 7'b0110000;
        8'b00001111: LED_out = 7'b0111000;
        default: LED_out = 7'b1111110;
   endcase                                              
   end
 endmodule
module Seven_segment_LED_Display_Controller(

    input clk,
    input reset,
    input [7:0] digits,
    output reg [3:0] Anode_Activate,
    output reg [6:0] LED_out
    );

    reg [26:0] one_second_counter;
    wire one_second_enable;
    reg [15:0] displayed_number;
    reg [7:0] LED_BCD;
    reg [19:0] refresh_counter;

    wire [1:0] LED_activating_counter;
    
    always @(posedge clk or posedge reset)
    begin
        if(reset==1)
            one_second_counter <= 0;
        else begin
            if(one_second_counter >= 99999999)
                one_second_counter <= 0;
            else
                one_second_counter <= one_second_counter + 1;
        end
    end

    assign one_second_enable = (one_second_counter==99999999) ?1:0;
    always @(posedge clk or posedge reset)
    begin
        if(reset==1)
            displayed_number <=0;
        else if (one_second_counter==1)
            displayed_number <= displayed_number+1;
    end
    always @(posedge clk or posedge reset)
    begin
        if(reset==1)
            refresh_counter <= 0;
        else
            refresh_counter <= refresh_counter + 1;
    end
    assign LED_activating_counter = refresh_counter[19:18];


    always @(*)
    begin
        case(LED_activating_counter)
        2'b00: begin
            Anode_Activate = 4'b0111;
            if (digits[7:0] == 8'h00) 
            Anode_Activate = 4'b1111; 
            else 
            LED_BCD = 8'b10000000;
        end
        2'b01: begin
            Anode_Activate = 4'b1011;
            if (digits[7:0] == 8'h00)
            Anode_Activate = 4'b1111;
            else
            LED_BCD = digits[7:4];
        end
        2'b10: begin
            Anode_Activate = 4'b1101;
            if (digits[7:0] == 8'h00)
            Anode_Activate = 4'b1111;
            else
            LED_BCD = digits[3:0];
        end
        2'b11: begin
            Anode_Activate = 4'b1110;
            if (digits[7:0] == 8'h00)
            Anode_Activate = 4'b1111;
            else
            LED_BCD = 8'b10000000;
        end
        endcase
    end
    always @(*)
    begin
        case(LED_BCD)
        8'b00000000: LED_out = 7'b0000001;
        8'b00000001: LED_out = 7'b1001111;
        8'b00000010: LED_out = 7'b0010010;
        8'b00000011: LED_out = 7'b0000110;
        8'b00000100: LED_out = 7'b1001100;
        8'b00000101: LED_out = 7'b0100100;
        8'b00000110: LED_out = 7'b0100000;
        8'b00000111: LED_out = 7'b0001111;
        8'b00001000: LED_out = 7'b0000000;
        8'b00001001: LED_out = 7'b0000100;
        
        8'b00001010: LED_out = 7'b0001000;
        8'b00001011: LED_out = 7'b1100000;
        8'b00001100: LED_out = 7'b0110001;
        8'b00001101: LED_out = 7'b1000010;
        8'b00001110: LED_out = 7'b0110000;
        8'b00001111: LED_out = 7'b0111000;
        default: LED_out = 7'b1111110;
   endcase                                              
   end
 endmodule