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

hog_build_info_regs: Small fixes and move code wrongly placed at first

parent 4a9267e1
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ use IEEE.STD_LOGIC_1164.ALL; ...@@ -24,7 +24,7 @@ use IEEE.STD_LOGIC_1164.ALL;
entity hog_build_info_reg is entity hog_build_info_reg is
generic ( generic (
C_ADDR_WIDTH: integer :=32; -- Width of the addresses C_ADDR_WIDTH: integer := 32 -- Width of the addresses
); );
port ( port (
...@@ -38,28 +38,30 @@ entity hog_build_info_reg is ...@@ -38,28 +38,30 @@ entity hog_build_info_reg is
); );
end hog_build_info_reg; end hog_build_info_reg;
architecture Behavioral of hog_build_info_reg is
-- Register map -- Register map
-- --
-- Global date register (GDR) @ 0x00 - R -- Global date register (GDR) @ 0x00 - R
-- Date of last commit when the project was modified. -- Date of last commit when the project was modified.
-- [31 - 0] Date in hexa, with digits in format: ddmmyyyy -- [31 - 0] Date in hexa, with digits in format: ddmmyyyy
signal global_date_reg : std_logic_vector(31 downto 0) := (others => '0'); signal global_date_reg : std_logic_vector(31 downto 0) := (others => '0');
-- Global time register (GTR) @ 0x00 - R -- Global time register (GTR) @ 0x00 - R
-- Time of last commit when the project was modified. -- Time of last commit when the project was modified.
-- [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');
-- Registers addresses -- Registers addresses
constant GDR_BASEADDR : integer := 0; -- Global date register constant GDR_BASEADDR : integer := 0; -- Global date register
constant GTR_BASEADDR : integer := 0; -- Global time register constant GTR_BASEADDR : integer := 0; -- Global time register
-- Read address integer -- Read address integer
signal rd_addr_s : integer :=0; signal rd_addr_s : integer := 0;
-- Read data -- Read data
signal rd_data_s : std_logic_vector(31 downto 0); signal rd_data_s : std_logic_vector(31 downto 0);
architecture Behavioral of hog_build_info_reg is begin
-- Convert the read address to an integer -- Convert the read address to an integer
rd_addr_s <= to_integer(unsigned(rd_addr_i)); rd_addr_s <= to_integer(unsigned(rd_addr_i));
...@@ -104,6 +106,5 @@ architecture Behavioral of hog_build_info_reg is ...@@ -104,6 +106,5 @@ architecture Behavioral of hog_build_info_reg is
-- Global Time register -- Global Time register
global_time_reg <= hog_global_time_i; global_time_reg <= hog_global_time_i;
begin
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