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
7c2dd679
Commit
7c2dd679
authored
8 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Made tb self stopping.
parent
b9c26b2c
No related branches found
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_resize.vhd
+21
-3
21 additions, 3 deletions
libraries/base/common/tb/vhdl/tb_resize.vhd
with
21 additions
and
3 deletions
libraries/base/common/tb/vhdl/tb_resize.vhd
+
21
−
3
View file @
7c2dd679
...
...
@@ -59,16 +59,34 @@ ARCHITECTURE tb OF tb_resize IS
SIGNAL
out_sovr
:
STD_LOGIC
;
SIGNAL
out_uovr
:
STD_LOGIC
;
SIGNAL
rst
:
STD_LOGIC
;
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
SIGNAL
clk
:
STD_LOGIC
:
=
'1'
;
SIGNAL
rst
:
STD_LOGIC
;
CONSTANT
c_init
:
STD_LOGIC_VECTOR
(
in_dat
'RANGE
)
:
=
(
OTHERS
=>
'0'
);
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
...
...
@@ -136,7 +154,7 @@ BEGIN
out_ovr
=>
out_uovr
);
-- Veri
c
fication
-- Verification
p_verify_increase
:
PROCESS
BEGIN
WAIT
UNTIL
rising_edge
(
clk
);
...
...
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