data/full_repos/permissive/123366832/fpga/chip_select.v
'utf-8' codec can't decode byte 0xd0 in position 1808: invalid continuation byte
data/verilator_xmls/be4f270a-2047-4cf0-a1e7-57692d6eaa00.xml
module chip_select(
    input PHI2,
    input[15:0] A,
    input[15:0] mask,
    input[15:0] bitPattern,
    output ceN
    );
    
    reg[15:0] match;
    integer i;
    always@(*) begin
        match = 16'h0000;
        if(PHI2) begin
            for(i = 0; i<16; i = i+1) begin
                if(~mask[i]) match[i] = 1;
                else if(A[i] & bitPattern[i]) match[i] = 1;
            end
        end
    end
    
    assign ceN = ~&match;

endmodule
module chip_select(
    input PHI2,
    input[15:0] A,
    input[15:0] mask,
    input[15:0] bitPattern,
    output ceN
    );

    
    reg[15:0] match;
    integer i;
    always@(*) begin
        match = 16'h0000;
        if(PHI2) begin
            for(i = 0; i<16; i = i+1) begin
                if(~mask[i]) match[i] = 1;
                else if(A[i] & bitPattern[i]) match[i] = 1;
            end
        end
    end
    
    assign ceN = ~&match;

endmodule