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
f4ae45f6
Commit
f4ae45f6
authored
7 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Introduced g_delayed_lo to be able to specify the delay more finely.
parent
a542f242
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/common/src/vhdl/common_stable_delayed.vhd
+21
-7
21 additions, 7 deletions
libraries/base/common/src/vhdl/common_stable_delayed.vhd
with
21 additions
and
7 deletions
libraries/base/common/src/vhdl/common_stable_delayed.vhd
+
21
−
7
View file @
f4ae45f6
...
...
@@ -29,15 +29,21 @@ USE common_lib.common_pkg.ALL;
-- Description:
-- This function can be used to filter out temporary toggling in r_in. The
-- r_stable only becomes active after r_in has remained active for
-- 2**
(
g_delayed_w
-1)
clk cycles. The r_stable always goes
inactive when
-- r_in is inactive.
The active level can be set with g_active_level to '1'
-- or '0'.
-- 2**g_delayed_w
- 2**g_delayed_lo
clk cycles. The r_stable always goes
--
inactive when
r_in is inactive.
--
The active level can be set with g_active_level to '1'
or '0'.
-- Remarks:
-- . Verified with tb_lvdsh_dd_phs4.vhd, because there this was used first.
-- . Instead of the combination of g_delayed_w and g_delayed_lo a single
-- g_delayed NATURAL could have been used to exactly specify the delay.
-- However then delays larger than 2**31 would be complicated due to the
-- limited 31 bit range of a NATURAL in VHDL.
ENTITY
common_stable_delayed
IS
GENERIC
(
g_active_level
:
STD_LOGIC
:
=
'1'
;
g_delayed_w
:
NATURAL
:
=
8
g_delayed_w
:
NATURAL
:
=
8
;
g_delayed_lo
:
NATURAL
:
=
7
-- choose <= g_delayed_hi = g_delayed_w-1
);
PORT
(
rst
:
IN
STD_LOGIC
;
...
...
@@ -65,7 +71,17 @@ BEGIN
r_stable
<=
p_stable
WHEN
g_active_level
=
'1'
ELSE
NOT
p_stable
;
cnt_clr
<=
NOT
p_in
;
cnt_en
<=
NOT
cnt
(
cnt
'HIGH
);
p_clk
:
PROCESS
(
rst
,
clk
)
BEGIN
IF
rst
=
'1'
THEN
cnt_en
<=
'0'
;
p_stable
<=
'0'
;
ELSIF
rising_edge
(
clk
)
THEN
cnt_en
<=
NOT
vector_and
(
cnt
(
g_delayed_w
-1
DOWNTO
g_delayed_lo
));
p_stable
<=
vector_and
(
cnt
(
g_delayed_w
-1
DOWNTO
g_delayed_lo
));
END
IF
;
END
PROCESS
;
u_common_counter
:
ENTITY
common_lib
.
common_counter
GENERIC
MAP
(
...
...
@@ -79,6 +95,4 @@ BEGIN
count
=>
cnt
);
p_stable
<=
cnt
(
cnt
'HIGH
);
END
rtl
;
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