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
c125bc0f
Commit
c125bc0f
authored
3 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Added tb_fft_lfsr.vhd.
parent
b2440f3d
No related branches found
No related tags found
1 merge request
!217
Resolve L2SDP-663
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/dsp/fft/hdllib.cfg
+4
-2
4 additions, 2 deletions
libraries/dsp/fft/hdllib.cfg
libraries/dsp/fft/tb/vhdl/tb_fft_lfsr.vhd
+92
-0
92 additions, 0 deletions
libraries/dsp/fft/tb/vhdl/tb_fft_lfsr.vhd
with
96 additions
and
2 deletions
libraries/dsp/fft/hdllib.cfg
+
4
−
2
View file @
c125bc0f
...
@@ -21,7 +21,8 @@ synth_files =
...
@@ -21,7 +21,8 @@ synth_files =
test_bench_files
=
test_bench_files
=
tb/vhdl/tb_fft_pkg.vhd
tb/vhdl/tb_fft_pkg.vhd
tb/vhdl/tb_fft_functions.vhd
tb/vhdl/tb_fft_functions.vhd
tb/vhdl/tb_fft_lfsr.vhd
tb/vhdl/tb_fft_switch.vhd
tb/vhdl/tb_fft_switch.vhd
tb/vhdl/tb_fft_sepa.vhd
tb/vhdl/tb_fft_sepa.vhd
tb/vhdl/tb_fft_reorder_sepa_pipe.vhd
tb/vhdl/tb_fft_reorder_sepa_pipe.vhd
...
@@ -32,11 +33,12 @@ test_bench_files =
...
@@ -32,11 +33,12 @@ test_bench_files =
tb/vhdl/tb_fft_wide_unit.vhd
tb/vhdl/tb_fft_wide_unit.vhd
tb/vhdl/tb_mmf_fft_r2.vhd
tb/vhdl/tb_mmf_fft_r2.vhd
tb/vhdl/tb_mmf_fft_wide_unit.vhd
tb/vhdl/tb_mmf_fft_wide_unit.vhd
tb/vhdl/tb_tb_fft_r2_pipe.vhd
tb/vhdl/tb_tb_fft_r2_pipe.vhd
tb/vhdl/tb_tb_fft_r2_par.vhd
tb/vhdl/tb_tb_fft_r2_par.vhd
tb/vhdl/tb_tb_fft_r2_wide.vhd
tb/vhdl/tb_tb_fft_r2_wide.vhd
regression_test_vhdl
=
regression_test_vhdl
=
tb/vhdl/tb_fft_lfsr.vhd
tb/vhdl/tb_fft_switch.vhd
tb/vhdl/tb_fft_switch.vhd
tb/vhdl/tb_tb_fft_r2_pipe.vhd
tb/vhdl/tb_tb_fft_r2_pipe.vhd
tb/vhdl/tb_tb_fft_r2_par.vhd
tb/vhdl/tb_tb_fft_r2_par.vhd
...
...
This diff is collapsed.
Click to expand it.
libraries/dsp/fft/tb/vhdl/tb_fft_lfsr.vhd
0 → 100644
+
92
−
0
View file @
c125bc0f
-------------------------------------------------------------------------------
--
-- Copyright 2021
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-------------------------------------------------------------------------------
--
-- Author: E. Kooistra
-- Purpose: Verify fft_lsfr for different seeds
-- Description:
-- Check that after c_fft_lfsr_len = 41 blocks the LFSR1 and LFSR2 bits of
-- the two instances u0 and u1 indeed start to differ.
--
-- Usage:
-- > as 4
-- > run -all
-- # Not self checking, manually compare that u0_lfsr_bit1 and u1_lfsr_bit1
-- start to differ after about c_fft_lfsr_len blocks. Similar for
-- u0_lfsr_bit1 and u1_lfsr_bit1.
LIBRARY
IEEE
,
common_lib
;
USE
IEEE
.
std_logic_1164
.
ALL
;
USE
work
.
fft_pkg
.
ALL
;
USE
common_lib
.
tb_common_pkg
.
ALL
;
ENTITY
tb_fft_lfsr
IS
END
tb_fft_lfsr
;
ARCHITECTURE
tb
OF
tb_fft_lfsr
IS
CONSTANT
clk_period
:
TIME
:
=
10
ns
;
CONSTANT
c_block_period
:
NATURAL
:
=
10
;
CONSTANT
c_nof_block
:
NATURAL
:
=
1000
;
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
SIGNAL
rst
:
STD_LOGIC
:
=
'1'
;
SIGNAL
clk
:
STD_LOGIC
:
=
'0'
;
SIGNAL
in_en
:
STD_LOGIC
:
=
'0'
;
SIGNAL
u0_lfsr_bit1
:
STD_LOGIC
;
SIGNAL
u1_lfsr_bit1
:
STD_LOGIC
;
SIGNAL
u0_lfsr_bit2
:
STD_LOGIC
;
SIGNAL
u1_lfsr_bit2
:
STD_LOGIC
;
BEGIN
clk
<=
NOT
clk
OR
tb_end
AFTER
clk_period
/
2
;
rst
<=
'1'
,
'0'
AFTER
10
*
clk_period
;
tb_end
<=
'0'
,
'1'
AFTER
c_nof_block
*
c_block_period
*
clk_period
;
proc_common_gen_pulse
(
1
,
c_block_period
,
'1'
,
rst
,
clk
,
in_en
);
u0
:
ENTITY
work
.
fft_lfsr
GENERIC
MAP
(
g_seed1
=>
fft_switch_new_seed
(
c_fft_switch_seed1
,
0
),
g_seed2
=>
fft_switch_new_seed
(
c_fft_switch_seed2
,
0
)
)
PORT
MAP
(
in_en
=>
in_en
,
out_bit1
=>
u0_lfsr_bit1
,
out_bit2
=>
u0_lfsr_bit2
,
clk
=>
clk
,
rst
=>
rst
);
u1
:
ENTITY
work
.
fft_lfsr
GENERIC
MAP
(
g_seed1
=>
fft_switch_new_seed
(
c_fft_switch_seed1
,
1
),
g_seed2
=>
fft_switch_new_seed
(
c_fft_switch_seed2
,
1
)
)
PORT
MAP
(
in_en
=>
in_en
,
out_bit1
=>
u1_lfsr_bit1
,
out_bit2
=>
u1_lfsr_bit2
,
clk
=>
clk
,
rst
=>
rst
);
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