data/full_repos/permissive/157085540/source_codes/morse_encoder.v
1: b'%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:163: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h1f\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d31)           \n                       ^~\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:158: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h1e\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d30)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:153: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h1d\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d29)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:148: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h1c\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d28)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:143: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h1b\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d27)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:138: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h1a\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d26)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:133: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h19\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d25)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:128: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h18\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d24)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:123: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h17\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d23)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:118: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h16\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d22)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:113: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h15\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d21)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:108: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h14\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d20)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:103: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h13\' generates 5 bits.\n                                                                                     : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d19)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:98: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h12\' generates 5 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d18)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:93: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h11\' generates 5 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d17)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:88: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'5\'h10\' generates 5 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==5\'d16)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:83: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'4\'hf\' generates 4 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==4\'d15)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:78: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'4\'he\' generates 4 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==4\'d14)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:73: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'4\'hd\' generates 4 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==4\'d13)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:68: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'4\'hc\' generates 4 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==4\'d12)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:63: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'4\'hb\' generates 4 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==4\'d11)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:58: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'4\'ha\' generates 4 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==4\'d10)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:53: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'4\'h9\' generates 4 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==4\'d9)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:48: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'4\'h8\' generates 4 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==4\'d8)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:43: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'3\'h7\' generates 3 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==3\'d7)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:38: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'3\'h6\' generates 3 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==3\'d6)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:33: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'3\'h5\' generates 3 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==3\'d5)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:28: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'3\'h4\' generates 3 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==3\'d4)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:23: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'2\'h3\' generates 2 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==2\'d3)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:18: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'2\'h2\' generates 2 bits.\n                                                                                    : ... In instance morse_encoder\n        else if(sw[5:0]==2\'d2)           \n                       ^~\n%Warning-WIDTH: data/full_repos/permissive/157085540/source_codes/morse_encoder.v:13: Operator EQ expects 6 bits on the RHS, but RHS\'s CONST \'1\'h1\' generates 1 bits.\n                                                                                    : ... In instance morse_encoder\n        if(sw[5:0]==1\'d1)                \n                  ^~\n%Error: Exiting due to 31 warning(s)\n'
module morse_encoder(
input [15:0] sw,
output reg [6:0] count,
output reg [15:0] led,
output [3:0] AN
    );
    assign AN=4'b1110;
    always@(*)
    begin
        if(sw[5:0]==1'd1)
        begin
            count=7'b0010010; 
            led[15:10]=6'b010000;
        end
        else if(sw[5:0]==2'd2)
        begin
            count=7'b1001100; 
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==2'd3)
        begin
            count=7'b1001100; 
            led[15:10]=6'b101000;
        end
        else if(sw[5:0]==3'd4)
        begin
            count=7'b0000110; 
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==3'd5)
        begin
            count=7'b1001111;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==3'd6)
        begin
            count=7'b1001100;           
            led[15:10]=6'b001000;
        end
        else if(sw[5:0]==3'd7)
        begin
            count=7'b0000110;           
            led[15:10]=6'b110000;
        end
        else if(sw[5:0]==4'd8)
        begin
            count=7'b1001100;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==4'd9)
        begin
            count=7'b0010010;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==4'd10)
        begin
            count=7'b1001100;           
            led[15:10]=6'b011100;
        end
        else if(sw[5:0]==4'd11)
        begin
            count=7'b0000110;           
            led[15:10]=6'b101000;
        end
        else if(sw[5:0]==4'd12)
        begin
            count=7'b1001100;           
            led[15:10]=6'b010000;
        end
        else if(sw[5:0]==4'd13)
        begin
            count=7'b0010010;           
            led[15:10]=6'b110000;
        end
        else if(sw[5:0]==4'd14)
        begin
            count=7'b0010010;           
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==4'd15)
        begin
            count=7'b0000110;           
            led[15:10]=6'b111000;
        end
        else if(sw[5:0]==5'd16)
        begin
            count=7'b1001100;           
            led[15:10]=6'b011000;
        end
        else if(sw[5:0]==5'd17)
        begin
            count=7'b1001100;           
            led[15:10]=6'b110100;
        end
        else if(sw[5:0]==5'd18)
        begin
            count=7'b0000110;           
            led[15:10]=6'b010000;
        end
        else if(sw[5:0]==5'd19)
        begin
            count=7'b1001100;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==5'd20)
        begin
            count=7'b1001111;           
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==5'd21)
        begin
            count=7'b0000110;           
            led[15:10]=6'b001000;
        end
        else if(sw[5:0]==5'd22)
        begin
            count=7'b1001100;           
            led[15:10]=6'b000100;
        end
        else if(sw[5:0]==5'd23)
        begin
            count=7'b0000110;           
            led[15:10]=6'b011000;
        end
        else if(sw[5:0]==5'd24)
        begin
            count=7'b1001100;           
            led[15:10]=6'b100100;
        end
        else if(sw[5:0]==5'd25)
        begin
            count=7'b1001100;           
            led[15:10]=6'b101100;
        end
        else if(sw[5:0]==5'd26)
        begin
            count=7'b1001100;           
            led[15:10]=6'b110000;
        end
        else if(sw[5:0]==5'd27)
        begin
            count=7'b0100100;           
            led[15:10]=6'b111110;
        end
        else if(sw[5:0]==5'd28)
        begin
            count=7'b0100100;           
            led[15:10]=6'b011110;
        end
        else if(sw[5:0]==5'd29)
        begin
            count=7'b0100100;           
            led[15:10]=6'b001110;
        end
        else if(sw[5:0]==5'd30)
        begin
            count=7'b0100100;           
            led[15:10]=6'b000110;
        end
        else if(sw[5:0]==5'd31)
        begin
            count=7'b0100100;           
            led[15:10]=6'b000010;
        end
        else if(sw[5:0]==6'd32)
        begin
            count=7'b0100100;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==6'd33)
        begin
            count=7'b0100100;           
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==6'd34)
        begin
            count=7'b0100100;           
            led[15:10]=6'b110000;
        end
        else if(sw[5:0]==6'd35)
        begin
            count=7'b0100100;           
            led[15:10]=6'b111000;
        end
        else if(sw[5:0]==6'd36)
        begin
            count=7'b0100100;           
            led[15:10]=6'b111100;
        end
        else if(sw[5:0]==6'd37)
        begin
            count=7'b0100000;           
            led[15:10]=6'b010101;
        end
        else if(sw[5:0]==6'd38)
        begin
            count=7'b0100000;           
            led[15:10]=6'b110011;
        end
        else if(sw[5:0]==6'd39)
        begin
            count=7'b0100000;           
            led[15:10]=6'b001100;
        end
        else
        begin
            count=7'b1111110;
            led[15:10]=6'b000000;
        end
    end    
endmodule
module morse_encoder(
input [15:0] sw,
output reg [6:0] count,
output reg [15:0] led,
output [3:0] AN
    );

    assign AN=4'b1110;
    always@(*)
    begin
        if(sw[5:0]==1'd1)
        begin
            count=7'b0010010; 
            led[15:10]=6'b010000;
        end
        else if(sw[5:0]==2'd2)
        begin
            count=7'b1001100; 
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==2'd3)
        begin
            count=7'b1001100; 
            led[15:10]=6'b101000;
        end
        else if(sw[5:0]==3'd4)
        begin
            count=7'b0000110; 
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==3'd5)
        begin
            count=7'b1001111;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==3'd6)
        begin
            count=7'b1001100;           
            led[15:10]=6'b001000;
        end
        else if(sw[5:0]==3'd7)
        begin
            count=7'b0000110;           
            led[15:10]=6'b110000;
        end
        else if(sw[5:0]==4'd8)
        begin
            count=7'b1001100;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==4'd9)
        begin
            count=7'b0010010;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==4'd10)
        begin
            count=7'b1001100;           
            led[15:10]=6'b011100;
        end
        else if(sw[5:0]==4'd11)
        begin
            count=7'b0000110;           
            led[15:10]=6'b101000;
        end
        else if(sw[5:0]==4'd12)
        begin
            count=7'b1001100;           
            led[15:10]=6'b010000;
        end
        else if(sw[5:0]==4'd13)
        begin
            count=7'b0010010;           
            led[15:10]=6'b110000;
        end
        else if(sw[5:0]==4'd14)
        begin
            count=7'b0010010;           
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==4'd15)
        begin
            count=7'b0000110;           
            led[15:10]=6'b111000;
        end
        else if(sw[5:0]==5'd16)
        begin
            count=7'b1001100;           
            led[15:10]=6'b011000;
        end
        else if(sw[5:0]==5'd17)
        begin
            count=7'b1001100;           
            led[15:10]=6'b110100;
        end
        else if(sw[5:0]==5'd18)
        begin
            count=7'b0000110;           
            led[15:10]=6'b010000;
        end
        else if(sw[5:0]==5'd19)
        begin
            count=7'b1001100;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==5'd20)
        begin
            count=7'b1001111;           
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==5'd21)
        begin
            count=7'b0000110;           
            led[15:10]=6'b001000;
        end
        else if(sw[5:0]==5'd22)
        begin
            count=7'b1001100;           
            led[15:10]=6'b000100;
        end
        else if(sw[5:0]==5'd23)
        begin
            count=7'b0000110;           
            led[15:10]=6'b011000;
        end
        else if(sw[5:0]==5'd24)
        begin
            count=7'b1001100;           
            led[15:10]=6'b100100;
        end
        else if(sw[5:0]==5'd25)
        begin
            count=7'b1001100;           
            led[15:10]=6'b101100;
        end
        else if(sw[5:0]==5'd26)
        begin
            count=7'b1001100;           
            led[15:10]=6'b110000;
        end
        else if(sw[5:0]==5'd27)
        begin
            count=7'b0100100;           
            led[15:10]=6'b111110;
        end
        else if(sw[5:0]==5'd28)
        begin
            count=7'b0100100;           
            led[15:10]=6'b011110;
        end
        else if(sw[5:0]==5'd29)
        begin
            count=7'b0100100;           
            led[15:10]=6'b001110;
        end
        else if(sw[5:0]==5'd30)
        begin
            count=7'b0100100;           
            led[15:10]=6'b000110;
        end
        else if(sw[5:0]==5'd31)
        begin
            count=7'b0100100;           
            led[15:10]=6'b000010;
        end
        else if(sw[5:0]==6'd32)
        begin
            count=7'b0100100;           
            led[15:10]=6'b000000;
        end
        else if(sw[5:0]==6'd33)
        begin
            count=7'b0100100;           
            led[15:10]=6'b100000;
        end
        else if(sw[5:0]==6'd34)
        begin
            count=7'b0100100;           
            led[15:10]=6'b110000;
        end
        else if(sw[5:0]==6'd35)
        begin
            count=7'b0100100;           
            led[15:10]=6'b111000;
        end
        else if(sw[5:0]==6'd36)
        begin
            count=7'b0100100;           
            led[15:10]=6'b111100;
        end
        else if(sw[5:0]==6'd37)
        begin
            count=7'b0100000;           
            led[15:10]=6'b010101;
        end
        else if(sw[5:0]==6'd38)
        begin
            count=7'b0100000;           
            led[15:10]=6'b110011;
        end
        else if(sw[5:0]==6'd39)
        begin
            count=7'b0100000;           
            led[15:10]=6'b001100;
        end
        else
        begin
            count=7'b1111110;
            led[15:10]=6'b000000;
        end
    end    
endmodule