diff --git a/hog-build-info/hog-build-info.srcs/sources_1/new/hog_build_info_regs.vhd b/hog-build-info/hog-build-info.srcs/sources_1/new/hog_build_info_regs.vhd index ea303f8dbc32789e3f1ba0977a90e31776f67449..61eb01c842428080f4d07ed3b7c932ec52de1485 100644 --- a/hog-build-info/hog-build-info.srcs/sources_1/new/hog_build_info_regs.vhd +++ b/hog-build-info/hog-build-info.srcs/sources_1/new/hog_build_info_regs.vhd @@ -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_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_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; @@ -56,9 +58,21 @@ architecture Behavioral of hog_build_info_regs is -- [31 - 0] Time in hexa, with digits in format: 00HHMMSS 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 constant GDR_BASEADDR : integer := 0; -- Global date 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 signal rd_addr_s : integer := 0; @@ -88,9 +102,15 @@ begin -- GDR requested when GDR_BASEADDR => rd_data_s <= global_date_reg; - -- GDR requested + -- GTR requested when GTR_BASEADDR => 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 when others => rd_data_s <= (others => '0'); @@ -110,5 +130,11 @@ begin -- Global Time register 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;