data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:88: 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 \'BRAM_32x512\'\nmodule BRAM_32x512(\n       ^~~~~~~~~~~\n                                                                                                    : ... Top module \'BRAM_16x1024\'\nmodule BRAM_16x1024(\n       ^~~~~~~~~~~~\n                                                                                                    : ... Top module \'BRAM_8x2048\'\nmodule BRAM_8x2048(\n       ^~~~~~~~~~~\n                                                                                                    : ... Top module \'BRAM_4x4096\'\nmodule BRAM_4x4096(\n       ^~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:41: Bit extraction of array[9:0] requires 4 bit index, not 10 bits.\n                                                                                                 : ... In instance BRAM_16x1024.BRAM_16x1024\n                        rq <= memory[ra];\n                                    ^\n%Warning-WIDTH: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:44: Bit extraction of array[9:0] requires 4 bit index, not 10 bits.\n                                                                                                 : ... In instance BRAM_16x1024.BRAM_16x1024\n                        memory[wa] <= wd;\n                              ^\n%Warning-WIDTH: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:41: Bit extraction of array[10:0] requires 4 bit index, not 11 bits.\n                                                                                                 : ... In instance BRAM_8x2048.BRAM_8x2048\n                        rq <= memory[ra];\n                                    ^\n%Warning-WIDTH: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:44: Bit extraction of array[10:0] requires 4 bit index, not 11 bits.\n                                                                                                 : ... In instance BRAM_8x2048.BRAM_8x2048\n                        memory[wa] <= wd;\n                              ^\n%Warning-WIDTH: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:41: Bit extraction of array[11:0] requires 4 bit index, not 12 bits.\n                                                                                                 : ... In instance BRAM_4x4096.BRAM_4x4096\n                        rq <= memory[ra];\n                                    ^\n%Warning-WIDTH: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:44: Bit extraction of array[11:0] requires 4 bit index, not 12 bits.\n                                                                                                 : ... In instance BRAM_4x4096.BRAM_4x4096\n                        memory[wa] <= wd;\n                              ^\n%Warning-WIDTH: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:41: Bit extraction of array[8:0] requires 4 bit index, not 9 bits.\n                                                                                                 : ... In instance BRAM_4x4096.BRAM_4x4096\n                        rq <= memory[ra];\n                                    ^\n%Warning-WIDTH: data/full_repos/permissive/220229160/ql-qlf-plugin/tests/qlf_k6n10_bram/bram.v:44: Bit extraction of array[8:0] requires 4 bit index, not 9 bits.\n                                                                                                 : ... In instance BRAM_4x4096.BRAM_4x4096\n                        memory[wa] <= wd;\n                              ^\n%Error: Exiting due to 9 warning(s)\n'
module BRAM #(parameter AWIDTH = 9,
              parameter DWIDTH = 32)
       (clk,
        rce,
        ra,
        rq,
        wce,
        wa,
        wd);

        input  clk;

        input                   rce;
        input      [AWIDTH-1:0] ra;
        output reg [DWIDTH-1:0] rq;

        input                   wce;
        input      [AWIDTH-1:0] wa;
        input      [DWIDTH-1:0] wd;

        reg        [DWIDTH-1:0] memory[0:AWIDTH-1];

        always @(posedge clk) begin
                if (rce)
                        rq <= memory[ra];

                if (wce)
                        memory[wa] <= wd;
        end

        integer i;
        initial
        begin
                for(i = 0; i < AWIDTH-1; i = i + 1)
                        memory[i] = 0;
        end

endmodule
module BRAM #(parameter AWIDTH = 9,
              parameter DWIDTH = 32)
       (clk,
        rce,
        ra,
        rq,
        wce,
        wa,
        wd);


        input  clk;

        input                   rce;
        input      [AWIDTH-1:0] ra;
        output reg [DWIDTH-1:0] rq;

        input                   wce;
        input      [AWIDTH-1:0] wa;
        input      [DWIDTH-1:0] wd;

        reg        [DWIDTH-1:0] memory[0:AWIDTH-1];

        always @(posedge clk) begin
                if (rce)
                        rq <= memory[ra];

                if (wce)
                        memory[wa] <= wd;
        end

        integer i;
        initial
        begin
                for(i = 0; i < AWIDTH-1; i = i + 1)
                        memory[i] = 0;
        end

endmodule