diff --git a/fpga/usrp3/top/x400/x410_X4_100_rfnoc_image_core.yml b/fpga/usrp3/top/x400/x410_X4_100_rfnoc_image_core.yml index 3d79c8c7c..0b218c0b3 100644 --- a/fpga/usrp3/top/x400/x410_X4_100_rfnoc_image_core.yml +++ b/fpga/usrp3/top/x400/x410_X4_100_rfnoc_image_core.yml @@ -16,18 +16,3 @@ inherit: parameters: RF_BW: 100 - -noc_blocks: - # Workaround for bug in NIPC calculation in DDC/DUC block configuration yaml for BW < 200 MHz. - duc0: - parameters: - NIPC: 1 - ddc0: - parameters: - NIPC: 1 - duc1: - parameters: - NIPC: 1 - ddc1: - parameters: - NIPC: 1 diff --git a/host/include/uhd/rfnoc/blocks/ddc.yml b/host/include/uhd/rfnoc/blocks/ddc.yml index 3668d0f37..fcb0f0749 100644 --- a/host/include/uhd/rfnoc/blocks/ddc.yml +++ b/host/include/uhd/rfnoc/blocks/ddc.yml @@ -19,7 +19,9 @@ parameters: # 2 that can support the given RF_BW, assuming each of the NIPC parallel # chains supports 200 MHz of RF bandwidth (with a corresponding sampling rate # of 250 MSps). If RF_BW is not provided or is zero, NIPC defaults to 1. - NIPC: "${ 1 << ((-(-int(config.device.parameters.get('RF_BW', 200) // 200)) - 1).bit_length()) }" + NIPC: >- + ${ 1 << ((max(1, -(-int(config.device.parameters.get('RF_BW', 200)) + // 200)) - 1).bit_length()) } clocks: - name: rfnoc_chdr diff --git a/host/include/uhd/rfnoc/blocks/duc.yml b/host/include/uhd/rfnoc/blocks/duc.yml index 772d82f7e..93fe7f85a 100644 --- a/host/include/uhd/rfnoc/blocks/duc.yml +++ b/host/include/uhd/rfnoc/blocks/duc.yml @@ -19,7 +19,9 @@ parameters: # 2 that can support the given RF_BW, assuming each of the NIPC parallel # chains supports 200 MHz of RF bandwidth (with a corresponding sampling rate # of 250 MSps). If RF_BW is not provided or is zero, NIPC defaults to 1. - NIPC: "${ 1 << ((-(-int(config.device.parameters.get('RF_BW', 200) // 200)) - 1).bit_length()) }" + NIPC: >- + ${ 1 << ((max(1, -(-int(config.device.parameters.get('RF_BW', 200)) + // 200)) - 1).bit_length()) } clocks: - name: rfnoc_chdr