Skip to content
GitLab
Explore
Sign in
Register
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
6e262dac
Commit
6e262dac
authored
3 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Use separate g_in_rst_level.
parent
ef076bc5
Branches
Branches containing commit
No related tags found
1 merge request
!171
Resolve L2SDP-538
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/common/src/vhdl/common_areset.vhd
+23
-17
23 additions, 17 deletions
libraries/base/common/src/vhdl/common_areset.vhd
with
23 additions
and
17 deletions
libraries/base/common/src/vhdl/common_areset.vhd
+
23
−
17
View file @
6e262dac
...
@@ -19,11 +19,18 @@
...
@@ -19,11 +19,18 @@
--
--
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Author: E. Kooistra
-- Purpose: Immediately apply reset and synchronously release it at rising clk
-- Purpose: Immediately apply reset and synchronously release it at rising clk
-- Description:
-- Description:
-- Using common_areset is equivalent to using common_async with same signal
-- When in_rst gets asserted, then the out_rst gets asserted immediately (= asynchronous reset apply).
-- applied to rst and din.
-- When in_rst gets de-assered, then out_rst gets de-asserted after g_delay_len cycles (= synchronous reset release).
--
-- The in_rst assert level is set by g_in_rst_level.
-- The out_rst assert level is set by c_out_rst_level = g_rst_level.
--
-- Remarks:
-- . The in_rst can also synchronise other signals than a reset, e.g. a locked signal from a PLL.
LIBRARY
IEEE
;
LIBRARY
IEEE
;
USE
IEEE
.
std_logic_1164
.
ALL
;
USE
IEEE
.
std_logic_1164
.
ALL
;
...
@@ -31,7 +38,9 @@ USE work.common_pkg.ALL;
...
@@ -31,7 +38,9 @@ USE work.common_pkg.ALL;
ENTITY
common_areset
IS
ENTITY
common_areset
IS
GENERIC
(
GENERIC
(
g_rst_level
:
STD_LOGIC
:
=
'1'
;
g_in_rst_level
:
STD_LOGIC
:
=
'1'
;
-- = in_rst level
g_rst_level
:
STD_LOGIC
:
=
'1'
;
-- = out_rst level (keep original generic
-- name for backward compatibility)
g_delay_len
:
NATURAL
:
=
c_meta_delay_len
g_delay_len
:
NATURAL
:
=
c_meta_delay_len
);
);
PORT
(
PORT
(
...
@@ -44,27 +53,24 @@ END;
...
@@ -44,27 +53,24 @@ END;
ARCHITECTURE
str
OF
common_areset
IS
ARCHITECTURE
str
OF
common_areset
IS
CONSTANT
c_rst_level_n
:
STD_LOGIC
:
=
NOT
g_rst_level
;
CONSTANT
c_out_rst_level
:
STD_LOGIC
:
=
g_rst_level
;
CONSTANT
c_out_rst_level_n
:
STD_LOGIC
:
=
NOT
g_rst_level
;
SIGNAL
i_rst
:
STD_LOGIC
;
SIGNAL
i_rst
:
STD_LOGIC
;
BEGIN
-- When in_rst becomes g_rst_level then out_rst follows immediately (asynchronous reset apply).
BEGIN
-- When in_rst becomes NOT g_rst_level then out_rst follows after g_delay_len cycles (synchronous reset release).
-- This block can also synchronise other signals than reset:
i_rst
<=
in_rst
WHEN
g_in_rst_level
=
'1'
ELSE
NOT
in_rst
;
-- . g_rst_level = '0': output asynchronoulsy follows the falling edge input and synchronises the rising edge input.
-- . g_rst_level = '1': output asynchronoulsy follows the rising edge input and synchronises the falling edge input.
i_rst
<=
NOT
in_rst
WHEN
g_rst_level
=
'0'
ELSE
in_rst
;
u_async
:
ENTITY
work
.
common_async
u_async
:
ENTITY
work
.
common_async
GENERIC
MAP
(
GENERIC
MAP
(
g_rst_level
=>
g
_rst_level
,
g_rst_level
=>
c_out
_rst_level
,
g_delay_len
=>
g_delay_len
g_delay_len
=>
g_delay_len
)
)
PORT
MAP
(
PORT
MAP
(
rst
=>
i_rst
,
rst
=>
i_rst
,
clk
=>
clk
,
clk
=>
clk
,
din
=>
c_rst_level_n
,
din
=>
c_
out_
rst_level_n
,
dout
=>
out_rst
dout
=>
out_rst
);
);
...
...
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