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
08680b52
Commit
08680b52
authored
10 years ago
by
Daniel van der Schuur
Browse files
Options
Downloads
Patches
Plain Diff
-Printing channel amplitudes.
parent
57379911
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/dsp/correlator/tb/python/tc_correlator.py
+11
-3
11 additions, 3 deletions
libraries/dsp/correlator/tb/python/tc_correlator.py
with
11 additions
and
3 deletions
libraries/dsp/correlator/tb/python/tc_correlator.py
+
11
−
3
View file @
08680b52
...
@@ -64,6 +64,7 @@ data = transpose(data)
...
@@ -64,6 +64,7 @@ data = transpose(data)
for
sample_nr
in
range
(
NOF_TIMESAMPLES
):
for
sample_nr
in
range
(
NOF_TIMESAMPLES
):
mat_list
=
[]
mat_list
=
[]
amplitudes
=
[]
for
channel_nr
in
range
(
NOF_CHANNELS
):
for
channel_nr
in
range
(
NOF_CHANNELS
):
###############################################################################
###############################################################################
# Convert the unsigned words to complex
# Convert the unsigned words to complex
...
@@ -80,14 +81,16 @@ for sample_nr in range(NOF_TIMESAMPLES):
...
@@ -80,14 +81,16 @@ for sample_nr in range(NOF_TIMESAMPLES):
###############################################################################
###############################################################################
for
index
,
word
in
enumerate
(
channel_data
):
for
index
,
word
in
enumerate
(
channel_data
):
channel_data
[
index
]
=
complex_binomial_to_phasor
(
word
)
channel_data
[
index
]
=
complex_binomial_to_phasor
(
word
)
###############################################################################
###############################################################################
# Extract the phases from the complex data
# Extract the phases
and amplitudes
from the complex data
###############################################################################
###############################################################################
phases
=
[]
phases
=
[]
for
word
in
channel_data
:
for
word
in
channel_data
:
amplitudes
.
append
(
word
[
0
])
phases
.
append
(
word
[
1
])
phases
.
append
(
word
[
1
])
################################################################################
################################################################################
# Re-shape the flat list into a matrix
# Re-shape the flat list into a matrix
################################################################################
################################################################################
...
@@ -97,6 +100,11 @@ for sample_nr in range(NOF_TIMESAMPLES):
...
@@ -97,6 +100,11 @@ for sample_nr in range(NOF_TIMESAMPLES):
################################################################################
################################################################################
# re-shape the flat list of 64 matrices into a an 8*8 matrix of matrices, plot
# re-shape the flat list of 64 matrices into a an 8*8 matrix of matrices, plot
################################################################################
################################################################################
print
'
Plotting phases of timesample %d, %d channels.
'
%
(
sample_nr
,
NOF_CHANNELS
)
print
'
. Channel amplitudes:
'
for
channel_nr
in
range
(
NOF_CHANNELS
):
print
'
.
'
,
channel_nr
,
'
-
'
,
amplitudes
[
channel_nr
]
mat_mat
=
split_list
(
mat_list
,
8
)
mat_mat
=
split_list
(
mat_list
,
8
)
plot_matrix_color
(
mat_mat
)
plot_matrix_color
(
mat_mat
)
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