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
e63a361b
Commit
e63a361b
authored
10 years ago
by
Daniel van der Schuur
Browse files
Options
Downloads
Patches
Plain Diff
-Cleaned the code.
parent
a1b494df
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/dsp/correlator/src/vhdl/corr_accumulator.vhd
+0
-3
0 additions, 3 deletions
libraries/dsp/correlator/src/vhdl/corr_accumulator.vhd
libraries/dsp/correlator/src/vhdl/corr_adder.vhd
+1
-21
1 addition, 21 deletions
libraries/dsp/correlator/src/vhdl/corr_adder.vhd
with
1 addition
and
24 deletions
libraries/dsp/correlator/src/vhdl/corr_accumulator.vhd
+
0
−
3
View file @
e63a361b
...
@@ -50,7 +50,6 @@ END corr_accumulator;
...
@@ -50,7 +50,6 @@ END corr_accumulator;
ARCHITECTURE
str
OF
corr_accumulator
IS
ARCHITECTURE
str
OF
corr_accumulator
IS
-- Complex accumulator data width: wide enough to support g_integration_period accumulations
-- Complex accumulator data width: wide enough to support g_integration_period accumulations
-- CONSTANT c_acc_data_w : NATURAL := ceil_log2(g_integration_period*(pow2(g_data_w)-1));
CONSTANT
c_acc_data_w
:
NATURAL
:
=
g_data_w
+
ceil_log2
(
g_integration_period
);
CONSTANT
c_acc_data_w
:
NATURAL
:
=
g_data_w
+
ceil_log2
(
g_integration_period
);
-- c_shiftram_delay is such that common_shiftram output aligns exactly with snk_in_arr. Functionally this
-- c_shiftram_delay is such that common_shiftram output aligns exactly with snk_in_arr. Functionally this
...
@@ -163,8 +162,6 @@ BEGIN
...
@@ -163,8 +162,6 @@ BEGIN
-- of zeros initially.
-- of zeros initially.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
gen_src_out_arr
:
FOR
i
IN
0
TO
g_nof_inputs
-1
GENERATE
gen_src_out_arr
:
FOR
i
IN
0
TO
g_nof_inputs
-1
GENERATE
-- nxt_src_out_arr(i).re(c_acc_data_w-1 DOWNTO 0) <= common_shiftram_src_out_arr(i).data(2*c_acc_data_w-1 DOWNTO c_acc_data_w);
-- nxt_src_out_arr(i).im(c_acc_data_w-1 DOWNTO 0) <= common_shiftram_src_out_arr(i).data( c_acc_data_w-1 DOWNTO 0);
nxt_src_out_arr
(
i
)
.
re
<=
RESIZE_DP_DSP_DATA
(
common_shiftram_src_out_arr
(
i
)
.
data
(
2
*
c_acc_data_w
-1
DOWNTO
c_acc_data_w
));
nxt_src_out_arr
(
i
)
.
re
<=
RESIZE_DP_DSP_DATA
(
common_shiftram_src_out_arr
(
i
)
.
data
(
2
*
c_acc_data_w
-1
DOWNTO
c_acc_data_w
));
nxt_src_out_arr
(
i
)
.
im
<=
RESIZE_DP_DSP_DATA
(
common_shiftram_src_out_arr
(
i
)
.
data
(
c_acc_data_w
-1
DOWNTO
0
));
nxt_src_out_arr
(
i
)
.
im
<=
RESIZE_DP_DSP_DATA
(
common_shiftram_src_out_arr
(
i
)
.
data
(
c_acc_data_w
-1
DOWNTO
0
));
...
...
This diff is collapsed.
Click to expand it.
libraries/dsp/correlator/src/vhdl/corr_adder.vhd
+
1
−
21
View file @
e63a361b
...
@@ -101,27 +101,7 @@ BEGIN
...
@@ -101,27 +101,7 @@ BEGIN
END
GENERATE
;
END
GENERATE
;
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Wire the adder output of g_data_w+1 to output with g_data_w.
-- Extend the sign bit
-- We already have the needed bit width at the adder INPUTS, so we don't need
-- an additional output bit.
-- . g_data_w is already wide enough to carry the full adder output
-- range (we don't need an extra bit for that).
-- . We do need the extra bit itself though, as it is the sign bit.
-----------------------------------------------------------------------------
-- gen_output_range : FOR i IN 0 TO g_nof_inputs-1 GENERATE
-- -- Wire the adder output to ranged_common_complex_add_sub_src_out_arr, minus the two MSbits
-- ranged_common_complex_add_sub_src_out_arr(i).re(g_data_w-1-1 DOWNTO 0) <= common_complex_add_sub_src_out_arr(i).re(g_data_w-1-1 DOWNTO 0);
-- ranged_common_complex_add_sub_src_out_arr(i).im(g_data_w-1-1 DOWNTO 0) <= common_complex_add_sub_src_out_arr(i).im(g_data_w-1-1 DOWNTO 0);
-- -- Don't assign the adder's MSbit-1 as it shouldn't toggle (because our adder input width is already wide enough)
-- -- NC <= common_complex_add_sub_src_out_arr(i).re(g_data_w-1);
-- -- NC <= common_complex_add_sub_src_out_arr(i).im(g_data_w-1);
-- -- Wire up the adder's MSbit (sign) bit
-- ranged_common_complex_add_sub_src_out_arr(i).re(g_data_w-1) <= common_complex_add_sub_src_out_arr(i).re(g_data_w);
-- ranged_common_complex_add_sub_src_out_arr(i).im(g_data_w-1) <= common_complex_add_sub_src_out_arr(i).im(g_data_w);
-- END GENERATE;
-----------------------------------------------------------------------------
-- Finally, extend the sign bit for human readability
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
gen_sign_extend
:
FOR
i
IN
0
TO
g_nof_inputs
-1
GENERATE
gen_sign_extend
:
FOR
i
IN
0
TO
g_nof_inputs
-1
GENERATE
src_out_arr
(
i
)
.
re
<=
RESIZE_DP_DSP_DATA
(
common_complex_add_sub_src_out_arr
(
i
)
.
re
(
g_data_w
-1
DOWNTO
0
));
src_out_arr
(
i
)
.
re
<=
RESIZE_DP_DSP_DATA
(
common_complex_add_sub_src_out_arr
(
i
)
.
re
(
g_data_w
-1
DOWNTO
0
));
...
...
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