Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hog-build-info-register
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Travail semestre SG
hog-build-info-register
Commits
d3ebf161
Commit
d3ebf161
authored
1 month ago
by
sebastie.gendre
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hog-build-info/hog-build-info.srcs/sources_1/new/hog_build_info_regs.vhd
+28
-2
28 additions, 2 deletions
...hog-build-info.srcs/sources_1/new/hog_build_info_regs.vhd
with
28 additions
and
2 deletions
hog-build-info/hog-build-info.srcs/sources_1/new/hog_build_info_regs.vhd
+
28
−
2
View file @
d3ebf161
...
...
@@ -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
;
-- G
D
R requested
-- G
T
R 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
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment