2016-08-04 19:22:38 +02:00
|
|
|
library ieee;
|
|
|
|
use ieee.std_logic_1164.all;
|
|
|
|
use ieee.numeric_std.all;
|
|
|
|
|
|
|
|
package flashrom_pkg is
|
|
|
|
constant FLASHROM_ADDR_WIDTH : integer := 12;
|
|
|
|
constant FLASHROM_COMMAND_MANUFACTURER_ID : std_logic_vector(7 downto 0) := x"9F";
|
2016-12-04 18:00:31 +01:00
|
|
|
constant FLASHROM_COMMAND_GET_STATUS : std_logic_vector(7 downto 0) := x"D7";
|
2016-12-05 20:37:04 +01:00
|
|
|
constant FLASHROM_COMMAND_CONT_ARRAY_READ : std_logic_vector(7 downto 0) := x"0B";
|
2016-12-06 19:53:39 +01:00
|
|
|
constant FLASHROM_COMMAND_WRITE_THROUGH_1 : std_logic_vector(7 downto 0) := x"82";
|
|
|
|
|
2016-08-04 19:22:38 +02:00
|
|
|
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;
|