data/full_repos/permissive/169258653/monocycle/MIPS_single_cycle_32bit/MIPS_single_cycle_32bit.srcs/sources_1/new/sign_extend.v
1: b'%Warning-WIDTHCONCAT: data/full_repos/permissive/169258653/monocycle/MIPS_single_cycle_32bit/MIPS_single_cycle_32bit.srcs/sources_1/new/sign_extend.v:35: Unsized numbers/parameters not allowed in replications.\n                                                                                                                                                        : ... In instance sign_extend\n        y<={{16{0}}, x};\n                ^\n                      ... Use "/* verilator lint_off WIDTHCONCAT */" and lint_on around source to disable this message.\n%Warning-WIDTHCONCAT: data/full_repos/permissive/169258653/monocycle/MIPS_single_cycle_32bit/MIPS_single_cycle_32bit.srcs/sources_1/new/sign_extend.v:35: Unsized numbers/parameters not allowed in concatenations.\n                                                                                                                                                        : ... In instance sign_extend\n        y<={{16{0}}, x};\n               ^\n%Warning-WIDTHCONCAT: data/full_repos/permissive/169258653/monocycle/MIPS_single_cycle_32bit/MIPS_single_cycle_32bit.srcs/sources_1/new/sign_extend.v:35: Unsized numbers/parameters not allowed in replications.\n                                                                                                                                                        : ... In instance sign_extend\n        y<={{16{0}}, x};\n                   ^\n%Error: Exiting due to 3 warning(s)\n'
module sign_extend(
    input [15:0] x,
    input extend,
    output reg [31:0] y
    );
    


    always@(x,extend)
    if(extend)
        y<={{16{x[15]}}, x};
    else
        y<={{16{0}}, x};
    
endmodule
module sign_extend(
    input [15:0] x,
    input extend,
    output reg [31:0] y
    );

    


    always@(x,extend)
    if(extend)
        y<={{16{x[15]}}, x};
    else
        y<={{16{0}}, x};
    
endmodule