Skip to content
Snippets Groups Projects
Commit ae013622 authored by Sergey Musikhin's avatar Sergey Musikhin
Browse files

common frequency/bandwidth

parent 23c597ed
Branches
No related tags found
No related merge requests found
...@@ -212,25 +212,21 @@ blocks: ...@@ -212,25 +212,21 @@ blocks:
parameters: parameters:
affinity: '' affinity: ''
alias: '' alias: ''
bias_tee0: 'False' bias_tee0: 'True'
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: 'False' gain_mode0: 'True'
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: 'True' trigger0: 'False'
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
......
...@@ -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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment