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
2022e8a3
Commit
2022e8a3
authored
8 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Made tb self stopping, but not yet self checking.
parent
7c2dd679
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/common/tb/vhdl/tb_round.vhd
+19
-1
19 additions, 1 deletion
libraries/base/common/tb/vhdl/tb_round.vhd
with
19 additions
and
1 deletion
libraries/base/common/tb/vhdl/tb_round.vhd
+
19
−
1
View file @
2022e8a3
...
...
@@ -62,6 +62,7 @@ ARCHITECTURE tb OF tb_round IS
SIGNAL
out_udat
:
STD_LOGIC_VECTOR
(
c_out_dat_w
-1
DOWNTO
0
);
SIGNAL
out_tdat
:
STD_LOGIC_VECTOR
(
c_out_dat_w
-1
DOWNTO
0
);
-- truncate
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
SIGNAL
clk
:
STD_LOGIC
:
=
'1'
;
SIGNAL
rst
:
STD_LOGIC
:
=
'1'
;
...
...
@@ -70,9 +71,26 @@ ARCHITECTURE tb OF tb_round IS
BEGIN
-- Stimuli
clk
<=
NOT
(
clk
)
AFTER
clk_period
/
2
;
clk
<=
NOT
clk
OR
tb_end
AFTER
clk_period
/
2
;
rst
<=
'1'
,
'0'
AFTER
3
*
clk_period
;
-- Testbench end
p_tb_end
:
PROCESS
VARIABLE
v_dat
:
STD_LOGIC_VECTOR
(
in_dat
'RANGE
);
BEGIN
tb_end
<=
'0'
;
WAIT
UNTIL
in_val
=
'1'
;
WAIT
UNTIL
rising_edge
(
clk
);
v_dat
:
=
in_dat
;
-- keep first in_dat
WAIT
UNTIL
rising_edge
(
clk
);
WAIT
UNTIL
v_dat
=
in_dat
;
-- wait until all incrementing in_dat values have been applied at least once
WAIT
UNTIL
rising_edge
(
clk
);
WAIT
UNTIL
rising_edge
(
clk
);
WAIT
UNTIL
rising_edge
(
clk
);
tb_end
<=
'1'
;
WAIT
;
END
PROCESS
;
p_clk
:
PROCESS
(
rst
,
clk
)
BEGIN
IF
rst
=
'1'
THEN
...
...
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