data/full_repos/permissive/423958267/lab06/lab06.srcs/sources_1/new/baudrate_gen.v
1: b'%Warning-WIDTH: data/full_repos/permissive/423958267/lab06/lab06.srcs/sources_1/new/baudrate_gen.v:41: Operator EQ expects 32 or 27 bits on the LHS, but LHS\'s VARREF \'counter\' generates 10 bits.\n                                                                                                     : ... In instance baudrate_gen\n        if (counter == maxcount) begin counter = 0; baud = ~baud; end\n                    ^~\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Error: Exiting due to 1 warning(s)\n'
module baudrate_gen #(
    parameter baudrate = 9600,
    parameter maxcount = (100000000 / (baudrate*16)) / 2
)
(
    output reg baud,
    input clk
);

    reg [9:0] counter = 0;

    initial begin
        
    end

    always @(posedge clk)
    begin
        counter = counter + 1;
        if (counter == maxcount) begin counter = 0; baud = ~baud; end
    end

endmodule
module baudrate_gen #(
    parameter baudrate = 9600,
    parameter maxcount = (100000000 / (baudrate*16)) / 2
)
(
    output reg baud,
    input clk
);


    reg [9:0] counter = 0;

    initial begin
        
    end

    always @(posedge clk)
    begin
        counter = counter + 1;
        if (counter == maxcount) begin counter = 0; baud = ~baud; end
    end

endmodule