From f5119fb5f0103dfb4bd9871915c44dd855a08b91 Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Thu, 28 Jun 2018 15:07:58 -0700 Subject: rfnoc: Merge block controller header files from rfnoc-devel --- host/include/uhd/rfnoc/CMakeLists.txt | 4 ++ host/include/uhd/rfnoc/blocks/fft.xml | 81 ++++++++++++++++++++---------- host/include/uhd/rfnoc/blocks/fosphor.xml | 82 ++++++++++++++++++++++++------- 3 files changed, 123 insertions(+), 44 deletions(-) diff --git a/host/include/uhd/rfnoc/CMakeLists.txt b/host/include/uhd/rfnoc/CMakeLists.txt index 6ed9fd3c3..44d0490f4 100644 --- a/host/include/uhd/rfnoc/CMakeLists.txt +++ b/host/include/uhd/rfnoc/CMakeLists.txt @@ -28,7 +28,11 @@ IF(ENABLE_RFNOC) # Block controllers ddc_block_ctrl.hpp duc_block_ctrl.hpp + fir_block_ctrl.hpp + null_block_ctrl.hpp radio_ctrl.hpp + siggen_block_ctrl.hpp + window_block_ctrl.hpp DESTINATION ${INCLUDE_DIR}/uhd/rfnoc COMPONENT headers ) diff --git a/host/include/uhd/rfnoc/blocks/fft.xml b/host/include/uhd/rfnoc/blocks/fft.xml index 7dd2eff46..af51d0ddb 100644 --- a/host/include/uhd/rfnoc/blocks/fft.xml +++ b/host/include/uhd/rfnoc/blocks/fft.xml @@ -21,6 +21,18 @@ MAGNITUDE_OUT
133
+ + FFT_DIRECTION +
134
+
+ + FFT_SCALING +
135
+
+ + FFT_SHIFT_CONFIG +
136
+
RB_FFT_RESET
0
@@ -29,26 +41,62 @@ RB_MAGNITUDE_OUT
1
+ + RB_FFT_SIZE_LOG2 +
2
+
+ + RB_FFT_DIRECTION +
3
+
+ + RB_FFT_SCALING +
4
+
+ + RB_FFT_SHIFT_CONFIG +
5
+
- spp int 256 GE($spp, 16) AND LE($spp, 4096) AND IS_PWR_OF_2($spp) FFT size must be in [16, 4096] and a power of two. - SR_WRITE("FFT_SIZE_LOG2", LOG2($spp)) AND SR_WRITE("AXIS_CONFIG_BUS", ADD(873472, LOG2($spp))) + SR_WRITE("FFT_SIZE_LOG2", LOG2($spp)) + + + shift + string + normal + EQUAL($shift, "normal") OR EQUAL($shift, "reverse") OR EQUAL($shift, "natural") + FFT direction must be either "normal", "reverse", or "natural". + + IF(EQUAL($shift, "normal"), SR_WRITE("FFT_SHIFT_CONFIG", 0)) OR + IF(EQUAL($shift, "reverse"), SR_WRITE("FFT_SHIFT_CONFIG", 1)) OR + IF(EQUAL($shift, "natural"), SR_WRITE("FFT_SHIFT_CONFIG", 2)) + - ctrl_word + direction + string + forward + EQUAL($direction, "forward") OR EQUAL($direction, "reverse") + FFT direction must be either "forward" or "reverse". + + IF(EQUAL($direction, "forward"), SR_WRITE("FFT_DIRECTION", 1)) OR + IF(EQUAL($direction, "reverse"), SR_WRITE("FFT_DIRECTION", 0)) + + + + scaling int - 873472 - - - - SR_WRITE("AXIS_CONFIG_BUS", ADD($ctrl_word, LOG2($spp))) + + 1706 + SR_WRITE("FFT_SCALING", $scaling) otype @@ -96,21 +144,4 @@ %vlen - - - - - - - - - - - - - - - - - diff --git a/host/include/uhd/rfnoc/blocks/fosphor.xml b/host/include/uhd/rfnoc/blocks/fosphor.xml index 762b7c1bd..b1db73192 100644 --- a/host/include/uhd/rfnoc/blocks/fosphor.xml +++ b/host/include/uhd/rfnoc/blocks/fosphor.xml @@ -8,41 +8,53 @@ + + ENABLE +
160
+
+ + CLEAR +
161
+
+ + RANDOM +
162
+
DECIM -
129
+
168
OFFSET -
130
+
170
SCALE -
131
+
171
TRISE -
132
+
172
TDECAY -
133
+
173
ALPHA -
134
+
174
EPSILON -
135
+
175
- RANDOM -
136
+ WF_CTRL +
176
- CLEAR -
137
+ WF_DECIM +
177
@@ -52,6 +64,27 @@ int 1024
+ + enable + int + 3 + GE($enable, 0) AND LE($enable, 3) + "fosphor enable value must be within [0, 3]" + SR_WRITE("ENABLE", $enable) + + + clear + int + IF(NOT(EQUAL($clear, 0)), SR_WRITE("CLEAR", $clear)) + + + random + int + 3 + GE($random, 0) AND LE($random, 3) + "fosphor random mode value must be within [0, 3]" + SR_WRITE("RANDOM", $random) + decim int @@ -109,17 +142,20 @@ SR_WRITE("EPSILON", $epsilon) - random + wf_ctrl int - 1 - GE($random, 0) AND LE($random, 3) - "fosphor random value must be within [0, 65535]" - SR_WRITE("RANDOM", $random) + 0 + GE($wf_ctrl, 0) AND LE($enable, 255) + "fosphor wf_ctrl value must be within [0, 255]" + SR_WRITE("WF_CTRL", $wf_ctrl) - clear + wf_decim int - IF(NOT(EQUAL($clear, 0)), SR_WRITE("CLEAR", $clear)) + 8 + GE($wf_decim, 2) AND LE($wf_decim, 256) + fosphor wf_decim constant must be within [2, 256] + SR_WRITE("WF_DECIM", ADD($wf_decim, -2))
@@ -131,10 +167,18 @@ %vlen - out + out_hist + u8 + $spp + %vlen + 0 + + + out_wf u8 $spp %vlen + 1 -- cgit v1.2.3