// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
// SECDED encoder generated by util/design/secded_gen.py

module prim_secded_hamming_22_16_enc (
  input        [15:0] data_i,
  output logic [21:0] data_o
);

  always_comb begin : p_encode
    data_o = 22'(data_i);
    data_o[16] = 1'b0 ^ ^(data_o & 22'h00AD5B);
    data_o[17] = 1'b0 ^ ^(data_o & 22'h00366D);
    data_o[18] = 1'b0 ^ ^(data_o & 22'h00C78E);
    data_o[19] = 1'b0 ^ ^(data_o & 22'h0007F0);
    data_o[20] = 1'b0 ^ ^(data_o & 22'h00F800);
    data_o[21] = 1'b0 ^ ^(data_o & 22'h1FFFFF);
  end

endmodule : prim_secded_hamming_22_16_enc
