data/full_repos/permissive/102870077/engine/static/school_mips/pipeline_ahb/sm_register.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/102870077/engine/static/school_mips/pipeline_ahb/sm_register.v:64: Multiple top level modules\n                                                                                                               : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                                                               : ... Top module \'sm_register\'\nmodule sm_register\n       ^~~~~~~~~~~\n                                                                                                               : ... Top module \'sm_register_cs\'\nmodule sm_register_cs\n       ^~~~~~~~~~~~~~\n                                                                                                               : ... Top module \'sm_register_wes\'\nmodule sm_register_wes\n       ^~~~~~~~~~~~~~~\n%Error: Exiting due to 1 warning(s)\n'
module sm_register_we
#(
    parameter WIDTH = 1
)
(
    input                        clk,
    input                        rst_n,
    input                        we,
    input      [ WIDTH - 1 : 0 ] d,
    output reg [ WIDTH - 1 : 0 ] q
);
    localparam RESET = { WIDTH { 1'b0 } };
    
    always @ (posedge clk or negedge rst_n)
        if(~rst_n)
            q <= RESET;
        else
            if(we) q <= d;
endmodule
module sm_register_we
#(
    parameter WIDTH = 1
)
(
    input                        clk,
    input                        rst_n,
    input                        we,
    input      [ WIDTH - 1 : 0 ] d,
    output reg [ WIDTH - 1 : 0 ] q
);

    localparam RESET = { WIDTH { 1'b0 } };
    
    always @ (posedge clk or negedge rst_n)
        if(~rst_n)
            q <= RESET;
        else
            if(we) q <= d;
endmodule