data/full_repos/permissive/431362747/Processor-prev-versions/Vivado Project/ImageDownSample.srcs/sources_1/new/Control_Unit.v
1: b'%Error: Cannot find file containing module: Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747\n        ... Looked in:\n             data/full_repos/permissive/431362747/Processor-prev-versions/Vivado/Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747\n             data/full_repos/permissive/431362747/Processor-prev-versions/Vivado/Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747.v\n             data/full_repos/permissive/431362747/Processor-prev-versions/Vivado/Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747.sv\n             Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747\n             Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747.v\n             Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747.sv\n             obj_dir/Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747\n             obj_dir/Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747.v\n             obj_dir/Project/ImageDownSample.srcs/sources_1/new,data/full_repos/permissive/431362747.sv\n%Error: Cannot find file containing module: data/full_repos/permissive/431362747/Processor-prev-versions/Vivado\n%Error: Cannot find file containing module: Project/ImageDownSample.srcs/sources_1/new/Control_Unit.v\n%Error: Exiting due to 3 error(s)\n'
module Control_Unit(
    input clk,
    input en,
    input z_flag,
    input [7:0] instr_address,
    input [7:0] MBRU,
    output reg [35:0] control_signals,
    output complete
    );
    
    parameter  control_signal_length=35;
    reg [control_signal_length:0] control_store[84:0];
    reg finish = 1'b0;
    

    parameter  FETCH2=8'd1;
    
    parameter  JUMPZ1=8'd73;
    parameter  JMPZN1=8'd74;
    parameter  JMPZY1=8'd75;

    parameter  JMPNZ1=8'd77;
    parameter  JMPNZY1=8'd78;
    parameter  JMPNZN1=8'd79;

    parameter  NOOP=8'd3;
    
    assign complete = finish;
    
    initial
        begin
        control_signals=36'b0;
        end
        
        
    always@(posedge clk)
        begin
            case(instr_address)
            FETCH2: 
                begin
                    control_signals={MBRU,control_store[FETCH2][27:0]};                    
                end
            JUMPZ1: 
                begin 
                    if (z_flag==1'b0)
                        control_signals={JMPZN1,control_store[JUMPZ1][27:0]};
                    else
                        control_signals={JMPZY1,control_store[JUMPZ1][27:0]};
                 end         
            JMPNZ1:
                begin 
                    if (z_flag==1'b1)
                        control_signals={JMPNZY1,control_store[JMPNZ1][27:0]};
                    else
                        control_signals={JMPNZN1,control_store[JMPNZ1][27:0]};
                end 
                
             NOOP: finish = 1'b1;
            
             default: control_signals=control_store[instr_address];
            endcase
         end
            
    initial 
    begin
    
        control_store[0]  = 36'b00000001_0_0000_00010000000000_100_00_0000;
        control_store[1]  = 36'bxxxxxxxx_0_0000_00000000000000_000_10_0000;
        control_store[3]  = 36'b00000000_0_0000_00000000000000_000_00_0000;
        control_store[4]  = 36'b00000000_0_0110_00000000000001_000_00_0000;
        control_store[5]  = 36'b00000110_0_1000_10000000000000_010_00_0000;
        control_store[6]  = 36'b00000111_0_0000_00000000000000_000_00_0000;
        control_store[7]  = 36'b00001000_0_0000_01000000000000_000_00_0000;
        control_store[8]  = 36'b00000000_0_0111_00000000000001_000_00_0010;
        control_store[9]  = 36'b00001010_0_0111_10000000000000_010_00_0011;
        control_store[10] = 36'b00001011_0_0000_00000000000000_000_00_0000;
        control_store[11] = 36'b00001100_0_0000_01000000000000_000_00_0000;
        control_store[12] = 36'b00001101_0_0111_00000000000001_000_00_0010;
        control_store[13] = 36'b00000000_0_1000_00001000000000_000_00_0000;
        control_store[14] = 36'b00001111_0_0111_10000000000000_010_00_0011;
        control_store[15] = 36'b00010000_0_0000_00000000000000_000_00_0000;
        control_store[16] = 36'b00010001_0_0000_01000000000000_000_00_0000;
        control_store[17] = 36'b00010010_0_0111_00000000000001_000_00_0010;
        control_store[18] = 36'b00000000_0_1000_00000100000000_000_00_0000;
        control_store[19] = 36'b00010100_0_0111_10000000000000_010_00_0011;
        control_store[20] = 36'b00010101_0_0000_00000000000000_000_00_0000;
        control_store[21] = 36'b00010110_0_0000_01000000000000_000_00_0000;
        control_store[22] = 36'b00010111_0_0111_00000000000001_000_00_0010;
        control_store[23] = 36'b00000000_0_1000_00000010000000_000_00_0000;
        control_store[24] = 36'b00011001_0_0111_10000000000000_010_00_0011;
        control_store[25] = 36'b00011010_0_0000_00000000000000_000_00_0000;
        control_store[26] = 36'b00011011_0_0000_01000000000000_000_00_0000;
        control_store[27] = 36'b00011100_0_0111_00000000000001_000_00_0010;
        control_store[28] = 36'b00000000_0_1000_00000000000010_000_00_0000;
        control_store[29] = 36'b00011110_0_0111_10000000000000_010_00_0011;
        control_store[30] = 36'b00011111_0_0000_00000000000000_000_00_0000;
        control_store[31] = 36'b00100000_0_0000_01000000000000_000_00_0000;
        control_store[32] = 36'b00100001_0_0111_00000000000001_000_00_0010;
        control_store[33] = 36'b00000000_0_1000_00000000010000_000_00_0000;
        control_store[34] = 36'b00100100_0_0111_00000000000001_000_00_0110;
        control_store[35] = 36'b00100100_0_0111_00000000000001_000_00_0101;
        control_store[36] = 36'b00100101_0_0111_10000000000000_000_00_0011;
        control_store[37] = 36'b00000000_0_1000_01000000000000_001_00_0000;
        control_store[38] = 36'b00000000_0_1000_01000000000000_001_00_0000;
        control_store[39] = 36'b00000000_0_1000_00001000000000_000_00_0000;
        control_store[40] = 36'b00000000_0_1000_00000100000000_000_00_0000;
        control_store[41] = 36'b00000000_0_1000_00000010000000_000_00_0000;
        control_store[42] = 36'b00000000_0_1000_00000001000000_000_00_0000;
        control_store[43] = 36'b00000000_0_1000_00000000100000_000_00_0000;
        control_store[44] = 36'b00000000_0_1000_00000000010000_000_00_0000;
        control_store[45] = 36'b00000000_0_1000_00000000001000_000_00_0000;
        control_store[46] = 36'b00000000_0_1000_00000000000100_000_00_0000;
        control_store[47] = 36'b00000000_0_1000_00000000000010_000_00_0000;
        control_store[48] = 36'b00000000_0_0111_00000000000001_000_00_0100;
        control_store[49] = 36'b00000000_0_0111_00000000000001_000_00_0101;
        control_store[50] = 36'b00000000_0_0111_00000000000001_000_00_0110;
        control_store[51] = 36'b00000000_0_0111_00000000000001_000_00_0111;
        control_store[52] = 36'b00000000_0_0111_00000000000001_000_00_1000;
        control_store[53] = 36'b00000000_0_0111_00000000000001_000_00_1001;
        control_store[54] = 36'b00000000_0_0111_00000000000001_000_00_1010;
        control_store[55] = 36'b00000000_0_0111_00000000000001_000_00_1011;
        control_store[56] = 36'b00000000_0_0111_00000000000001_000_00_1100;
        control_store[57] = 36'b00000000_0_1000_10000000000000_000_00_0000;
        control_store[58] = 36'b00000000_0_1000_01000000000000_001_00_0000;
        control_store[59] = 36'b00000000_0_0001_00000000000001_000_00_0100;
        control_store[60] = 36'b00000000_0_0001_00000000000001_000_00_0101;
        control_store[61] = 36'b00000000_0_0001_00000000000001_000_00_0111;
        control_store[62] = 36'b00000000_0_0001_00000000000001_000_00_1000;
        control_store[63] = 36'b00000000_0_0001_00000000000001_000_00_1001;
        control_store[64] = 36'b00000000_0_0001_00000000000001_000_00_1010;
        control_store[65] = 36'b00000000_0_0010_00000000000001_000_00_0000;
        control_store[66] = 36'b00000000_0_0011_00000000000001_000_00_0000;
        control_store[67] = 36'b00000000_0_0100_00000000000001_000_00_0000;
        control_store[68] = 36'b00000000_0_0000_00000000000000_000_10_0000;
        control_store[69] = 36'b00000000_0_0000_00000000000000_000_01_0000;
        control_store[70] = 36'b00000000_0_0101_00000000000001_000_00_0000;
        control_store[71] = 36'b01001000_0_0111_00000000000001_000_00_0011;
        control_store[72] = 36'b00000000_1_1000_00100000000000_000_00_0000;
        control_store[73] = 36'bxxxxxxxx_1_0000_00000000000000_000_00_0000;
        control_store[74] = 36'b00000000_0_0000_00000000000000_000_00_0000;
        control_store[75] = 36'b01001100_0_0111_00000000000001_000_00_0011;
        control_store[76] = 36'b00000000_1_1000_00100000000000_000_00_0000;
        control_store[77] = 36'bxxxxxxxx_1_0000_00000000000000_000_00_0000;
        control_store[78] = 36'b00000000_0_0000_00000000000000_000_00_0000;
        control_store[79] = 36'b01010000_0_0111_00000000000001_000_00_0011;
        control_store[80] = 36'b00000000_1_1000_00100000000000_000_00_0000;
        control_store[81] = 36'b01010010_0_0111_00000000000001_000_00_0011;
        control_store[82] = 36'b00000000_0_1000_00000100000000_000_00_0000;
        control_store[83] = 36'b01010100_0_0111_00000000000001_000_00_0011;
        control_store[84] = 36'b00000000_0_1000_00000010000000_000_00_0000;
    
    end
    
    
    
    
    
    
endmodule
module Control_Unit(
    input clk,
    input en,
    input z_flag,
    input [7:0] instr_address,
    input [7:0] MBRU,
    output reg [35:0] control_signals,
    output complete
    );

    
    parameter  control_signal_length=35;
    reg [control_signal_length:0] control_store[84:0];
    reg finish = 1'b0;
    

    parameter  FETCH2=8'd1;
    
    parameter  JUMPZ1=8'd73;
    parameter  JMPZN1=8'd74;
    parameter  JMPZY1=8'd75;

    parameter  JMPNZ1=8'd77;
    parameter  JMPNZY1=8'd78;
    parameter  JMPNZN1=8'd79;

    parameter  NOOP=8'd3;
    
    assign complete = finish;
    
    initial
        begin
        control_signals=36'b0;
        end
        
        
    always@(posedge clk)
        begin
            case(instr_address)
            FETCH2: 
                begin
                    control_signals={MBRU,control_store[FETCH2][27:0]};                    
                end
            JUMPZ1: 
                begin 
                    if (z_flag==1'b0)
                        control_signals={JMPZN1,control_store[JUMPZ1][27:0]};
                    else
                        control_signals={JMPZY1,control_store[JUMPZ1][27:0]};
                 end         
            JMPNZ1:
                begin 
                    if (z_flag==1'b1)
                        control_signals={JMPNZY1,control_store[JMPNZ1][27:0]};
                    else
                        control_signals={JMPNZN1,control_store[JMPNZ1][27:0]};
                end 
                
             NOOP: finish = 1'b1;
            
             default: control_signals=control_store[instr_address];
            endcase
         end
            
    initial 
    begin
    
        control_store[0]  = 36'b00000001_0_0000_00010000000000_100_00_0000;
        control_store[1]  = 36'bxxxxxxxx_0_0000_00000000000000_000_10_0000;
        control_store[3]  = 36'b00000000_0_0000_00000000000000_000_00_0000;
        control_store[4]  = 36'b00000000_0_0110_00000000000001_000_00_0000;
        control_store[5]  = 36'b00000110_0_1000_10000000000000_010_00_0000;
        control_store[6]  = 36'b00000111_0_0000_00000000000000_000_00_0000;
        control_store[7]  = 36'b00001000_0_0000_01000000000000_000_00_0000;
        control_store[8]  = 36'b00000000_0_0111_00000000000001_000_00_0010;
        control_store[9]  = 36'b00001010_0_0111_10000000000000_010_00_0011;
        control_store[10] = 36'b00001011_0_0000_00000000000000_000_00_0000;
        control_store[11] = 36'b00001100_0_0000_01000000000000_000_00_0000;
        control_store[12] = 36'b00001101_0_0111_00000000000001_000_00_0010;
        control_store[13] = 36'b00000000_0_1000_00001000000000_000_00_0000;
        control_store[14] = 36'b00001111_0_0111_10000000000000_010_00_0011;
        control_store[15] = 36'b00010000_0_0000_00000000000000_000_00_0000;
        control_store[16] = 36'b00010001_0_0000_01000000000000_000_00_0000;
        control_store[17] = 36'b00010010_0_0111_00000000000001_000_00_0010;
        control_store[18] = 36'b00000000_0_1000_00000100000000_000_00_0000;
        control_store[19] = 36'b00010100_0_0111_10000000000000_010_00_0011;
        control_store[20] = 36'b00010101_0_0000_00000000000000_000_00_0000;
        control_store[21] = 36'b00010110_0_0000_01000000000000_000_00_0000;
        control_store[22] = 36'b00010111_0_0111_00000000000001_000_00_0010;
        control_store[23] = 36'b00000000_0_1000_00000010000000_000_00_0000;
        control_store[24] = 36'b00011001_0_0111_10000000000000_010_00_0011;
        control_store[25] = 36'b00011010_0_0000_00000000000000_000_00_0000;
        control_store[26] = 36'b00011011_0_0000_01000000000000_000_00_0000;
        control_store[27] = 36'b00011100_0_0111_00000000000001_000_00_0010;
        control_store[28] = 36'b00000000_0_1000_00000000000010_000_00_0000;
        control_store[29] = 36'b00011110_0_0111_10000000000000_010_00_0011;
        control_store[30] = 36'b00011111_0_0000_00000000000000_000_00_0000;
        control_store[31] = 36'b00100000_0_0000_01000000000000_000_00_0000;
        control_store[32] = 36'b00100001_0_0111_00000000000001_000_00_0010;
        control_store[33] = 36'b00000000_0_1000_00000000010000_000_00_0000;
        control_store[34] = 36'b00100100_0_0111_00000000000001_000_00_0110;
        control_store[35] = 36'b00100100_0_0111_00000000000001_000_00_0101;
        control_store[36] = 36'b00100101_0_0111_10000000000000_000_00_0011;
        control_store[37] = 36'b00000000_0_1000_01000000000000_001_00_0000;
        control_store[38] = 36'b00000000_0_1000_01000000000000_001_00_0000;
        control_store[39] = 36'b00000000_0_1000_00001000000000_000_00_0000;
        control_store[40] = 36'b00000000_0_1000_00000100000000_000_00_0000;
        control_store[41] = 36'b00000000_0_1000_00000010000000_000_00_0000;
        control_store[42] = 36'b00000000_0_1000_00000001000000_000_00_0000;
        control_store[43] = 36'b00000000_0_1000_00000000100000_000_00_0000;
        control_store[44] = 36'b00000000_0_1000_00000000010000_000_00_0000;
        control_store[45] = 36'b00000000_0_1000_00000000001000_000_00_0000;
        control_store[46] = 36'b00000000_0_1000_00000000000100_000_00_0000;
        control_store[47] = 36'b00000000_0_1000_00000000000010_000_00_0000;
        control_store[48] = 36'b00000000_0_0111_00000000000001_000_00_0100;
        control_store[49] = 36'b00000000_0_0111_00000000000001_000_00_0101;
        control_store[50] = 36'b00000000_0_0111_00000000000001_000_00_0110;
        control_store[51] = 36'b00000000_0_0111_00000000000001_000_00_0111;
        control_store[52] = 36'b00000000_0_0111_00000000000001_000_00_1000;
        control_store[53] = 36'b00000000_0_0111_00000000000001_000_00_1001;
        control_store[54] = 36'b00000000_0_0111_00000000000001_000_00_1010;
        control_store[55] = 36'b00000000_0_0111_00000000000001_000_00_1011;
        control_store[56] = 36'b00000000_0_0111_00000000000001_000_00_1100;
        control_store[57] = 36'b00000000_0_1000_10000000000000_000_00_0000;
        control_store[58] = 36'b00000000_0_1000_01000000000000_001_00_0000;
        control_store[59] = 36'b00000000_0_0001_00000000000001_000_00_0100;
        control_store[60] = 36'b00000000_0_0001_00000000000001_000_00_0101;
        control_store[61] = 36'b00000000_0_0001_00000000000001_000_00_0111;
        control_store[62] = 36'b00000000_0_0001_00000000000001_000_00_1000;
        control_store[63] = 36'b00000000_0_0001_00000000000001_000_00_1001;
        control_store[64] = 36'b00000000_0_0001_00000000000001_000_00_1010;
        control_store[65] = 36'b00000000_0_0010_00000000000001_000_00_0000;
        control_store[66] = 36'b00000000_0_0011_00000000000001_000_00_0000;
        control_store[67] = 36'b00000000_0_0100_00000000000001_000_00_0000;
        control_store[68] = 36'b00000000_0_0000_00000000000000_000_10_0000;
        control_store[69] = 36'b00000000_0_0000_00000000000000_000_01_0000;
        control_store[70] = 36'b00000000_0_0101_00000000000001_000_00_0000;
        control_store[71] = 36'b01001000_0_0111_00000000000001_000_00_0011;
        control_store[72] = 36'b00000000_1_1000_00100000000000_000_00_0000;
        control_store[73] = 36'bxxxxxxxx_1_0000_00000000000000_000_00_0000;
        control_store[74] = 36'b00000000_0_0000_00000000000000_000_00_0000;
        control_store[75] = 36'b01001100_0_0111_00000000000001_000_00_0011;
        control_store[76] = 36'b00000000_1_1000_00100000000000_000_00_0000;
        control_store[77] = 36'bxxxxxxxx_1_0000_00000000000000_000_00_0000;
        control_store[78] = 36'b00000000_0_0000_00000000000000_000_00_0000;
        control_store[79] = 36'b01010000_0_0111_00000000000001_000_00_0011;
        control_store[80] = 36'b00000000_1_1000_00100000000000_000_00_0000;
        control_store[81] = 36'b01010010_0_0111_00000000000001_000_00_0011;
        control_store[82] = 36'b00000000_0_1000_00000100000000_000_00_0000;
        control_store[83] = 36'b01010100_0_0111_00000000000001_000_00_0011;
        control_store[84] = 36'b00000000_0_1000_00000010000000_000_00_0000;
    
    end
    
    
    
    
    
    
endmodule