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
d375dbd1
Commit
d375dbd1
authored
3 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Explained use of t_comb.
parent
a425b849
No related branches found
No related tags found
1 merge request
!159
Use v.busy, instead of r.busy, to allow start_pulse at mm_done, to support...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/erko_hdl_design_article.txt
+13
-6
13 additions, 6 deletions
doc/erko_hdl_design_article.txt
with
13 additions
and
6 deletions
doc/erko_hdl_design_article.txt
+
13
−
6
View file @
d375dbd1
...
...
@@ -111,10 +111,16 @@ Implementation steps:
SIGNAL r : t_reg;
SIGNAL nxt_r : t_reg;
. -- Memoryless signals in p_comb (wires used as local auxiliary variables)
SIGNAL s : t_comb;
. -- Memoryless signals and auxiliary variables in p_comb
-- . For unique representation of variables in p_comb as signal wires, the p_comb
-- should assign each field in t_comb only once to a variable. It is allowed to
-- reasign a t_comb variable in p_comb, so use it as a temporary auxiliary
-- variable, but then only the last assignment value will be visible via the
-- signal dbg_wires in the Wave window.
SIGNAL dbg_wires : t_comb;
. -- Structural signals (wires used to connect components and IO)
. -- Structural signals (wires used to connect r, nxt_r to other components and to
-- the entity IO)
. -- Pipeline registers
SIGNAL in_data_p : ...
...
...
@@ -135,8 +141,9 @@ Implementation steps:
-- State variable
VARIABLE v : t_reg;
-- Auxiliary variables
VARIABLE v_* -- optional, use to improve code readability
-- use v. only on left side? use separate v_* to clearly indicate when we use it also on the right side of assignments ?
--VARIABLE v_* -- optional, use to improve code readability
-- -- use v. only on left side? use separate v_* to clearly indicate when we use it also on the right side of assignments ?
VARIABLE w : t_comb;
BEGIN
v := r; -- default keep existing state
v.* := ...; -- default force specific values, e.g. set strobes to '0',
...
...
@@ -152,7 +159,7 @@ Implementation steps:
nxt_r <= v;
-- memory less signals, only for view in wave window
s <=
d
;
dbg_wire
s <=
w
;
END PROCESS;
. -- Pipelining
...
...
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