Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
RTSD
HDL
Commits
14886a2c
Commit
14886a2c
authored
2 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Use reg_dp_strobe_total_count constants from dp_components_pkg.vhd.
parent
8aba99eb
No related branches found
No related tags found
1 merge request
!288
Resolve L2SDP-836
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/base/dp/src/vhdl/dp_components_pkg.vhd
+9
-7
9 additions, 7 deletions
libraries/base/dp/src/vhdl/dp_components_pkg.vhd
libraries/base/dp/src/vhdl/dp_strobe_total_count.vhd
+4
-4
4 additions, 4 deletions
libraries/base/dp/src/vhdl/dp_strobe_total_count.vhd
with
13 additions
and
11 deletions
libraries/base/dp/src/vhdl/dp_components_pkg.vhd
+
9
−
7
View file @
14886a2c
...
@@ -30,15 +30,17 @@ USE common_lib.common_pkg.ALL;
...
@@ -30,15 +30,17 @@ USE common_lib.common_pkg.ALL;
PACKAGE
dp_components_pkg
IS
PACKAGE
dp_components_pkg
IS
CONSTANT
c_dp_clk_MHz
:
NATURAL
:
=
200
;
CONSTANT
c_dp_clk_MHz
:
NATURAL
:
=
200
;
CONSTANT
c_dp_sync_timeout
:
NATURAL
:
=
c_dp_clk_MHz
*
10
**
6
+
c_dp_clk_MHz
*
10
**
5
;
-- 10% margin for nominal 1 s
CONSTANT
c_dp_sync_timeout
:
NATURAL
:
=
c_dp_clk_MHz
*
10
**
6
+
c_dp_clk_MHz
*
10
**
5
;
-- 10% margin for nominal 1 s
CONSTANT
c_dp_bsn_monitor_v2_reg_adr_w
:
NATURAL
:
=
ceil_log2
(
7
);
-- = 3
CONSTANT
c_dp_bsn_monitor_v2_reg_adr_w
:
NATURAL
:
=
ceil_log2
(
7
);
-- = 3
CONSTANT
c_dp_bsn_monitor_v2_reg_adr_span
:
NATURAL
:
=
2
**
c_dp_bsn_monitor_v2_reg_adr_w
;
-- = 8
CONSTANT
c_dp_bsn_monitor_v2_reg_adr_span
:
NATURAL
:
=
2
**
c_dp_bsn_monitor_v2_reg_adr_w
;
-- = 8
CONSTANT
c_dp_strobe_total_count_reg_adr_w
:
NATURAL
:
=
ceil_log2
(
15
*
2
+
1
);
-- = 5
CONSTANT
c_dp_strobe_total_count_reg_nof_words
:
NATURAL
:
=
15
*
2
+
1
;
-- = 31
CONSTANT
c_dp_strobe_total_count_reg_adr_span
:
NATURAL
:
=
2
**
c_dp_strobe_total_count_reg_adr_w
;
-- = 32
CONSTANT
c_dp_strobe_total_count_reg_adr_w
:
NATURAL
:
=
ceil_log2
(
c_dp_strobe_total_count_reg_nof_words
);
-- = 5
CONSTANT
c_dp_strobe_total_count_nof_counts_max
:
NATURAL
:
=
2
**
c_dp_strobe_total_count_reg_adr_w
/
2
-
1
;
-- = 15
CONSTANT
c_dp_strobe_total_count_reg_adr_span
:
NATURAL
:
=
2
**
c_dp_strobe_total_count_reg_adr_w
;
-- = 32
CONSTANT
c_dp_strobe_total_count_reg_nof_counts_max
:
NATURAL
:
=
2
**
c_dp_strobe_total_count_reg_adr_w
/
2
-
1
;
-- = 15
CONSTANT
c_dp_strobe_total_count_reg_clear_adr
:
NATURAL
:
=
c_dp_strobe_total_count_reg_nof_counts_max
*
2
;
-- after counters in REGMAP
END
dp_components_pkg
;
END
dp_components_pkg
;
...
...
This diff is collapsed.
Click to expand it.
libraries/base/dp/src/vhdl/dp_strobe_total_count.vhd
+
4
−
4
View file @
14886a2c
...
@@ -99,15 +99,15 @@ END dp_strobe_total_count;
...
@@ -99,15 +99,15 @@ END dp_strobe_total_count;
ARCHITECTURE
rtl
OF
dp_strobe_total_count
IS
ARCHITECTURE
rtl
OF
dp_strobe_total_count
IS
CONSTANT
c_nof_counts_max
:
NATURAL
:
=
c_dp_strobe_total_count_nof_counts_max
;
--
f
ixed by REGMAP
--
F
ixed by REGMAP
CONSTANT
c_nof_
words
:
NATURAL
:
=
c_
nof_counts_max
*
2
+
1
;
-- +1 for clear
CONSTANT
c_nof_
counts_max
:
NATURAL
:
=
c_
dp_strobe_total_count_reg_nof_counts_max
;
CONSTANT
c_clear_adr
:
NATURAL
:
=
c_
nof_counts_max
*
2
;
-- after counters in REGMAP
CONSTANT
c_clear_adr
:
NATURAL
:
=
c_
dp_strobe_total_count_reg_clear_adr
;
-- Define the size of the MM slave register
-- Define the size of the MM slave register
CONSTANT
c_mm_reg
:
t_c_mem
:
=
(
latency
=>
1
,
CONSTANT
c_mm_reg
:
t_c_mem
:
=
(
latency
=>
1
,
adr_w
=>
c_dp_strobe_total_count_reg_adr_w
,
adr_w
=>
c_dp_strobe_total_count_reg_adr_w
,
dat_w
=>
g_mm_w
,
-- Use MM bus data width = c_word_w = 32 for all MM registers
dat_w
=>
g_mm_w
,
-- Use MM bus data width = c_word_w = 32 for all MM registers
nof_dat
=>
c_nof_words
,
nof_dat
=>
c_
dp_strobe_total_count_reg_
nof_words
,
init_sl
=>
'0'
);
init_sl
=>
'0'
);
TYPE
t_cnt_arr
IS
ARRAY
(
INTEGER
RANGE
<>
)
OF
STD_LOGIC_VECTOR
(
g_count_w
-1
DOWNTO
0
);
TYPE
t_cnt_arr
IS
ARRAY
(
INTEGER
RANGE
<>
)
OF
STD_LOGIC_VECTOR
(
g_count_w
-1
DOWNTO
0
);
...
...
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