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
3955f072
Commit
3955f072
authored
8 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Made tb self stopping using tb_end.
parent
1ad5e995
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/dsp/st/tb/vhdl/tb_st_acc.vhd
+7
-4
7 additions, 4 deletions
libraries/dsp/st/tb/vhdl/tb_st_acc.vhd
libraries/dsp/st/tb/vhdl/tb_st_calc.vhd
+5
-2
5 additions, 2 deletions
libraries/dsp/st/tb/vhdl/tb_st_calc.vhd
with
12 additions
and
6 deletions
libraries/dsp/st/tb/vhdl/tb_st_acc.vhd
+
7
−
4
View file @
3955f072
...
...
@@ -60,27 +60,28 @@ ARCHITECTURE tb OF tb_st_acc IS
RETURN
TO_SVEC
(
v_result
,
g_acc_w
);
END
;
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
SIGNAL
clk
:
STD_LOGIC
:
=
'0'
;
SIGNAL
in_dat
:
STD_LOGIC_VECTOR
(
g_dat_w
-1
DOWNTO
0
);
SIGNAL
in_acc
:
STD_LOGIC_VECTOR
(
g_acc_w
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
'0'
);
SIGNAL
in_val
:
STD_LOGIC
;
SIGNAL
in_load
:
STD_LOGIC
;
SIGNAL
out_acc
:
STD_LOGIC_VECTOR
(
g_acc_w
-1
DOWNTO
0
);
SIGNAL
out_val
:
STD_LOGIC
;
SIGNAL
out_acc
:
STD_LOGIC_VECTOR
(
g_acc_w
-1
DOWNTO
0
);
SIGNAL
expected_acc
:
STD_LOGIC_VECTOR
(
g_acc_w
-1
DOWNTO
0
);
SIGNAL
expected_acc_p
:
STD_LOGIC_VECTOR
(
g_acc_w
-1
DOWNTO
0
);
SIGNAL
expected_acc
:
STD_LOGIC_VECTOR
(
g_acc_w
-1
DOWNTO
0
);
BEGIN
clk
<=
NOT
clk
AFTER
clk_period
/
2
;
clk
<=
NOT
clk
OR
tb_end
AFTER
clk_period
/
2
;
------------------------------------------------------------------------------
-- Input stimuli
------------------------------------------------------------------------------
-- run
10 us
-- run
-all
p_stimuli
:
PROCESS
BEGIN
in_load
<=
'0'
;
...
...
@@ -107,6 +108,8 @@ BEGIN
END
LOOP
;
in_load
<=
'1'
;
-- keep '1' to avoid further toggling of out_acc (in a real design this would safe power)
in_val
<=
'0'
;
FOR
I
IN
0
TO
9
LOOP
WAIT
UNTIL
rising_edge
(
clk
);
END
LOOP
;
tb_end
<=
'1'
;
WAIT
;
END
PROCESS
;
...
...
This diff is collapsed.
Click to expand it.
libraries/dsp/st/tb/vhdl/tb_st_calc.vhd
+
5
−
2
View file @
3955f072
...
...
@@ -44,8 +44,9 @@ ARCHITECTURE tb OF tb_st_calc IS
CONSTANT
c_nof_accum_per_sync
:
NATURAL
:
=
5
;
-- integration time
SIGNAL
rst
:
STD_LOGIC
;
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
SIGNAL
clk
:
STD_LOGIC
:
=
'0'
;
SIGNAL
rst
:
STD_LOGIC
;
SIGNAL
in_sync
:
STD_LOGIC
;
SIGNAL
in_val
:
STD_LOGIC
;
...
...
@@ -63,7 +64,7 @@ ARCHITECTURE tb OF tb_st_calc IS
BEGIN
clk
<=
NOT
clk
AFTER
clk_period
/
2
;
clk
<=
NOT
clk
OR
tb_end
AFTER
clk_period
/
2
;
in_a_re
<=
in_dat
;
in_a_im
<=
in_dat
;
...
...
@@ -95,6 +96,8 @@ BEGIN
FOR
I
IN
0
TO
c_gap_size
-1
LOOP
WAIT
UNTIL
rising_edge
(
clk
);
END
LOOP
;
END
LOOP
;
END
LOOP
;
FOR
I
IN
0
TO
9
LOOP
WAIT
UNTIL
rising_edge
(
clk
);
END
LOOP
;
tb_end
<=
'1'
;
WAIT
;
END
PROCESS
;
...
...
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