-- ** 18b EDAC Package **
--
-- Description:     A package for the Extended Hamming Code for single-error
--                  correction and double-error detection (SEC-DED)
--  
-- Project:         UMEL_ŠB
-- File name:       edac_18b_pkg.vhd
-- Creation date:   May 2, 2016
--
-- Institution:     Brno University of Technology, FEEC UMEL
-- Author:          Martin Stava
-- Author's e-mail: stavam1@feec.vutbr.cz
--
-- Modified by:              Jan Bares
-- Modification Date:        June 1, 2016
-- Modification File name:   bfm_hamm_rom_pkg.vhd
----------------------------------------------------------------------------------------

library ieee;
use ieee.std_logic_1164.all;


package bfm_hamm_rom_pkg is

  constant c_INF_DATA_WIDTH : natural := 6;
  constant c_CHECK_DATA_WIDTH : natural := 5;
  constant c_ENCODED_DATA_WIDTH : natural := c_INF_DATA_WIDTH + c_CHECK_DATA_WIDTH;

  subtype raw_vector is std_logic_vector (c_ENCODED_DATA_WIDTH-1 downto 0);
  type h_ext_type is array (c_CHECK_DATA_WIDTH-1 downto 0) of raw_vector;

  constant c_H_EXT : h_ext_type := (
    "01011010000",
    "01101101000",
    "10101000100",
    "10110100010",
    "11010100001"
  );

end bfm_hamm_rom_pkg;

package body bfm_hamm_rom_pkg is
end package body bfm_hamm_rom_pkg;
