data/full_repos/permissive/463204869/units/tcu/source/rtl/verilog/tcu_functions.v
1: b"%Error: data/full_repos/permissive/463204869/units/tcu/source/rtl/verilog/tcu_functions.v:97: Can't find definition of variable: 'TCU_OPCODE_SIZE'\n    input [TCU_OPCODE_SIZE-1:0] cmd;\n           ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/463204869/units/tcu/source/rtl/verilog/tcu_functions.v:99: Can't find definition of variable: 'TCU_OPCODE_WRITE'\n                                                                                            : ... Suggested alternative: 'TCU_OPCODE_SIZE'\n        if ((cmd == TCU_OPCODE_WRITE) ||\n                    ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/463204869/units/tcu/source/rtl/verilog/tcu_functions.v:100: Can't find definition of variable: 'TCU_OPCODE_SEND'\n                                                                                             : ... Suggested alternative: 'TCU_OPCODE_SIZE'\n            (cmd == TCU_OPCODE_SEND) ||\n                    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/463204869/units/tcu/source/rtl/verilog/tcu_functions.v:101: Can't find definition of variable: 'TCU_OPCODE_REPLY'\n                                                                                             : ... Suggested alternative: 'TCU_OPCODE_SEND'\n            (cmd == TCU_OPCODE_REPLY)) begin\n                    ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/463204869/units/tcu/source/rtl/verilog/tcu_functions.v:104: Can't find definition of variable: 'TCU_OPCODE_READ'\n                                                                                             : ... Suggested alternative: 'TCU_OPCODE_SEND'\n        else if (cmd == TCU_OPCODE_READ) begin\n                        ^~~~~~~~~~~~~~~\n%Error: Exiting due to 5 error(s)\n"
function automatic [3:0] count_ones8;
    input [7:0] data;
    begin
        case(data)
            8'b0000_0001: count_ones8 = 4'd1;
            8'b0000_0010: count_ones8 = 4'd1;
            8'b0000_0100: count_ones8 = 4'd1;
            8'b0000_1000: count_ones8 = 4'd1;
            8'b0001_0000: count_ones8 = 4'd1;
            8'b0010_0000: count_ones8 = 4'd1;
            8'b0100_0000: count_ones8 = 4'd1;
            8'b1000_0000: count_ones8 = 4'd1;
            8'b0000_0011: count_ones8 = 4'd2;
            8'b0000_0110: count_ones8 = 4'd2;
            8'b0000_1100: count_ones8 = 4'd2;
            8'b0001_1000: count_ones8 = 4'd2;
            8'b0011_0000: count_ones8 = 4'd2;
            8'b0110_0000: count_ones8 = 4'd2;
            8'b1100_0000: count_ones8 = 4'd2;
            8'b0000_0111: count_ones8 = 4'd3;
            8'b0000_1110: count_ones8 = 4'd3;
            8'b0001_1100: count_ones8 = 4'd3;
            8'b0011_1000: count_ones8 = 4'd3;
            8'b0111_0000: count_ones8 = 4'd3;
            8'b1110_0000: count_ones8 = 4'd3;
            8'b0000_1111: count_ones8 = 4'd4;
            8'b0001_1110: count_ones8 = 4'd4;
            8'b0011_1100: count_ones8 = 4'd4;
            8'b0111_1000: count_ones8 = 4'd4;
            8'b1111_0000: count_ones8 = 4'd4;
            8'b0001_1111: count_ones8 = 4'd5;
            8'b0011_1110: count_ones8 = 4'd5;
            8'b0111_1100: count_ones8 = 4'd5;
            8'b1111_1000: count_ones8 = 4'd5;
            8'b0011_1111: count_ones8 = 4'd6;
            8'b0111_1110: count_ones8 = 4'd6;
            8'b1111_1100: count_ones8 = 4'd6;
            8'b0111_1111: count_ones8 = 4'd7;
            8'b1111_1110: count_ones8 = 4'd7;
            8'b1111_1111: count_ones8 = 4'd8;
            default: count_ones8 = 8'd0;
        endcase
    end
endfunction
function automatic [3:0] count_ones8;

    input [7:0] data;
    begin
        case(data)
            8'b0000_0001: count_ones8 = 4'd1;
            8'b0000_0010: count_ones8 = 4'd1;
            8'b0000_0100: count_ones8 = 4'd1;
            8'b0000_1000: count_ones8 = 4'd1;
            8'b0001_0000: count_ones8 = 4'd1;
            8'b0010_0000: count_ones8 = 4'd1;
            8'b0100_0000: count_ones8 = 4'd1;
            8'b1000_0000: count_ones8 = 4'd1;
            8'b0000_0011: count_ones8 = 4'd2;
            8'b0000_0110: count_ones8 = 4'd2;
            8'b0000_1100: count_ones8 = 4'd2;
            8'b0001_1000: count_ones8 = 4'd2;
            8'b0011_0000: count_ones8 = 4'd2;
            8'b0110_0000: count_ones8 = 4'd2;
            8'b1100_0000: count_ones8 = 4'd2;
            8'b0000_0111: count_ones8 = 4'd3;
            8'b0000_1110: count_ones8 = 4'd3;
            8'b0001_1100: count_ones8 = 4'd3;
            8'b0011_1000: count_ones8 = 4'd3;
            8'b0111_0000: count_ones8 = 4'd3;
            8'b1110_0000: count_ones8 = 4'd3;
            8'b0000_1111: count_ones8 = 4'd4;
            8'b0001_1110: count_ones8 = 4'd4;
            8'b0011_1100: count_ones8 = 4'd4;
            8'b0111_1000: count_ones8 = 4'd4;
            8'b1111_0000: count_ones8 = 4'd4;
            8'b0001_1111: count_ones8 = 4'd5;
            8'b0011_1110: count_ones8 = 4'd5;
            8'b0111_1100: count_ones8 = 4'd5;
            8'b1111_1000: count_ones8 = 4'd5;
            8'b0011_1111: count_ones8 = 4'd6;
            8'b0111_1110: count_ones8 = 4'd6;
            8'b1111_1100: count_ones8 = 4'd6;
            8'b0111_1111: count_ones8 = 4'd7;
            8'b1111_1110: count_ones8 = 4'd7;
            8'b1111_1111: count_ones8 = 4'd8;
            default: count_ones8 = 8'd0;
        endcase
    end
endfunction