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
5f9f5bfe
Commit
5f9f5bfe
authored
2 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Improve input register stage, to avoid direct use of ref_sync for cnt_en..
parent
8e63f0f9
No related branches found
No related tags found
1 merge request
!292
Use default 0 for nxt_info to avoid X to decimal conversion error in sim_io.py...
Pipeline
#39658
passed
2 years ago
Stage: simulation
Stage: synthesis
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/dp/src/vhdl/dp_strobe_total_count.vhd
+17
-7
17 additions, 7 deletions
libraries/base/dp/src/vhdl/dp_strobe_total_count.vhd
with
17 additions
and
7 deletions
libraries/base/dp/src/vhdl/dp_strobe_total_count.vhd
+
17
−
7
View file @
5f9f5bfe
...
@@ -114,7 +114,9 @@ ARCHITECTURE rtl OF dp_strobe_total_count IS
...
@@ -114,7 +114,9 @@ ARCHITECTURE rtl OF dp_strobe_total_count IS
-- Registers in dp_clk domain
-- Registers in dp_clk domain
SIGNAL
ref_sync_reg
:
STD_LOGIC
:
=
'0'
;
SIGNAL
ref_sync_reg
:
STD_LOGIC
:
=
'0'
;
SIGNAL
ref_sync_reg2
:
STD_LOGIC
:
=
'0'
;
SIGNAL
in_strobe_reg_arr
:
STD_LOGIC_VECTOR
(
g_nof_counts
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
'0'
);
SIGNAL
in_strobe_reg_arr
:
STD_LOGIC_VECTOR
(
g_nof_counts
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
'0'
);
SIGNAL
in_strobe_reg2_arr
:
STD_LOGIC_VECTOR
(
g_nof_counts
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
'0'
);
SIGNAL
rd_reg
:
STD_LOGIC_VECTOR
(
c_mm_reg
.
nof_dat
*
c_mm_reg
.
dat_w
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
'0'
);
SIGNAL
rd_reg
:
STD_LOGIC_VECTOR
(
c_mm_reg
.
nof_dat
*
c_mm_reg
.
dat_w
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
'0'
);
SIGNAL
mm_cnt_clr
:
STD_LOGIC
;
SIGNAL
mm_cnt_clr
:
STD_LOGIC
;
SIGNAL
cnt_clr
:
STD_LOGIC
;
SIGNAL
cnt_clr
:
STD_LOGIC
;
...
@@ -140,15 +142,21 @@ BEGIN
...
@@ -140,15 +142,21 @@ BEGIN
out_pulse
=>
cnt_clr
out_pulse
=>
cnt_clr
);
);
-- Register inputs to ease timing closure
-- . register ref_sync to ease timing closure for ref_sync fanout
-- . register ref_sync to ease timing closure for ref_sync fanout
ref_sync_reg
<=
ref_sync
WHEN
rising_edge
(
dp_clk
);
-- . register in_strobe_arr to preserve alignment with ref_sync
-- . register in_strobe_arr to preserve alignment with ref_sync
ref_sync_reg
<=
ref_sync
WHEN
rising_edge
(
dp_clk
);
in_strobe_reg_arr
<=
in_strobe_arr
WHEN
rising_edge
(
dp_clk
);
in_strobe_reg_arr
<=
in_strobe_arr
WHEN
rising_edge
(
dp_clk
);
-- Register inputs again to be able to align registered cnt_en and
-- pipelined ref_sync pulse
ref_sync_reg2
<=
ref_sync_reg
WHEN
rising_edge
(
dp_clk
);
in_strobe_reg2_arr
<=
in_strobe_reg_arr
WHEN
rising_edge
(
dp_clk
);
-- . clear strobe counters immediately at cnt_clr
-- . clear strobe counters immediately at cnt_clr
-- . start strobe counters after ref_sync, e.g. to align strobe counters in different nodes in
-- . start strobe counters after ref_sync, e.g. to align strobe counters
-- case the input was (already) active during the cnt_clr
-- in different nodes in case the input was (already) active during
-- the cnt_clr
p_cnt_en
:
PROCESS
(
dp_rst
,
dp_clk
)
p_cnt_en
:
PROCESS
(
dp_rst
,
dp_clk
)
BEGIN
BEGIN
IF
dp_rst
=
'1'
THEN
IF
dp_rst
=
'1'
THEN
...
@@ -156,7 +164,8 @@ BEGIN
...
@@ -156,7 +164,8 @@ BEGIN
ELSIF
rising_edge
(
dp_clk
)
THEN
ELSIF
rising_edge
(
dp_clk
)
THEN
IF
cnt_clr
=
'1'
THEN
IF
cnt_clr
=
'1'
THEN
cnt_en
<=
'0'
;
cnt_en
<=
'0'
;
ELSIF
ref_sync
=
'1'
THEN
-- use ref_sync have cnt_en aligned with ref_sync_reg
ELSIF
ref_sync_reg
=
'1'
THEN
-- use ref_sync_reg have cnt_en high aligned with ref_sync_reg2
cnt_en
<=
'1'
;
cnt_en
<=
'1'
;
END
IF
;
END
IF
;
END
IF
;
END
IF
;
...
@@ -181,13 +190,14 @@ BEGIN
...
@@ -181,13 +190,14 @@ BEGIN
);
);
END
GENERATE
;
END
GENERATE
;
-- Hold counter values at ref_sync_reg to have stable values for MM read for comparision between nodes
-- Hold counter values at ref_sync_reg2 to have stable values for MM read
-- for comparision between nodes
p_hold_counters
:
PROCESS
(
dp_clk
)
p_hold_counters
:
PROCESS
(
dp_clk
)
BEGIN
BEGIN
IF
rising_edge
(
dp_clk
)
THEN
IF
rising_edge
(
dp_clk
)
THEN
IF
cnt_clr
=
'1'
THEN
IF
cnt_clr
=
'1'
THEN
hold_cnt_arr
<=
(
OTHERS
=>
(
OTHERS
=>
'0'
));
hold_cnt_arr
<=
(
OTHERS
=>
(
OTHERS
=>
'0'
));
ELSIF
ref_sync_reg
=
'1'
THEN
ELSIF
ref_sync_reg
2
=
'1'
THEN
hold_cnt_arr
<=
cnt_arr
;
hold_cnt_arr
<=
cnt_arr
;
END
IF
;
END
IF
;
END
IF
;
END
IF
;
...
...
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