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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ELEN90089 CDC
gr-bladeRF-cdc
Commits
96e9234d
Commit
96e9234d
authored
Jun 13, 2021
by
Sergey Musikhin
Browse files
Options
Downloads
Patches
Plain Diff
lpf mode
parent
c16e4a26
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
grc/gen_bladerf_blocks.py
+15
-0
15 additions, 0 deletions
grc/gen_bladerf_blocks.py
lib/bladerf/bladerf_common.cc
+18
-0
18 additions, 0 deletions
lib/bladerf/bladerf_common.cc
lib/bladerf/bladerf_common.h
+3
-0
3 additions, 0 deletions
lib/bladerf/bladerf_common.h
with
36 additions
and
0 deletions
grc/gen_bladerf_blocks.py
+
15
−
0
View file @
96e9234d
...
...
@@ -120,6 +120,7 @@ parameters:
default:
'
none
'
options: [
'
none
'
,
'
auto
'
,
'
auto3db
'
,
'
50M
'
,
'
144M
'
,
'
222M
'
,
'
custom
'
]
option_labels: [
'
none
'
,
'
auto
'
,
'
auto3db
'
,
'
50M
'
,
'
144M
'
,
'
222M
'
,
'
custom
'
]
hide: part
- id: tamer
category: x40/x115
...
...
@@ -128,6 +129,16 @@ parameters:
default:
'
internal
'
options: [
'
internal
'
,
'
external_1pps
'
,
'
external
'
]
option_labels: [
'
Internal
'
,
'
External 1pps
'
,
'
External 10 MHz
'
]
hide: part
- id: lpf_mode
label:
'
LPF mode
'
category: x40/x115
dtype: enum
default:
'
disabled
'
options: [
'
disabled
'
,
'
bypassed
'
]
option_labels: [
'
Disabled
'
,
'
Bypassed
'
]
hide: part
...
...
@@ -185,6 +196,7 @@ templates:
+
"
,dac=
"
+ str(${
'
$
'
}{dac})
+
"
,xb200=
"
+
'
${
'
$
'
}{xb200}
'
+
"
,tamer=
"
+
'
${
'
$
'
}{tamer}
'
+
"
,lpf_mode=
"
+
'
${
'
$
'
}{lpf_mode}
'
+
"
,trigger0=
"
+
'
${
'
$
'
}{trigger0}
'
+
"
,trigger_role0=
"
+
'
${
'
$
'
}{trigger_role0}
'
+
"
,trigger_signal0=
"
+
'
${
'
$
'
}{trigger_signal0}
'
...
...
@@ -194,6 +206,7 @@ templates:
+
"
,bias_tee0=
"
+
'
${
'
$
'
}{bias_tee0}
'
+
"
,bias_tee1=
"
+
'
${
'
$
'
}{bias_tee1}
'
)
self.${
'
$
'
}{id}.set_sample_rate(${
'
$
'
}{sample_rate})
% for n in range(max_nchan):
...
...
@@ -412,6 +425,8 @@ PARAMS_TMPL = """
option_labels: [
'
J71_4
'
,
'
J51_1
'
,
'
MINI_EXP_1
'
,
'
USER_0
'
,
'
USER_1
'
,
'
USER_2
'
,
'
USER_3
'
,
'
USER_4
'
,
'
USER_5
'
,
'
USER_6
'
,
'
USER_7
'
]
hide: ${
'
$
'
}{
'
part
'
if (nchan > ${n}) else
'
all
'
}
"""
...
...
This diff is collapsed.
Click to expand it.
lib/bladerf/bladerf_common.cc
+
18
−
0
View file @
96e9234d
...
...
@@ -418,6 +418,15 @@ void bladerf_common::init_bladerf1(const dict_t &dict, bladerf_direction directi
if
(
dict
.
count
(
"tamer"
))
{
set_clock_source
(
_get
(
dict
,
"tamer"
));
}
bladerf_channel
ch
=
(
direction
==
BLADERF_RX
)
?
BLADERF_CHANNEL_RX
(
0
)
:
BLADERF_CHANNEL_TX
(
0
);
if
(
dict
.
count
(
"lpf_mode"
))
{
bladerf_lpf_mode
mode
=
_get
(
dict
,
"lpf_mode"
)
==
"bypassed"
?
BLADERF_LPF_BYPASSED
:
BLADERF_LPF_DISABLED
;
set_lpf_mode
(
ch
,
mode
);
}
}
void
bladerf_common
::
init_bladerf2
(
const
dict_t
&
dict
,
bladerf_direction
direction
)
...
...
@@ -1319,6 +1328,15 @@ double bladerf_common::get_smb_frequency()
return
static_cast
<
double
>
(
actual_frequency
);
}
void
bladerf_common
::
set_lpf_mode
(
bladerf_channel
ch
,
bladerf_lpf_mode
mode
)
{
auto
status
=
bladerf_set_lpf_mode
(
_dev
.
get
(),
ch
,
mode
);
if
(
status
!=
0
)
{
BLADERF_THROW_STATUS
(
status
,
"Failed to set LPF mode"
);
}
}
/******************************************************************************
* Private methods
******************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
lib/bladerf/bladerf_common.h
+
3
−
0
View file @
96e9234d
...
...
@@ -273,6 +273,9 @@ protected:
/* Get the current SMB frequency */
double
get_smb_frequency
();
void
set_lpf_mode
(
bladerf_channel
ch
,
bladerf_lpf_mode
mode
);
/*****************************************************************************
* Protected members
****************************************************************************/
...
...
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