library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

package flashrom_pkg is
	constant FLASHROM_PAGE_ADDR_WIDTH         : integer                      := 12;
	constant FLASHROM_COMMAND_MANUFACTURER_ID : std_logic_vector(7 downto 0) := x"9F";
	constant FLASHROM_COMMAND_GET_STATUS      : std_logic_vector(7 downto 0) := x"D7";
	constant FLASHROM_COMMAND_CONT_ARRAY_READ : std_logic_vector(7 downto 0) := x"0B";
	constant FLASHROM_COMMAND_WRITE_THROUGH_1 : std_logic_vector(7 downto 0) := x"82";

	function padBits(target : std_logic_vector; other : std_logic_vector) return std_logic_vector;
end package flashrom_pkg;

package body flashrom_pkg is
	function padBits(target : std_logic_vector; other : std_logic_vector) return std_logic_vector is
	begin
		return std_logic_vector(to_unsigned(0, target'length - other'length));
	end function padBits;

end package body flashrom_pkg;
