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
29335661
Commit
29335661
authored
3 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Verify zero gap, diff_delay_max and pipeline and read latency.
parent
3902d2dd
No related branches found
Branches containing commit
No related tags found
1 merge request
!159
Use v.busy, instead of r.busy, to allow start_pulse at mm_done, to support...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/base/dp/tb/vhdl/tb_dp_bsn_align_v2.vhd
+22
-16
22 additions, 16 deletions
libraries/base/dp/tb/vhdl/tb_dp_bsn_align_v2.vhd
libraries/base/dp/tb/vhdl/tb_tb_dp_bsn_align_v2.vhd
+12
-9
12 additions, 9 deletions
libraries/base/dp/tb/vhdl/tb_tb_dp_bsn_align_v2.vhd
with
34 additions
and
25 deletions
libraries/base/dp/tb/vhdl/tb_dp_bsn_align_v2.vhd
+
22
−
16
View file @
29335661
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
-- . DUT alignment of g_nof_streams
-- . DUT alignment of g_nof_streams
-- . DUT restart via g_tb_nof_restart > 1
-- . DUT restart via g_tb_nof_restart > 1
-- . gaps or no gaps between blocks via g_block_period >= g_block_size
-- . gaps or no gaps between blocks via g_block_period >= g_block_size
-- . g_bsn_latency_max in combination with g_tb_diff_delay
_max
-- . g_bsn_latency_max in combination with g_tb_diff_delay
-- . g_use_mm_output using DUT MM to DP or external MM to DP in tb
-- . g_use_mm_output using DUT MM to DP or external MM to DP in tb
-- . g_replacement_value for a remote g_disable_stream (one is enough
-- . g_replacement_value for a remote g_disable_stream (one is enough
-- to verify), the local stream cannot be disabled.
-- to verify), the local stream cannot be disabled.
...
@@ -46,20 +46,21 @@ ENTITY tb_dp_bsn_align_v2 IS
...
@@ -46,20 +46,21 @@ ENTITY tb_dp_bsn_align_v2 IS
GENERIC
(
GENERIC
(
-- DUT
-- DUT
g_nof_streams
:
NATURAL
:
=
2
;
-- number of input and output streams
g_nof_streams
:
NATURAL
:
=
2
;
-- number of input and output streams
g_bsn_latency_max
:
NATURAL
:
=
2
;
-- Maximum travel latency of a remote block in number of block periods T_blk
g_bsn_latency_max
:
NATURAL
:
=
1
;
-- Maximum travel latency of a remote block in number of block periods T_blk
g_nof_aligners_max
:
POSITIVE
:
=
1
;
-- 1 when only align at last node, > 1 when align at every intermediate node
g_nof_aligners_max
:
POSITIVE
:
=
1
;
-- 1 when only align at last node, > 1 when align at every intermediate node
g_block_size
:
NATURAL
:
=
11
;
-- > 1, g_block_size=1 is not supported
g_block_size
:
NATURAL
:
=
11
;
-- > 1, g_block_size=1 is not supported
g_block_period
:
NATURAL
:
=
20
;
-- >= g_block_size, = g_block_size + c_gap_size
g_block_period
:
NATURAL
:
=
20
;
-- >= g_block_size, = g_block_size + c_gap_size
g_bsn_w
:
NATURAL
:
=
c_dp_stream_bsn_w
;
-- number of bits in sosi BSN
g_bsn_w
:
NATURAL
:
=
c_dp_stream_bsn_w
;
-- number of bits in sosi BSN
g_data_w
:
NATURAL
:
=
16
;
-- number of bits in sosi data
g_data_w
:
NATURAL
:
=
16
;
-- number of bits in sosi data
g_replacement_value
:
INTEGER
:
=
17
;
-- output sosi data replacement value for missing input blocks
g_replacement_value
:
INTEGER
:
=
17
;
-- output sosi data replacement value for missing input blocks
g_disable_stream
:
NATURAL
:
=
1
;
-- default 0 to enable all streams, > 0 selects stream that will be disabled
g_disable_stream
:
NATURAL
:
=
0
;
-- default 0 to enable all streams, > 0 selects stream that will be disabled
g_use_mm_output
:
BOOLEAN
:
=
FALSE
;
-- output via MM or via streaming DP
g_use_mm_output
:
BOOLEAN
:
=
FALSE
;
-- output via MM or via streaming DP
g_pipeline_input
:
NATURAL
:
=
1
;
-- >= 0, choose 0 for wires, choose 1 to ease timing closure
g_pipeline_input
:
NATURAL
:
=
0
;
-- >= 0, choose 0 for wires, choose 1 to ease timing closure
g_rd_latency
:
NATURAL
:
=
2
;
-- 1 or 2, choose 2 to ease timing closure
g_rd_latency
:
NATURAL
:
=
1
;
-- 1 or 2, choose 2 to ease timing closure
-- TB
-- TB
g_tb_diff_delay_max
:
NATURAL
:
=
10
;
-- maximum nof clk delay between any inputs, <= c_align_latency_nof_clk
g_tb_diff_delay
:
INTEGER
:
=
0
;
-- 0 = aligned inputs, -1 = max input delay for no loss,
-- >~ g_bsn_latency_max * g_block_period will give loss
g_tb_nof_restart
:
NATURAL
:
=
2
;
-- number of times to restart the input stimuli
g_tb_nof_restart
:
NATURAL
:
=
2
;
-- number of times to restart the input stimuli
g_tb_nof_blocks
:
NATURAL
:
=
20
-- number of input blocks per restart
g_tb_nof_blocks
:
NATURAL
:
=
20
-- number of input blocks per restart
);
);
...
@@ -79,8 +80,20 @@ ARCHITECTURE tb OF tb_dp_bsn_align_v2 IS
...
@@ -79,8 +80,20 @@ ARCHITECTURE tb OF tb_dp_bsn_align_v2 IS
CONSTANT
c_sync_period
:
NATURAL
:
=
7
;
CONSTANT
c_sync_period
:
NATURAL
:
=
7
;
CONSTANT
c_sync_offset
:
NATURAL
:
=
2
;
CONSTANT
c_sync_offset
:
NATURAL
:
=
2
;
-- maximum nof clk delay between any inputs, <= c_align_latency_nof_clk
-- . the -1 is due to some acceptable pipeline detail related to dp_block_from_mm
CONSTANT
c_diff_delay_max
:
NATURAL
:
=
g_bsn_latency_max
*
g_block_period
-
sel_a_b
(
g_rd_latency
>
1
,
0
,
1
);
CONSTANT
c_diff_delay
:
NATURAL
:
=
sel_a_b
(
g_tb_diff_delay
<
0
,
c_diff_delay_max
,
g_tb_diff_delay
);
-- Return input delay as function of inputs stream index I
FUNCTION
func_input_delay
(
I
:
NATURAL
)
RETURN
NATURAL
IS
BEGIN
RETURN
c_diff_delay
*
I
/
(
g_nof_streams
-
1
);
END
;
CONSTANT
c_gap_size
:
NATURAL
:
=
g_block_period
-
g_block_size
;
CONSTANT
c_gap_size
:
NATURAL
:
=
g_block_period
-
g_block_size
;
CONSTANT
c_dut_latency
:
NATURAL
:
=
g_pipeline_input
+
g_rd_latency
+
2
;
CONSTANT
c_mm_to_dp_latency
:
NATURAL
:
=
1
;
CONSTANT
c_dut_latency
:
NATURAL
:
=
g_pipeline_input
+
g_rd_latency
+
c_mm_to_dp_latency
;
CONSTANT
c_align_latency_nof_blocks
:
NATURAL
:
=
g_bsn_latency_max
;
-- DUT buffer latency in number blocks
CONSTANT
c_align_latency_nof_blocks
:
NATURAL
:
=
g_bsn_latency_max
;
-- DUT buffer latency in number blocks
CONSTANT
c_align_latency_nof_valid
:
NATURAL
:
=
g_bsn_latency_max
*
g_block_size
;
-- DUT buffer latency in number of data samples
CONSTANT
c_align_latency_nof_valid
:
NATURAL
:
=
g_bsn_latency_max
*
g_block_size
;
-- DUT buffer latency in number of data samples
CONSTANT
c_align_latency_nof_clk
:
NATURAL
:
=
g_bsn_latency_max
*
g_block_period
;
-- DUT buffer latency in number clk cycles
CONSTANT
c_align_latency_nof_clk
:
NATURAL
:
=
g_bsn_latency_max
*
g_block_period
;
-- DUT buffer latency in number clk cycles
...
@@ -164,14 +177,7 @@ ARCHITECTURE tb OF tb_dp_bsn_align_v2 IS
...
@@ -164,14 +177,7 @@ ARCHITECTURE tb OF tb_dp_bsn_align_v2 IS
SIGNAL
expected_out_bsn_arr
:
t_bsn_arr
;
SIGNAL
expected_out_bsn_arr
:
t_bsn_arr
;
SIGNAL
expected_out_data_arr
:
t_data_arr
;
SIGNAL
expected_out_data_arr
:
t_data_arr
;
-- Return input delay as function of inputs stream index I
SIGNAL
dbg_func_delay_max
:
NATURAL
:
=
func_input_delay
(
g_nof_streams
-
1
);
FUNCTION
func_input_delay
(
I
:
NATURAL
)
RETURN
NATURAL
IS
BEGIN
RETURN
g_tb_diff_delay_max
*
I
/
(
g_nof_streams
-
1
);
END
;
SIGNAL
dbg_tb_diff_delay_max
:
NATURAL
:
=
g_tb_diff_delay_max
;
SIGNAL
dbg_func_delay_max
:
NATURAL
:
=
func_input_delay
(
g_nof_streams
-
1
);
BEGIN
BEGIN
...
@@ -306,7 +312,7 @@ BEGIN
...
@@ -306,7 +312,7 @@ BEGIN
-- because the DUT has no flow control and has a fixed latency.
-- because the DUT has no flow control and has a fixed latency.
p_verify_sosi_en_arr
:
PROCESS
(
out_sosi_exp
)
p_verify_sosi_en_arr
:
PROCESS
(
out_sosi_exp
)
BEGIN
BEGIN
IF
g_tb
_diff_delay
_max
<=
c_align_latency_nof_clk
THEN
IF
c
_diff_delay
<=
c_align_latency_nof_clk
THEN
verify_sosi_en_arr
<=
(
OTHERS
=>
'1'
);
verify_sosi_en_arr
<=
(
OTHERS
=>
'1'
);
IF
TO_UINT
(
out_sosi_exp
.
bsn
)
-
c_bsn_init
>=
c_verify_nof_blocks
THEN
IF
TO_UINT
(
out_sosi_exp
.
bsn
)
-
c_bsn_init
>=
c_verify_nof_blocks
THEN
verify_sosi_en_arr
<=
(
OTHERS
=>
'0'
);
verify_sosi_en_arr
<=
(
OTHERS
=>
'0'
);
...
...
This diff is collapsed.
Click to expand it.
libraries/base/dp/tb/vhdl/tb_tb_dp_bsn_align_v2.vhd
+
12
−
9
View file @
29335661
...
@@ -34,11 +34,10 @@ END tb_tb_dp_bsn_align_v2;
...
@@ -34,11 +34,10 @@ END tb_tb_dp_bsn_align_v2;
ARCHITECTURE
tb
OF
tb_tb_dp_bsn_align_v2
IS
ARCHITECTURE
tb
OF
tb_tb_dp_bsn_align_v2
IS
CONSTANT
c_bsn_latency_max
:
POSITIVE
:
=
1
;
CONSTANT
c_block
:
NATURAL
:
=
11
;
CONSTANT
c_block
:
NATURAL
:
=
11
;
CONSTANT
c_period
:
NATURAL
:
=
20
;
CONSTANT
c_period
:
NATURAL
:
=
20
;
CONSTANT
c_
delay_max
:
NATURAL
:
=
c_bsn_latency_max
*
c_period
;
CONSTANT
c_
nof_blk
:
NATURAL
:
=
30
;
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
-- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
SIGNAL
tb_end
:
STD_LOGIC
:
=
'0'
;
-- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
BEGIN
BEGIN
...
@@ -58,15 +57,19 @@ BEGIN
...
@@ -58,15 +57,19 @@ BEGIN
-- g_rd_latency : NATURAL := 2; -- 1 or 2, choose 2 to ease timing closure
-- g_rd_latency : NATURAL := 2; -- 1 or 2, choose 2 to ease timing closure
--
--
-- -- TB
-- -- TB
-- g_tb_diff_delay_max : NATURAL := 45; -- maximum nof clk delay between any inputs, <= c_align_latency
-- g_tb_diff_delay : INTEGER := 0; -- 0 = aligned inputs, -1 = max input delay for no loss,
-- -- >~ g_bsn_latency_max * g_block_period will give loss
-- g_tb_nof_restart : NATURAL := 1; -- number of times to restart the input stimuli
-- g_tb_nof_restart : NATURAL := 1; -- number of times to restart the input stimuli
-- g_tb_nof_blocks : NATURAL := 10 -- number of input blocks per restart
-- g_tb_nof_blocks : NATURAL := 10 -- number of input blocks per restart
u_mm_output
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
c_bsn_latency_max
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
TRUE
,
0
,
1
,
0
,
1
,
50
);
u_mm_output
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
1
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
TRUE
,
0
,
1
,
0
,
2
,
c_nof_blk
);
u_dp_output
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
c_bsn_latency_max
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
FALSE
,
0
,
1
,
0
,
1
,
50
);
u_dp_output
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
1
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
FALSE
,
0
,
1
,
0
,
2
,
c_nof_blk
);
u_dp_disable
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
4
,
c_bsn_latency_max
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
2
,
FALSE
,
0
,
1
,
0
,
1
,
50
);
u_dp_output_bsn_lat_2
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
2
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
FALSE
,
0
,
1
,
0
,
2
,
c_nof_blk
);
u_dp_output_bsn_lat_3
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
3
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
FALSE
,
0
,
1
,
0
,
2
,
c_nof_blk
);
u_dp_output_p1_rd2
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
1
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
FALSE
,
1
,
2
,
0
,
2
,
c_nof_blk
);
u_dp_zero_gap
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
1
,
1
,
c_block
,
c_block
,
32
,
16
,
17
,
0
,
FALSE
,
0
,
1
,
0
,
2
,
c_nof_blk
);
u_dp_disable_one
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
4
,
1
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
2
,
FALSE
,
0
,
1
,
0
,
2
,
c_nof_blk
);
u_diff_delay_no_loss
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
c_bsn_latency_max
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
FALSE
,
0
,
1
,
c_delay_max
,
1
,
50
);
u_diff_delay_no_loss
:
ENTITY
work
.
tb_dp_bsn_align_v2
GENERIC
MAP
(
2
,
1
,
1
,
c_block
,
c_period
,
32
,
16
,
17
,
0
,
FALSE
,
0
,
1
,
-1
,
2
,
c_nof_blk
);
--u_loss_replacement : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (2, c_bsn_latency_max, 1, c_block, c_period, 32, 16, 17, 0, FALSE, 0, 1, 40 + c_delay_max, 1, 50);
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