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
c5fe292a
Commit
c5fe292a
authored
9 years ago
by
Daniel van der Schuur
Browse files
Options
Downloads
Patches
Plain Diff
-Fixed BSN increment; now increments every g_nof_channels frames.
parent
0f95ad94
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/dsp/correlator/src/vhdl/corr_output_framer.vhd
+44
-22
44 additions, 22 deletions
libraries/dsp/correlator/src/vhdl/corr_output_framer.vhd
with
44 additions
and
22 deletions
libraries/dsp/correlator/src/vhdl/corr_output_framer.vhd
+
44
−
22
View file @
c5fe292a
...
@@ -28,8 +28,15 @@ USE dp_lib.dp_stream_pkg.ALL;
...
@@ -28,8 +28,15 @@ USE dp_lib.dp_stream_pkg.ALL;
-- Purpose:
-- Purpose:
-- . Add SOP, EOP, BSN, SYNC and CHANNEL fields to correlator output.
-- . Add SOP, EOP, BSN, SYNC and CHANNEL fields to correlator output.
-- Description:
-- Description:
-- . dp_block_gen generates the SOP, EOP, BSN and SYNC
-- . Frame length : g_nof_words_per_frame tagged by SOP..EOP.
-- . A clocked process adds the correct channel.
-- . Sync period : g_nof_channels * g_nof_words_per_frame
-- . Channel index range : 0..g_nof_channels-1
-- . BSN increment : Once every g_nof_channels
-- . The above is implemented as follows:
-- . dp_block_gen_sop_eop_sync generates the SOP, EOP and Sync
-- . A clocked process adds:
-- . channel based on SOP.
-- . the BSN based on Sync.
ENTITY
corr_output_framer
IS
ENTITY
corr_output_framer
IS
GENERIC
(
GENERIC
(
...
@@ -51,16 +58,18 @@ END corr_output_framer;
...
@@ -51,16 +58,18 @@ END corr_output_framer;
ARCHITECTURE
str
OF
corr_output_framer
IS
ARCHITECTURE
str
OF
corr_output_framer
IS
SIGNAL
dp_block_gen_src_out_arr
:
t_dp_sosi_arr
(
g_nof_inputs
-1
DOWNTO
0
);
SIGNAL
dp_block_gen_src_out_arr
:
t_dp_sosi_arr
(
g_nof_inputs
-1
DOWNTO
0
);
SIGNAL
channel_src_out_arr
:
t_dp_sosi_arr
(
g_nof_inputs
-1
DOWNTO
0
);
SIGNAL
reg_dp_block_gen_src_out_arr
:
t_dp_sosi_arr
(
g_nof_inputs
-1
DOWNTO
0
);
SIGNAL
nxt_channel_src_out_arr
:
t_dp_sosi_arr
(
g_nof_inputs
-1
DOWNTO
0
);
SIGNAL
channel_bsn_src_out_arr
:
t_dp_sosi_arr
(
g_nof_inputs
-1
DOWNTO
0
);
SIGNAL
nxt_channel_bsn_src_out_arr
:
t_dp_sosi_arr
(
g_nof_inputs
-1
DOWNTO
0
);
BEGIN
BEGIN
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--
Add SOP and EOP to mux output
--
dp_block_gen to create correc SOP,EOP and Sync
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
gen_dp_block_gen
:
FOR
i
IN
0
TO
g_nof_inputs
-1
GENERATE
gen_dp_block_gen
_sop_eop_sync
:
FOR
i
IN
0
TO
g_nof_inputs
-1
GENERATE
u_dp_block_gen
:
ENTITY
dp_lib
.
dp_block_gen
u_dp_block_gen
_sop_eop_sync
:
ENTITY
dp_lib
.
dp_block_gen
GENERIC
MAP
(
GENERIC
MAP
(
g_use_src_in
=>
FALSE
,
g_use_src_in
=>
FALSE
,
g_nof_data
=>
g_nof_words_per_frame
,
g_nof_data
=>
g_nof_words_per_frame
,
...
@@ -77,40 +86,53 @@ BEGIN
...
@@ -77,40 +86,53 @@ BEGIN
END
GENERATE
;
END
GENERATE
;
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--
Assign th
e channel
field
--
Creat
e channel
(based on SOP) and BSN (based on Sync)
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
p_channel
:
PROCESS
(
dp_block_gen_src_out_arr
)
p_channel
_bsn
:
PROCESS
(
dp_block_gen_src_out_arr
)
BEGIN
BEGIN
FOR
i
IN
0
TO
g_nof_inputs
-1
LOOP
FOR
i
IN
0
TO
g_nof_inputs
-1
LOOP
nxt_channel_src_out_arr
(
i
)
.
channel
<=
channel_src_out_arr
(
i
)
.
channel
;
nxt_channel_bsn_src_out_arr
(
i
)
.
channel
<=
channel_bsn_src_out_arr
(
i
)
.
channel
;
IF
dp_block_gen_src_out_arr
(
i
)
.
eop
=
'1'
THEN
nxt_channel_bsn_src_out_arr
(
i
)
.
bsn
<=
channel_bsn_src_out_arr
(
i
)
.
bsn
;
IF
channel_src_out_arr
(
i
)
.
channel
=
TO_DP_CHANNEL
(
g_nof_channels
-1
)
THEN
-- Channel
nxt_channel_src_out_arr
(
i
)
.
channel
<=
TO_DP_CHANNEL
(
0
);
IF
dp_block_gen_src_out_arr
(
i
)
.
sop
=
'1'
THEN
IF
channel_bsn_src_out_arr
(
i
)
.
channel
=
TO_DP_CHANNEL
(
g_nof_channels
-1
)
THEN
nxt_channel_bsn_src_out_arr
(
i
)
.
channel
<=
TO_DP_CHANNEL
(
0
);
ELSE
ELSE
nxt_channel_src_out_arr
(
i
)
.
channel
<=
INCR_UVEC
(
channel_src_out_arr
(
i
)
.
channel
,
1
);
nxt_channel_bsn_src_out_arr
(
i
)
.
channel
<=
INCR_UVEC
(
channel_bsn_src_out_arr
(
i
)
.
channel
,
1
);
END
IF
;
END
IF
;
END
IF
;
-- BSN
IF
dp_block_gen_src_out_arr
(
i
)
.
sync
=
'1'
THEN
nxt_channel_bsn_src_out_arr
(
i
)
.
bsn
<=
INCR_UVEC
(
channel_bsn_src_out_arr
(
i
)
.
bsn
,
1
);
END
IF
;
END
IF
;
END
LOOP
;
END
LOOP
;
END
PROCESS
;
END
PROCESS
;
-- Registers
-- Registers
: also register dp_block_gen_src_out_arr to align it with p_channel_bsn outputs
p_clk
:
PROCESS
(
clk
,
rst
)
p_clk
:
PROCESS
(
clk
,
rst
)
BEGIN
BEGIN
IF
rst
=
'1'
THEN
IF
rst
=
'1'
THEN
channel_src_out_arr
<=
(
OTHERS
=>
c_dp_sosi_rst
);
channel_bsn_src_out_arr
<=
(
OTHERS
=>
c_dp_sosi_rst
);
reg_dp_block_gen_src_out_arr
<=
(
OTHERS
=>
c_dp_sosi_rst
);
FOR
i
IN
0
TO
g_nof_inputs
-1
LOOP
channel_bsn_src_out_arr
(
i
)
.
channel
<=
X"FFFFFFFF"
;
-- Wrap to 0 on first increment
channel_bsn_src_out_arr
(
i
)
.
bsn
<=
X"FFFFFFFF_FFFFFFFF"
;
-- Wrap to 0 on first increment
END
LOOP
;
ELSIF
rising_edge
(
clk
)
THEN
ELSIF
rising_edge
(
clk
)
THEN
channel_src_out_arr
<=
nxt_channel_src_out_arr
;
channel_bsn_src_out_arr
<=
nxt_channel_bsn_src_out_arr
;
reg_dp_block_gen_src_out_arr
<=
dp_block_gen_src_out_arr
;
END
IF
;
END
IF
;
END
PROCESS
;
END
PROCESS
;
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Add channel field to dp_block_gen_src_out_arr and forward to s
nk
_out_arr
-- Add channel
,bsn
field
s
to
reg_
dp_block_gen_src_out_arr and forward to s
rc
_out_arr
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
p_wires
:
PROCESS
(
dp_block_gen_src_out_arr
,
channel_src_out_arr
)
p_wires
:
PROCESS
(
reg_
dp_block_gen_src_out_arr
,
channel_
bsn_
src_out_arr
)
BEGIN
BEGIN
src_out_arr
<=
dp_block_gen_src_out_arr
;
src_out_arr
<=
reg_
dp_block_gen_src_out_arr
;
FOR
i
IN
0
TO
g_nof_inputs
-1
LOOP
FOR
i
IN
0
TO
g_nof_inputs
-1
LOOP
src_out_arr
(
i
)
.
channel
<=
channel_src_out_arr
(
i
)
.
channel
;
src_out_arr
(
i
)
.
channel
<=
channel_bsn_src_out_arr
(
i
)
.
channel
;
src_out_arr
(
i
)
.
bsn
<=
channel_bsn_src_out_arr
(
i
)
.
bsn
;
END
LOOP
;
END
LOOP
;
END
PROCESS
;
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