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
855c682d
Commit
855c682d
authored
7 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Added dbg_* signals that can be useful to view in hexadecimal radix in the Wave windwow.
parent
f566b435
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/reorder/src/vhdl/reorder_transpose.vhd
+108
-49
108 additions, 49 deletions
libraries/base/reorder/src/vhdl/reorder_transpose.vhd
with
108 additions
and
49 deletions
libraries/base/reorder/src/vhdl/reorder_transpose.vhd
+
108
−
49
View file @
855c682d
...
...
@@ -23,7 +23,8 @@
-- Purpose: Performing a transpose (reordering data) on one or more streaming
-- inputs using external memory.
--
-- Description: The input of multiple streams (g_nof_streams) is concatenated into a
-- Description:
-- The input of multiple streams (g_nof_streams) is concatenated into a
-- single stream. Either the data field or the complex fields can be
-- used, based on the g_use_complex generic.
--
...
...
@@ -61,6 +62,17 @@
-- g_reorder_seq.nof_blocks the sequencer will reset and start again when the number of
-- received blocksdoes match the g_reorder_seq.nof_blocks.
--
-- Complex or real data:
-- The the width of snk_in.data, re, im is g_in_dat_w. When g_use_complex = FALSE then
-- snk_in.data is passed on internally, so then the internal sosi.data width is also
-- g_in_dat_w. When g_use_complex = TRUE then snk_in.im and snk_in.re are concatenated
-- into an internal sosi.data that has then width 2*g_in_dat_w. The g_nof_streams are
-- also concatenated into the sosi.data.
-- . g_use_complex = FALSE : sosi.data = data[g_nof_streams-1] & ... & data[1] & data[0]
-- . g_use_complex = TRUE : sosi.data = im&re[g_nof_streams-1] & ... & im&re[1] & im&re[0]
-- Hence:
-- . g_use_complex = FALSE : c_data_w = g_nof_streams*g_in_dat_w
-- . g_use_complex = TRUE : c_data_w = g_nof_streams*g_in_dat_w*c_nof_complex
-- Remarks:
LIBRARY
IEEE
,
common_lib
,
technology_lib
,
dp_lib
;
...
...
@@ -129,6 +141,7 @@ ARCHITECTURE str OF reorder_transpose IS
CONSTANT
c_complex_data_w
:
NATURAL
:
=
c_total_data_w
*
c_nof_complex
;
CONSTANT
c_data_w
:
NATURAL
:
=
sel_a_b
(
g_use_complex
,
c_complex_data_w
,
c_total_data_w
);
CONSTANT
c_data_w_pre
:
NATURAL
:
=
sel_a_b
(
g_use_complex
,
c_total_data_w
,
c_total_data_w
/
2
);
-- Datawidth for pre-transpose defines Re or Im part.
CONSTANT
c_sdata_w
:
NATURAL
:
=
c_data_w
/
g_nof_streams
;
CONSTANT
c_nof_ch_in
:
NATURAL
:
=
g_frame_size_in
*
g_reorder_seq
.
rd_chunksize
;
CONSTANT
c_nof_ch_sel
:
NATURAL
:
=
g_reorder_seq
.
wr_chunksize
*
g_reorder_seq
.
rd_chunksize
;
...
...
@@ -152,7 +165,7 @@ ARCHITECTURE str OF reorder_transpose IS
SIGNAL
dvr_nof_data
:
STD_LOGIC_VECTOR
(
c_mem_size_w
-1
DOWNTO
0
);
SIGNAL
dvr_wr_flush_en
:
STD_LOGIC
;
SIGNAL
to_mem_src_out
_i
:
t_dp_sosi
;
SIGNAL
i_
to_mem_src_out
:
t_dp_sosi
;
SIGNAL
block_gen_out_sosi
:
t_dp_sosi
;
SIGNAL
pipeline_out_sosi
:
t_dp_sosi
;
...
...
@@ -163,8 +176,56 @@ ARCHITECTURE str OF reorder_transpose IS
SIGNAL
rd_dat_i
:
STD_LOGIC_VECTOR
(
c_dp_stream_bsn_w
-1
DOWNTO
0
);
SIGNAL
rd_val_i
:
STD_LOGIC
;
SIGNAL
i_src_out_arr
:
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
);
-- debug signals
-- . g_use_complex = FALSE : view sosi.data
SIGNAL
dbg_snk_in_data_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_to_mem_src_out_data_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_from_mem_snk_in_data_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_src_out_data_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
-- . g_use_complex = TRUE : view sosi.re and sosi.im
SIGNAL
dbg_snk_in
:
t_dp_sosi
;
SIGNAL
dbg_snk_in_re_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_snk_in_im_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_to_mem_src_out
:
t_dp_sosi
;
SIGNAL
dbg_to_mem_src_out_re_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_to_mem_src_out_im_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_from_mem_snk_in
:
t_dp_sosi
;
SIGNAL
dbg_from_mem_snk_in_re_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_from_mem_snk_in_im_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_src_out
:
t_dp_sosi
;
SIGNAL
dbg_src_out_re_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
SIGNAL
dbg_src_out_im_concat
:
STD_LOGIC_VECTOR
(
c_total_data_w
-1
DOWNTO
0
);
BEGIN
to_mem_src_out
<=
i_to_mem_src_out
;
src_out_arr
<=
i_src_out_arr
;
-- Internal transport is done via sosi.data, for debug view sosi.data or view sosi.re and sosi.im dependent on g_use_complex
dbg_snk_in
<=
snk_in_arr
(
0
);
dbg_to_mem_src_out
<=
i_to_mem_src_out
;
dbg_from_mem_snk_in
<=
from_mem_snk_in
;
dbg_src_out
<=
i_src_out_arr
(
0
);
gen_debug
:
FOR
I
IN
0
TO
g_nof_streams
-1
GENERATE
-- g_use_complex = FALSE : view sosi.data
dbg_snk_in_data_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
snk_in_arr
(
I
)
.
data
(
g_in_dat_w
-1
DOWNTO
0
);
dbg_to_mem_src_out_data_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
i_to_mem_src_out
.
data
((
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
);
dbg_from_mem_snk_in_data_concat
((
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
from_mem_snk_in
.
data
((
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
);
dbg_src_out_data_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
i_src_out_arr
(
I
)
.
data
(
g_in_dat_w
-1
DOWNTO
0
);
-- g_use_complex = TRUE : view sosi.re and sosi.im (transported via sosi.data, factor 2 = c_nof_complex)
dbg_snk_in_re_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
snk_in_arr
(
I
)
.
re
(
g_in_dat_w
-1
DOWNTO
0
);
dbg_snk_in_im_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
snk_in_arr
(
I
)
.
im
(
g_in_dat_w
-1
DOWNTO
0
);
dbg_to_mem_src_out_re_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
i_to_mem_src_out
.
data
((
2
*
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
(
2
*
I
+
0
)
*
g_in_dat_w
);
dbg_to_mem_src_out_im_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
i_to_mem_src_out
.
data
((
2
*
I
+
2
)
*
g_in_dat_w
-1
DOWNTO
(
2
*
I
+
1
)
*
g_in_dat_w
);
dbg_from_mem_snk_in_re_concat
((
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
from_mem_snk_in
.
data
((
2
*
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
(
2
*
I
+
0
)
*
g_in_dat_w
);
dbg_from_mem_snk_in_im_concat
((
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
from_mem_snk_in
.
data
((
2
*
I
+
2
)
*
g_in_dat_w
-1
DOWNTO
(
2
*
I
+
1
)
*
g_in_dat_w
);
dbg_src_out_re_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
i_src_out_arr
(
I
)
.
re
(
g_in_dat_w
-1
DOWNTO
0
);
dbg_src_out_im_concat
(
(
I
+
1
)
*
g_in_dat_w
-1
DOWNTO
I
*
g_in_dat_w
)
<=
i_src_out_arr
(
I
)
.
im
(
g_in_dat_w
-1
DOWNTO
0
);
END
GENERATE
;
g_merge_in_complex
:
IF
g_use_complex
=
TRUE
GENERATE
PROCESS
(
snk_in_arr
)
BEGIN
...
...
@@ -261,16 +322,14 @@ BEGIN
input_sosi
=>
ss_in_sosi
,
input_siso
=>
OPEN
,
-- Don't allow backpressure.
output_sosi
=>
to_mem_src_out
_i
,
output_sosi
=>
i_
to_mem_src_out
,
output_siso
=>
to_mem_src_in
);
END
GENERATE
;
to_mem_src_out
<=
to_mem_src_out_i
;
gen_not_pre_transpose
:
IF
g_ena_pre_transp
=
FALSE
GENERATE
to_mem_src_out
_i
<=
packet_merge_in_sosi
;
i_
to_mem_src_out
<=
packet_merge_in_sosi
;
packet_merge_in_siso
<=
to_mem_src_in
;
END
GENERATE
;
...
...
@@ -395,12 +454,12 @@ BEGIN
gen_merge_out
:
PROCESS
(
block_gen_out_sosi
,
pipeline_out_sosi
,
sync_bsn
)
BEGIN
FOR
i
IN
0
TO
g_nof_streams
-1
LOOP
src_out_arr
(
i
)
<=
block_gen_out_sosi
;
src_out_arr
(
i
)
.
valid
<=
pipeline_out_sosi
.
valid
;
src_out_arr
(
i
)
.
re
<=
RESIZE_DP_DSP_DATA
(
pipeline_out_sosi
.
data
((
2
*
i
+
1
)
*
g_in_dat_w
-1
DOWNTO
2
*
i
*
g_in_dat_w
));
src_out_arr
(
i
)
.
im
<=
RESIZE_DP_DSP_DATA
(
pipeline_out_sosi
.
data
((
2
*
i
+
2
)
*
g_in_dat_w
-1
DOWNTO
(
2
*
i
+
1
)
*
g_in_dat_w
));
i_
src_out_arr
(
i
)
<=
block_gen_out_sosi
;
i_
src_out_arr
(
i
)
.
valid
<=
pipeline_out_sosi
.
valid
;
i_
src_out_arr
(
i
)
.
re
<=
RESIZE_DP_DSP_DATA
(
pipeline_out_sosi
.
data
((
2
*
i
+
1
)
*
g_in_dat_w
-1
DOWNTO
2
*
i
*
g_in_dat_w
));
i_
src_out_arr
(
i
)
.
im
<=
RESIZE_DP_DSP_DATA
(
pipeline_out_sosi
.
data
((
2
*
i
+
2
)
*
g_in_dat_w
-1
DOWNTO
(
2
*
i
+
1
)
*
g_in_dat_w
));
IF
(
block_gen_out_sosi
.
sync
=
'1'
)
THEN
src_out_arr
(
i
)
.
bsn
<=
sync_bsn
;
i_
src_out_arr
(
i
)
.
bsn
<=
sync_bsn
;
END
IF
;
END
LOOP
;
END
PROCESS
;
...
...
@@ -410,11 +469,11 @@ BEGIN
gen_merge_out
:
PROCESS
(
block_gen_out_sosi
,
pipeline_out_sosi
)
BEGIN
FOR
i
IN
0
TO
g_nof_streams
-1
LOOP
src_out_arr
(
i
)
<=
block_gen_out_sosi
;
src_out_arr
(
i
)
.
valid
<=
pipeline_out_sosi
.
valid
;
src_out_arr
(
i
)
.
data
<=
RESIZE_DP_DATA
(
pipeline_out_sosi
.
data
((
i
+
1
)
*
g_in_dat_w
-1
DOWNTO
i
*
g_in_dat_w
));
i_
src_out_arr
(
i
)
<=
block_gen_out_sosi
;
i_
src_out_arr
(
i
)
.
valid
<=
pipeline_out_sosi
.
valid
;
i_
src_out_arr
(
i
)
.
data
<=
RESIZE_DP_DATA
(
pipeline_out_sosi
.
data
((
i
+
1
)
*
g_in_dat_w
-1
DOWNTO
i
*
g_in_dat_w
));
IF
(
block_gen_out_sosi
.
sync
=
'1'
)
THEN
src_out_arr
(
i
)
.
bsn
<=
sync_bsn
;
i_
src_out_arr
(
i
)
.
bsn
<=
sync_bsn
;
END
IF
;
END
LOOP
;
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