// 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_inv_28_22_enc (
  input        [21:0] data_i,
  output logic [27:0] data_o
);

  always_comb begin : p_encode
    data_o = 28'(data_i);
    data_o[22] = 1'b0 ^ ^(data_o & 28'h03003FF);
    data_o[23] = 1'b1 ^ ^(data_o & 28'h010FC0F);
    data_o[24] = 1'b0 ^ ^(data_o & 28'h0271C71);
    data_o[25] = 1'b1 ^ ^(data_o & 28'h03B6592);
    data_o[26] = 1'b0 ^ ^(data_o & 28'h03DAAA4);
    data_o[27] = 1'b1 ^ ^(data_o & 28'h03ED348);
  end

endmodule : prim_secded_inv_28_22_enc
