data/full_repos/permissive/461569093/CodesForFSM/A2_RawatA.srcs/sources_1/imports/Provided code/sevenseg.v
1: b'%Error: Cannot find file containing module: code,data/full_repos/permissive/461569093\n        ... Looked in:\n             data/full_repos/permissive/461569093/CodesForFSM/A2_RawatA.srcs/sources_1/imports/Provided/code,data/full_repos/permissive/461569093\n             data/full_repos/permissive/461569093/CodesForFSM/A2_RawatA.srcs/sources_1/imports/Provided/code,data/full_repos/permissive/461569093.v\n             data/full_repos/permissive/461569093/CodesForFSM/A2_RawatA.srcs/sources_1/imports/Provided/code,data/full_repos/permissive/461569093.sv\n             code,data/full_repos/permissive/461569093\n             code,data/full_repos/permissive/461569093.v\n             code,data/full_repos/permissive/461569093.sv\n             obj_dir/code,data/full_repos/permissive/461569093\n             obj_dir/code,data/full_repos/permissive/461569093.v\n             obj_dir/code,data/full_repos/permissive/461569093.sv\n%Error: Cannot find file containing module: data/full_repos/permissive/461569093/CodesForFSM/A2_RawatA.srcs/sources_1/imports/Provided\n%Error: Cannot find file containing module: code/sevenseg.v\n%Error: Exiting due to 3 error(s)\n'
module seven_segment_controller(
    input clk,
    input reset,
    input [7:0] temp,
    output reg [3:0] anode_select,
    output reg [6:0] LED_out
    );

 
    reg [3:0] LED_BCD;
    reg [19:0] refresh_counter;


    wire [1:0] LED_activating_counter; 



    
    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_select = 4'b0111; 

            LED_BCD = temp/100;

              end
        2'b01: begin
            anode_select = 4'b1011; 

            LED_BCD = (temp%100)/10;

              end
        2'b10: begin
            anode_select = 4'b1101; 

            LED_BCD = (temp%100)%10;

                end
        2'b11: begin
            anode_select = 4'b1110; 

            LED_BCD = 4'hF;

               end
        endcase
    end

    always @(*)
    begin
        case(LED_BCD)
        4'b0000: LED_out = 7'b0000001;
        4'b0001: LED_out = 7'b1001111;
        4'b0010: LED_out = 7'b0010010;
        4'b0011: LED_out = 7'b0000110;
        4'b0100: LED_out = 7'b1001100;
        4'b0101: LED_out = 7'b0100100;
        4'b0110: LED_out = 7'b0100000;
        4'b0111: LED_out = 7'b0001111;
        4'b1000: LED_out = 7'b0000000;
        4'b1001: LED_out = 7'b0000100;
        4'b1111: LED_out = 7'b0111000;
        default: LED_out = 7'b0000001;
        endcase
    end
 endmodule
module seven_segment_controller(
    input clk,
    input reset,
    input [7:0] temp,
    output reg [3:0] anode_select,
    output reg [6:0] LED_out
    );


 
    reg [3:0] LED_BCD;
    reg [19:0] refresh_counter;


    wire [1:0] LED_activating_counter; 



    
    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_select = 4'b0111; 

            LED_BCD = temp/100;

              end
        2'b01: begin
            anode_select = 4'b1011; 

            LED_BCD = (temp%100)/10;

              end
        2'b10: begin
            anode_select = 4'b1101; 

            LED_BCD = (temp%100)%10;

                end
        2'b11: begin
            anode_select = 4'b1110; 

            LED_BCD = 4'hF;

               end
        endcase
    end

    always @(*)
    begin
        case(LED_BCD)
        4'b0000: LED_out = 7'b0000001;
        4'b0001: LED_out = 7'b1001111;
        4'b0010: LED_out = 7'b0010010;
        4'b0011: LED_out = 7'b0000110;
        4'b0100: LED_out = 7'b1001100;
        4'b0101: LED_out = 7'b0100100;
        4'b0110: LED_out = 7'b0100000;
        4'b0111: LED_out = 7'b0001111;
        4'b1000: LED_out = 7'b0000000;
        4'b1001: LED_out = 7'b0000100;
        4'b1111: LED_out = 7'b0111000;
        default: LED_out = 7'b0000001;
        endcase
    end
 endmodule