Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gr-bladeRF-cdc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
ELEN90089 CDC
gr-bladeRF-cdc
Commits
ae013622
Commit
ae013622
authored
4 years ago
by
Sergey Musikhin
Browse files
Options
Downloads
Patches
Plain Diff
common frequency/bandwidth
parent
23c597ed
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/fm_receiver.grc
+8
-11
8 additions, 11 deletions
apps/fm_receiver.grc
grc/gen_bladerf_blocks.py
+17
-29
17 additions, 29 deletions
grc/gen_bladerf_blocks.py
with
25 additions
and
40 deletions
apps/fm_receiver.grc
+
8
−
11
View file @
ae013622
...
@@ -212,25 +212,21 @@ blocks:
...
@@ -212,25 +212,21 @@ blocks:
parameters:
parameters:
affinity: ''
affinity: ''
alias: ''
alias: ''
bias_tee0: '
Fals
e'
bias_tee0: '
Tru
e'
bias_tee1: 'False'
bias_tee1: 'False'
bw0: samp_rate
bw: '2000000'
bw1: '200000'
comment: ''
comment: ''
corr0: '0'
dac: '6000'
corr1: '0'
dac: '8000'
dc_calibration: RX_LPF
dc_calibration: RX_LPF
dc_offset_mode0: '0'
dc_offset_mode0: '0'
dc_offset_mode1: '0'
dc_offset_mode1: '0'
device_id: '0'
device_id: '0'
fpga_image: test123
fpga_image: test123
fpga_reload: 'False'
fpga_reload: 'False'
freq0: freq
freq: freq
freq1: 1e8
gain0: rf_gain
gain0: rf_gain
gain1: '10'
gain1: '10'
gain_mode0: '
Fals
e'
gain_mode0: '
Tru
e'
gain_mode1: 'False'
gain_mode1: 'False'
if_gain0: if_gain
if_gain0: if_gain
if_gain1: '20'
if_gain1: '20'
...
@@ -248,13 +244,14 @@ blocks:
...
@@ -248,13 +244,14 @@ blocks:
sampling: external
sampling: external
smb: 10e6
smb: 10e6
tamer: internal
tamer: internal
trigger0: '
Tru
e'
trigger0: '
Fals
e'
trigger1: 'False'
trigger1: 'False'
trigger_role0: master
trigger_role0: master
trigger_role1: master
trigger_role1: master
trigger_signal0: J71_4
trigger_signal0: J71_4
trigger_signal1: J51_1
trigger_signal1: J51_1
verbosity: warning
use_dac: 'True'
verbosity: info
xb200: none
xb200: none
states:
states:
bus_sink: false
bus_sink: false
...
...
This diff is collapsed.
Click to expand it.
grc/gen_bladerf_blocks.py
+
17
−
29
View file @
ae013622
...
@@ -69,6 +69,16 @@ parameters:
...
@@ -69,6 +69,16 @@ parameters:
dtype: real
dtype: real
default: samp_rate
default: samp_rate
- id: freq
label:
'
Frequency (Hz)
'
dtype: real
default: 1e8
- id: bw
label:
'
Bandwidth (Hz)
'
dtype: real
default: 200000
- id: ref_clk
- id: ref_clk
label:
'
Reference clock
'
label:
'
Reference clock
'
dtype: real
dtype: real
...
@@ -208,10 +218,10 @@ templates:
...
@@ -208,10 +218,10 @@ templates:
)
)
self.${
'
$
'
}{id}.set_sample_rate(${
'
$
'
}{sample_rate})
self.${
'
$
'
}{id}.set_sample_rate(${
'
$
'
}{sample_rate})
self.${
'
$
'
}{id}.set_center_freq(${
'
$
'
}{freq},0)
self.${
'
$
'
}{id}.set_bandwidth(${
'
$
'
}{bw},0)
% for n in range(max_nchan):
% for n in range(max_nchan):
${
'
%
'
} if context.get(
'
nchan
'
)() > ${n}:
${
'
%
'
} if context.get(
'
nchan
'
)() > ${n}:
self.${
'
$
'
}{id}.set_center_freq(${
'
$
'
}{${
'
freq
'
+ str(n)}}, ${n})
self.${
'
$
'
}{id}.set_freq_corr(${
'
$
'
}{${
'
corr
'
+ str(n)}}, ${n})
% if sourk ==
'
source
'
:
% if sourk ==
'
source
'
:
self.${
'
$
'
}{id}.set_dc_offset_mode(${
'
$
'
}{${
'
dc_offset_mode
'
+ str(n)}}, ${n})
self.${
'
$
'
}{id}.set_dc_offset_mode(${
'
$
'
}{${
'
dc_offset_mode
'
+ str(n)}}, ${n})
self.${
'
$
'
}{id}.set_iq_balance_mode(${
'
$
'
}{${
'
iq_balance_mode
'
+ str(n)}}, ${n})
self.${
'
$
'
}{id}.set_iq_balance_mode(${
'
$
'
}{${
'
iq_balance_mode
'
+ str(n)}}, ${n})
...
@@ -219,14 +229,14 @@ templates:
...
@@ -219,14 +229,14 @@ templates:
% endif
% endif
self.${
'
$
'
}{id}.set_gain(${
'
$
'
}{${
'
gain
'
+ str(n)}}, ${n})
self.${
'
$
'
}{id}.set_gain(${
'
$
'
}{${
'
gain
'
+ str(n)}}, ${n})
self.${
'
$
'
}{id}.set_if_gain(${
'
$
'
}{${
'
if_gain
'
+ str(n)}}, ${n})
self.${
'
$
'
}{id}.set_if_gain(${
'
$
'
}{${
'
if_gain
'
+ str(n)}}, ${n})
self.${
'
$
'
}{id}.set_bandwidth(${
'
$
'
}{${
'
bw
'
+ str(n)}}, ${n})
${
'
%
'
} endif
${
'
%
'
} endif
% endfor
% endfor
callbacks:
callbacks:
- set_sample_rate(${
'
$
'
}{sample_rate})
- set_sample_rate(${
'
$
'
}{sample_rate})
- set_center_freq(${
'
$
'
}{freq}, 0)
- set_bandwidth(${
'
$
'
}{bw}, 0)
% for n in range(max_nchan):
% for n in range(max_nchan):
- set_center_freq(${
'
$
'
}{${
'
freq
'
+ str(n)}}, ${n})
- set_freq_corr(${
'
$
'
}{${
'
corr
'
+ str(n)}}, ${n})
% if sourk ==
'
source
'
:
% if sourk ==
'
source
'
:
- set_dc_offset_mode(${
'
$
'
}{${
'
dc_offset_mode
'
+ str(n)}}, ${n})
- set_dc_offset_mode(${
'
$
'
}{${
'
dc_offset_mode
'
+ str(n)}}, ${n})
- set_iq_balance_mode(${
'
$
'
}{${
'
iq_balance_mode
'
+ str(n)}}, ${n})
- set_iq_balance_mode(${
'
$
'
}{${
'
iq_balance_mode
'
+ str(n)}}, ${n})
...
@@ -234,7 +244,6 @@ templates:
...
@@ -234,7 +244,6 @@ templates:
% endif
% endif
- set_gain(${
'
$
'
}{${
'
gain
'
+ str(n)}}, ${n})
- set_gain(${
'
$
'
}{${
'
gain
'
+ str(n)}}, ${n})
- set_if_gain(${
'
$
'
}{${
'
if_gain
'
+ str(n)}}, ${n})
- set_if_gain(${
'
$
'
}{${
'
if_gain
'
+ str(n)}}, ${n})
- set_bandwidth(${
'
$
'
}{${
'
bw
'
+ str(n)}}, ${n})
% endfor
% endfor
documentation: |-
documentation: |-
...
@@ -351,27 +360,6 @@ file_format: 1
...
@@ -351,27 +360,6 @@ file_format: 1
# """
# """
PARAMS_TMPL
=
"""
PARAMS_TMPL
=
"""
- id: freq${n}
category:
'
Channel ${n}
'
label:
'
Frequency (Hz)
'
dtype: real
default: 1e8
hide: ${
'
$
'
}{
'
none
'
if (nchan > ${n}) else
'
all
'
}
- id: corr${n}
category:
'
Channel ${n}
'
label:
'
Freq. Corr. (ppm)
'
dtype: real
default: 0
hide: ${
'
$
'
}{
'
none
'
if (nchan > ${n}) else
'
all
'
}
- id: bw${n}
category:
'
Channel ${n}
'
label:
'
Bandwidth (Hz)
'
dtype: real
default: 200000
hide: ${
'
$
'
}{
'
none
'
if (nchan > ${n}) else
'
all
'
}
- id: bias_tee${n}
- id: bias_tee${n}
category:
'
Channel ${n}
'
category:
'
Channel ${n}
'
label:
'
Bias tee
'
label:
'
Bias tee
'
...
...
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