Skip to content
Snippets Groups Projects
Commit d3ebf161 authored by sebastie.gendre's avatar sebastie.gendre
Browse files

Bank registry: Add 2 more build info, global version and SHA

parent 5b058ef3
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,9 @@ entity hog_build_info_regs is ...@@ -38,7 +38,9 @@ entity hog_build_info_regs is
wr_addr_i : in std_logic_vector(C_ADDR_WIDTH-1 downto 0) := (others => '0'); -- AXI4-lite W, address wr_addr_i : in std_logic_vector(C_ADDR_WIDTH-1 downto 0) := (others => '0'); -- AXI4-lite W, address
wr_data_i : in std_logic_vector(31 downto 0) := (others => '0'); -- AXI4-lite W, data wr_data_i : in std_logic_vector(31 downto 0) := (others => '0'); -- AXI4-lite W, data
hog_global_date_i : in std_logic_vector(31 downto 0); -- Hog build global date hog_global_date_i : in std_logic_vector(31 downto 0); -- Hog build global date
hog_global_time_i : in std_logic_vector(31 downto 0) -- Hog build global time hog_global_time_i : in std_logic_vector(31 downto 0); -- Hog build global time
hog_global_ver_i : in std_logic_vector(31 downto 0); -- Hog build global version
hog_global_sha_i : in std_logic_vector(31 downto 0) -- Hog build global latest commit sha
); );
end hog_build_info_regs; end hog_build_info_regs;
...@@ -56,9 +58,21 @@ architecture Behavioral of hog_build_info_regs is ...@@ -56,9 +58,21 @@ architecture Behavioral of hog_build_info_regs is
-- [31 - 0] Time in hexa, with digits in format: 00HHMMSS -- [31 - 0] Time in hexa, with digits in format: 00HHMMSS
signal global_time_reg : std_logic_vector(31 downto 0) := (others => '0'); signal global_time_reg : std_logic_vector(31 downto 0) := (others => '0');
-- Global version register (GVR) @ 0x08 - R
-- Last version Tag when the project was modified.
-- [31 - 0] Version of form m.M.p encoded in hexa in format: MMmmpppp
signal global_version_reg : std_logic_vector(31 downto 0) := (others => '0');
-- Global SHA register (GSR) @ 0x12 - R
-- Last version Tag when the project was modified.
-- [31 - 0] Version of form m.M.p encoded in hexa in format: MMmmpppp
signal global_sha_reg : std_logic_vector(31 downto 0) := (others => '0');
-- Registers addresses -- Registers addresses
constant GDR_BASEADDR : integer := 0; -- Global date register constant GDR_BASEADDR : integer := 0; -- Global date register
constant GTR_BASEADDR : integer := 4; -- Global time register constant GTR_BASEADDR : integer := 4; -- Global time register
constant GVR_BASEADDR : integer := 8; -- Global version register
constant GSR_BASEADDR : integer := 12; -- Global SHA register
-- Read address integer -- Read address integer
signal rd_addr_s : integer := 0; signal rd_addr_s : integer := 0;
...@@ -88,9 +102,15 @@ begin ...@@ -88,9 +102,15 @@ begin
-- GDR requested -- GDR requested
when GDR_BASEADDR => when GDR_BASEADDR =>
rd_data_s <= global_date_reg; rd_data_s <= global_date_reg;
-- GDR requested -- GTR requested
when GTR_BASEADDR => when GTR_BASEADDR =>
rd_data_s <= global_time_reg; rd_data_s <= global_time_reg;
-- GVR requested
when GVR_BASEADDR =>
rd_data_s <= global_version_reg;
-- GSR requested
when GSR_BASEADDR =>
rd_data_s <= global_sha_reg;
-- Unknown register, return 0x0 -- Unknown register, return 0x0
when others => when others =>
rd_data_s <= (others => '0'); rd_data_s <= (others => '0');
...@@ -110,5 +130,11 @@ begin ...@@ -110,5 +130,11 @@ begin
-- Global Time register -- Global Time register
global_time_reg <= hog_global_time_i; global_time_reg <= hog_global_time_i;
-- Global Version register
global_version_reg <= hog_global_ver_i;
-- Global SHA register
global_sha_reg <= hog_global_sha_i;
end Behavioral; end Behavioral;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment