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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
29d1a089
Commit
29d1a089
authored
4 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Simulate multiple in_sync intervals to show output out_sync.
parent
bd223117
No related branches found
No related tags found
1 merge request
!100
Removed text for XSub that is now written in Confluence Subband correlator...
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
applications/lofar1/pft2/tb/vhdl/tb_pft2.vhd
+25
-20
25 additions, 20 deletions
applications/lofar1/pft2/tb/vhdl/tb_pft2.vhd
applications/lofar1/pft2/tb/vhdl/tb_tb_pft2.vhd
+21
-18
21 additions, 18 deletions
applications/lofar1/pft2/tb/vhdl/tb_tb_pft2.vhd
with
46 additions
and
38 deletions
applications/lofar1/pft2/tb/vhdl/tb_pft2.vhd
+
25
−
20
View file @
29d1a089
...
@@ -66,19 +66,21 @@ ENTITY tb_pft2 IS
...
@@ -66,19 +66,21 @@ ENTITY tb_pft2 IS
--g_name_x : STRING := "u_noise";
--g_name_x : STRING := "u_noise";
-- Select one input signal for Y (used as imag input to the PFT)
-- Select one input signal for Y (used as imag input to the PFT)
--g_name_y : STRING := "cosin_N2"
--g_name_y : STRING := "cosin_N2";
--g_name_y : STRING := "cosin_1"
--g_name_y : STRING := "cosin_1";
--g_name_y : STRING := "cosin_39"
--g_name_y : STRING := "cosin_39";
--g_name_y : STRING := "sinus_1"
--g_name_y : STRING := "sinus_1";
--g_name_y : STRING := "sinus_13"
--g_name_y : STRING := "sinus_13";
--g_name_y : STRING := "sinus_13s"
--g_name_y : STRING := "sinus_13s";
--g_name_y : STRING := "impulse_0"
--g_name_y : STRING := "impulse_0";
--g_name_y : STRING := "impulse_1"
--g_name_y : STRING := "impulse_1";
g_name_y
:
STRING
:
=
"zeros"
-- For PFT_MODE_BITREV and PFT_MODE_COMPLEX select zeros for Y input.
g_name_y
:
STRING
:
=
"zeros"
;
-- For PFT_MODE_BITREV and PFT_MODE_COMPLEX select zeros for Y input.
--g_name_y : STRING := "dc"
--g_name_y : STRING := "dc";
--g_name_y : STRING := "block_1"
--g_name_y : STRING := "block_1";
--g_name_y : STRING := "block_117"
--g_name_y : STRING := "block_117";
--g_name_y : STRING := "u_noise"
--g_name_y : STRING := "u_noise";
g_repeat
:
NATURAL
:
=
2
-- minimal 2 due to PFT latency
--g_repeat : NATURAL := 10 -- > c_nof_block_per_sync to view multiple in_sync and out_sync intervals
);
);
END
tb_pft2
;
END
tb_pft2
;
...
@@ -90,12 +92,12 @@ ARCHITECTURE tb OF tb_pft2 IS
...
@@ -90,12 +92,12 @@ ARCHITECTURE tb OF tb_pft2 IS
CONSTANT
c_in_dat_w
:
NATURAL
:
=
18
;
CONSTANT
c_in_dat_w
:
NATURAL
:
=
18
;
CONSTANT
c_out_dat_w
:
NATURAL
:
=
18
;
CONSTANT
c_out_dat_w
:
NATURAL
:
=
18
;
CONSTANT
c_nof_block_per_sync
:
NATURAL
:
=
2
;
-- The input stimuli signals are located in c_tst_data_dir and have been
-- The input stimuli signals are located in c_tst_data_dir and have been
-- generated with TC 5.2 and are used in the PFT continuous test TC 5.19.
-- generated with TC 5.2 and are used in the PFT continuous test TC 5.19.
CONSTANT
c_tst_data_dir
:
STRING
:
=
"data/"
;
CONSTANT
c_tst_data_dir
:
STRING
:
=
"data/"
;
CONSTANT
c_repeat
:
NATURAL
:
=
2
;
-- minimal 2 due to PFT latency
-- Maximum quantization error in PFT output
-- Maximum quantization error in PFT output
CONSTANT
c_diff_max
:
NATURAL
:
=
20
;
-- Maximum quantization error in PFT output, as used in tc.tcl
CONSTANT
c_diff_max
:
NATURAL
:
=
20
;
-- Maximum quantization error in PFT output, as used in tc.tcl
--CONSTANT c_diff_max : NATURAL := 10; -- value per subband
--CONSTANT c_diff_max : NATURAL := 10; -- value per subband
...
@@ -122,6 +124,7 @@ ARCHITECTURE tb OF tb_pft2 IS
...
@@ -122,6 +124,7 @@ ARCHITECTURE tb OF tb_pft2 IS
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
SIGNAL
clk
:
STD_LOGIC
:
=
'1'
;
SIGNAL
clk
:
STD_LOGIC
:
=
'1'
;
SIGNAL
rst
:
STD_LOGIC
:
=
'1'
;
SIGNAL
rst
:
STD_LOGIC
:
=
'1'
;
SIGNAL
rst_sync
:
STD_LOGIC
:
=
'1'
;
-- PFT input stimuli from file
-- PFT input stimuli from file
SIGNAL
in_en
:
STD_LOGIC
;
SIGNAL
in_en
:
STD_LOGIC
;
...
@@ -310,10 +313,12 @@ BEGIN
...
@@ -310,10 +313,12 @@ BEGIN
clk
<=
(
NOT
clk
)
OR
tb_end
AFTER
c_clk_period
/
2
;
clk
<=
(
NOT
clk
)
OR
tb_end
AFTER
c_clk_period
/
2
;
in_sync
<=
'0'
,
'1'
AFTER
c_clk_period
*
c_rst_period
*
2
,
'0'
AFTER
c_clk_period
*
(
c_rst_period
*
2
+
1
);
in_en
<=
'0'
,
'1'
AFTER
c_clk_period
*
c_rst_period
*
2
;
in_en
<=
'0'
,
'1'
AFTER
c_clk_period
*
c_rst_period
*
2
;
in_val
<=
in_val_x
;
in_val
<=
in_val_x
;
rst_sync
<=
'1'
,
'0'
AFTER
c_clk_period
*
(
c_rst_period
*
2
-
1
);
-- start in_sync pulse interval 1 clk cycle before first in_val = '1'
proc_common_gen_pulse
(
1
,
c_nof_block_per_sync
*
c_fft_size
,
'1'
,
rst_sync
,
clk
,
in_sync
);
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Input X, Y data
-- Input X, Y data
...
@@ -322,7 +327,7 @@ BEGIN
...
@@ -322,7 +327,7 @@ BEGIN
u_in_x
:
ENTITY
tst_lib
.
tst_input
u_in_x
:
ENTITY
tst_lib
.
tst_input
GENERIC
MAP
(
GENERIC
MAP
(
g_file_name
=>
c_file_pft_in_x
,
g_file_name
=>
c_file_pft_in_x
,
g_file_repeat
=>
c
_repeat
,
g_file_repeat
=>
g
_repeat
,
g_nof_data
=>
1
,
g_nof_data
=>
1
,
g_data_width
=>
c_in_dat_w
,
g_data_width
=>
c_in_dat_w
,
g_data_type
=>
"SIGNED"
g_data_type
=>
"SIGNED"
...
@@ -338,7 +343,7 @@ BEGIN
...
@@ -338,7 +343,7 @@ BEGIN
u_in_y
:
ENTITY
tst_lib
.
tst_input
u_in_y
:
ENTITY
tst_lib
.
tst_input
GENERIC
MAP
(
GENERIC
MAP
(
g_file_name
=>
c_file_pft_in_y
,
g_file_name
=>
c_file_pft_in_y
,
g_file_repeat
=>
c
_repeat
,
g_file_repeat
=>
g
_repeat
,
g_nof_data
=>
1
,
g_nof_data
=>
1
,
g_data_width
=>
c_in_dat_w
,
g_data_width
=>
c_in_dat_w
,
g_data_type
=>
"SIGNED"
g_data_type
=>
"SIGNED"
...
...
This diff is collapsed.
Click to expand it.
applications/lofar1/pft2/tb/vhdl/tb_tb_pft2.vhd
+
21
−
18
View file @
29d1a089
...
@@ -75,26 +75,29 @@ BEGIN
...
@@ -75,26 +75,29 @@ BEGIN
--g_name_y : STRING := "block_1"
--g_name_y : STRING := "block_1"
--g_name_y : STRING := "block_117"
--g_name_y : STRING := "block_117"
--g_name_y : STRING := "u_noise"
--g_name_y : STRING := "u_noise"
--
--g_repeat : NATURAL := 2 -- minimal 2 due to PFT latency
--g_repeat : NATURAL := 10 -- > c_nof_block_per_sync to view multiple in_sync and out_sync intervals
u_cosin_N2
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"cosin_N2"
,
"zeros"
);
u_cosin_N2
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"cosin_N2"
,
"zeros"
,
2
);
u_cosin_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"cosin_1"
,
"zeros"
);
u_cosin_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"cosin_1"
,
"zeros"
,
2
);
u_cosin_39
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"cosin_39"
,
"zeros"
);
u_cosin_39
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"cosin_39"
,
"zeros"
,
2
);
u_sinus_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"sinus_1"
,
"zeros"
);
u_sinus_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"sinus_1"
,
"zeros"
,
2
);
u_sinus_13
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"sinus_13"
,
"zeros"
);
u_sinus_13
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"sinus_13"
,
"zeros"
,
2
);
u_sinus_13s
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"sinus_13s"
,
"zeros"
);
u_sinus_13s
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"sinus_13s"
,
"zeros"
,
2
);
u_impulse_0
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"impulse_0"
,
"zeros"
);
u_impulse_0
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"impulse_0"
,
"zeros"
,
2
);
u_impulse_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"impulse_1"
,
"zeros"
);
u_impulse_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"impulse_1"
,
"zeros"
,
2
);
u_zeros
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"zeros"
,
"zeros"
);
u_zeros
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"zeros"
,
"zeros"
,
2
);
--
u_dc : ENTITY work.tb_pft2 GENERIC MAP(PFT_MODE_REAL2, "dc" , "zeros");
u_dc
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"dc"
,
"zeros"
,
2
);
u_block_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"block_1"
,
"zeros"
);
u_block_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"block_1"
,
"zeros"
,
2
);
u_block_117
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"block_117"
,
"zeros"
);
u_block_117
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"block_117"
,
"zeros"
,
2
);
u_u_noise
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"u_noise"
,
"zeros"
);
u_u_noise
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"u_noise"
,
"zeros"
,
2
);
u_impulse_0_impulse_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"impulse_0"
,
"impulse_1"
);
u_impulse_0_impulse_1
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"impulse_0"
,
"impulse_1"
,
2
);
--
u_dc_cosin_N2 : ENTITY work.tb_pft2 GENERIC MAP(PFT_MODE_REAL2,
"dc"
,
"cosin_N2");
u_dc_cosin_N2
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"dc"
,
"cosin_N2"
,
2
);
--
u_dc_sinus_13 : ENTITY work.tb_pft2 GENERIC MAP(PFT_MODE_REAL2,
"dc"
,
"sinus_13");
u_dc_sinus_13
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"dc"
,
"sinus_13"
,
2
);
u_block_117_u_noise
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"block_117"
,
"u_noise"
);
u_block_117_u_noise
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"block_117"
,
"u_noise"
,
2
);
u_u_noise_u_noise
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"u_noise"
,
"u_noise"
);
u_u_noise_u_noise
:
ENTITY
work
.
tb_pft2
GENERIC
MAP
(
PFT_MODE_REAL2
,
"u_noise"
,
"u_noise"
,
2
);
END
tb
;
END
tb
;
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