Created
January 31, 2024 17:38
-
-
Save marcusmueller/433b222c15bd06c91f3d618710600417 to your computer and use it in GitHub Desktop.
reproduction Flowgraph for https://github.com/gnuradio/gnuradio/issues/5090
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GNU Radio C++ Flow Graph CMakeLists.txt | |
# | |
# Title: generate c++ variables | |
# Author: Marcus Müller, Solomon B Stoner | |
# GNU Radio version: v3.11.0.0git-649-gd7cdf222 | |
cmake_minimum_required(VERSION 3.8) | |
set(CMAKE_CXX_STANDARD 14) | |
project(repro5090) | |
find_package(Gnuradio "3.11" COMPONENTS | |
blocks | |
fec | |
fft | |
filter | |
analog | |
digital | |
dtv | |
audio | |
channels | |
pdu | |
iio | |
qtgui | |
trellis | |
uhd | |
uhd UHD 4.0 RFNoC | |
video-sdl | |
vocoder | |
wavelet | |
zeromq | |
network | |
soapy | |
) | |
add_executable(repro5090 repro5090.cpp) | |
target_link_libraries(repro5090 | |
gnuradio::gnuradio-blocks | |
gnuradio::gnuradio-filter | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************** | |
GNU Radio C++ Flow Graph Source File | |
Title: generate c++ variables | |
Author: Marcus Müller, Solomon B Stoner | |
GNU Radio version: v3.11.0.0git-649-gd7cdf222 | |
********************/ | |
#include "repro5090.hpp" | |
using namespace gr; | |
repro5090::repro5090 () { | |
this->tb = gr::make_top_block("generate c++ variables"); | |
// Blocks: | |
std::vector<gr_complex> taps = {}; | |
this->fft_filter_xxx_0 = filter::fft_filter_ccc::make( | |
1, | |
taps, | |
1); | |
this->fft_filter_xxx_0.declare_sample_delay(0); | |
this->blocks_null_source_0 = blocks::null_source::make(sizeof(gr_complex)*1); | |
this->blocks_null_sink_0 = blocks::null_sink::make(sizeof(gr_complex)*1); | |
// Connections: | |
this->tb->hier_block2::connect(this->blocks_null_source_0, 0, this->fft_filter_xxx_0, 0); | |
this->tb->hier_block2::connect(this->fft_filter_xxx_0, 0, this->blocks_null_sink_0, 0); | |
} | |
repro5090::~repro5090 () { | |
} | |
// Callbacks: | |
long repro5090::get_samp_rate () const { | |
return this->samp_rate; | |
} | |
void repro5090::set_samp_rate (long samp_rate) { | |
this->samp_rate = samp_rate; | |
} | |
std::vector<float> repro5090::get_rrc () const { | |
return this->rrc; | |
} | |
void repro5090::set_rrc (std::vector<float> rrc) { | |
this->rrc = rrc; | |
} | |
int main (int argc, char **argv) { | |
repro5090* top_block = new repro5090(); | |
top_block->tb->start(); | |
top_block->tb->wait(); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options: | |
parameters: | |
author: "Marcus M\xFCller, Solomon B Stoner" | |
catch_exceptions: 'True' | |
category: '[GRC Hier Blocks]' | |
cmake_opt: '' | |
comment: '' | |
copyright: 2021,2024 | |
description: '' | |
gen_cmake: 'On' | |
gen_linking: dynamic | |
generate_options: no_gui | |
hier_block_src_path: '.:' | |
id: repro5090 | |
max_nouts: '0' | |
output_language: cpp | |
placement: (0,0) | |
qt_qss_theme: '' | |
realtime_scheduling: '' | |
run: 'True' | |
run_command: '{python} -u {filename}' | |
run_options: run | |
sizing_mode: fixed | |
thread_safe_setters: '' | |
title: generate c++ variables | |
window_size: (1000,1000) | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [8, 8] | |
rotation: 0 | |
state: enabled | |
blocks: | |
- name: rrc | |
id: variable_rrc_filter_taps | |
parameters: | |
alpha: '0.35' | |
comment: '' | |
gain: '1.0' | |
ntaps: '21' | |
samp_rate: samp_rate | |
sym_rate: samp_rate/4 | |
value: '' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [320, 12.0] | |
rotation: 0 | |
state: enabled | |
- name: samp_rate | |
id: variable | |
parameters: | |
comment: '' | |
value: '32000' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [208, 28.0] | |
rotation: 0 | |
state: enabled | |
- name: blocks_null_sink_0 | |
id: blocks_null_sink | |
parameters: | |
affinity: '' | |
alias: '' | |
bus_structure_sink: '[[0,],]' | |
comment: '' | |
num_inputs: '1' | |
type: complex | |
vlen: '1' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [480, 200.0] | |
rotation: 0 | |
state: enabled | |
- name: blocks_null_source_0 | |
id: blocks_null_source | |
parameters: | |
affinity: '' | |
alias: '' | |
bus_structure_source: '[[0,],]' | |
comment: '' | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
num_outputs: '1' | |
type: complex | |
vlen: '1' | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [56, 200.0] | |
rotation: 0 | |
state: enabled | |
- name: fft_filter_xxx_0 | |
id: fft_filter_xxx | |
parameters: | |
affinity: '' | |
alias: '' | |
comment: '' | |
decim: '1' | |
maxoutbuf: '0' | |
minoutbuf: '0' | |
nthreads: '1' | |
samp_delay: '0' | |
taps: '' | |
type: ccc | |
states: | |
bus_sink: false | |
bus_source: false | |
bus_structure: null | |
coordinate: [256, 180.0] | |
rotation: 0 | |
state: enabled | |
connections: | |
- [blocks_null_source_0, '0', fft_filter_xxx_0, '0'] | |
- [fft_filter_xxx_0, '0', blocks_null_sink_0, '0'] | |
metadata: | |
file_format: 1 | |
grc_version: v3.11.0.0git-649-gd7cdf222 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef REPRO5090_HPP | |
#define REPRO5090_HPP | |
/******************** | |
GNU Radio C++ Flow Graph Header File | |
Title: generate c++ variables | |
Author: Marcus Müller, Solomon B Stoner | |
GNU Radio version: v3.11.0.0git-649-gd7cdf222 | |
********************/ | |
/******************** | |
** Create includes | |
********************/ | |
#include <gnuradio/top_block.h> | |
#include <gnuradio/filter/firdes.h> | |
#include <gnuradio/blocks/null_sink.h> | |
#include <gnuradio/blocks/null_source.h> | |
#include <gnuradio/filter/fft_filter_ccc.h> | |
using namespace gr; | |
class repro5090 { | |
private: | |
filter::fft_filter_ccc::sptr fft_filter_xxx_0; | |
blocks::null_source::sptr blocks_null_source_0; | |
blocks::null_sink::sptr blocks_null_sink_0; | |
// Variables: | |
long samp_rate = 32000; | |
std::vector<float> rrc = filter::firdes::root_raised_cosine(1.0, samp_rate,samp_rate/4, 0.35, 21); | |
public: | |
top_block_sptr tb; | |
repro5090(); | |
~repro5090(); | |
long get_samp_rate () const; | |
void set_samp_rate(long samp_rate); | |
std::vector<float> get_rrc () const; | |
void set_rrc(std::vector<float> rrc); | |
}; | |
#endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment