fpga: x4xx: replace ADC/DAC info by RFDC memory

Original-commit: 6c6d52fd655b144aa5ee581edae7911dc734854e
This commit is contained in:
Max Köhler
2025-03-20 09:07:06 +01:00
committed by Jörg Hofrichter
parent 37b8b0d017
commit 50f20ef4ab
14 changed files with 525 additions and 208 deletions
@@ -0,0 +1,58 @@
//
// Copyright 2025 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: LGPL-3.0-or-later
//
// Module: x440_rfdc_memory_content_pkg
//
// Description:
//
// This package will generate the device specific RFDC memory entries to be
// used by the RFDC memory module.
//
package x440_rfdc_memory_content_pkg;
import rfdc_info_pkg::*;
function automatic rfdc_memory_entry_t get_memory_entry(
input int i
);
localparam USED_ENTRIES = 16;
rfdc_memory_entry_t entries [USED_ENTRIES] = '{
// See corresponding code in x4xx.sv where ADC data (adc_data_out_tdata) is
// assigned to rx_data_qi.
// DB 0 uses tiles 224 and 225
'{is_adc:1, db:0, channel:0, reserved2:0, tile:1, block:1, block_mode:ENABLED},
'{is_adc:1, db:0, channel:1, reserved2:0, tile:0, block:1, block_mode:ENABLED},
'{is_adc:1, db:0, channel:2, reserved2:0, tile:0, block:0, block_mode:ENABLED},
'{is_adc:1, db:0, channel:3, reserved2:0, tile:1, block:0, block_mode:ENABLED},
// DB 1 uses tiles 226 and 227
'{is_adc:1, db:1, channel:0, reserved2:0, tile:3, block:1, block_mode:ENABLED},
'{is_adc:1, db:1, channel:1, reserved2:0, tile:2, block:1, block_mode:ENABLED},
'{is_adc:1, db:1, channel:2, reserved2:0, tile:2, block:0, block_mode:ENABLED},
'{is_adc:1, db:1, channel:3, reserved2:0, tile:3, block:0, block_mode:ENABLED},
// See corresponding code in x4xx.sv where DAC data (dac_data_in_tdata) is
// assigned from tx_data_qi.
// DB 0 uses tile 228
'{is_adc:0, db:0, channel:0, reserved2:0, tile:0, block:0, block_mode:ENABLED},
'{is_adc:0, db:0, channel:1, reserved2:0, tile:0, block:2, block_mode:ENABLED},
'{is_adc:0, db:0, channel:2, reserved2:0, tile:0, block:3, block_mode:ENABLED},
'{is_adc:0, db:0, channel:3, reserved2:0, tile:0, block:1, block_mode:ENABLED},
// DB 1 uses tile 229
'{is_adc:0, db:1, channel:0, reserved2:0, tile:1, block:0, block_mode:ENABLED},
'{is_adc:0, db:1, channel:1, reserved2:0, tile:1, block:2, block_mode:ENABLED},
'{is_adc:0, db:1, channel:2, reserved2:0, tile:1, block:3, block_mode:ENABLED},
'{is_adc:0, db:1, channel:3, reserved2:0, tile:1, block:1, block_mode:ENABLED}
};
if (i < USED_ENTRIES) begin
return entries[i];
// return an disable entry for remaining entries
end else begin
return EMPTY_ENTRY;
end
endfunction
endpackage