mpm/fpga: x4xx: Major updates in preparation for future devices
FPGA: - Split up MB registers that control daughterboard specific settings so that daughterboards 0 and 1 could have different setings, in preparation for future devices that require different settings. This requires a compat number bump to 8.0. - Add registers for additional RFDC information, including the block/tile mapping of the individual channels, and information about resampling capabilities - Identify sections of code that would be specific to X410/ZBX and move them to their own headers, so it's trivial to add device-specific sections of code instead for other devices in the future. - This includes constraints for clocks and I/O pins. - Remove ability to do timed ctrlport transactions to the MB CPLD, this was unused and possibly broken. - Move daughterboard-specific code into its own code location (dboards/zbx) - Move X410-specific register documentation to its own location (doc/X410) - Refactor Makefiles to split out X410/ZBX specific components and allow switching between device types - Add 512-bit AXI interconnects - Make number of timekeepers configurable (X410 keeps the single timekeeper) MPM: - Required compat is bumped to 8.0 - Now supports new registers for detecting DSP capabilities and multi-rate settings for the daughterboards - Adds MMCM controls (currently unused) Co-authored-by: Wade Fife <wade.fife@ni.com> Co-authored-by: Ryan Marlow <ryan@lmarlow.com> Co-authored-by: Martin Braun <martin.braun@ettus.com> Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com> Original-commit: c1d268917ea65dd9c5a42366014cb96d3c025223
This commit is contained in:
committed by
Martin Braun
co-authored by
Wade Fife
Ryan Marlow
Martin Braun
Humberto Jimenez
parent
ffdcc016cc
commit
adf6f576c6
@@ -8,11 +8,14 @@ RF_COMMON_SRCS = $(abspath $(addprefix $(BASE_DIR)/../top/x400/rf/common/, \
|
||||
PkgRf.vhd \
|
||||
axis_mux.vhd \
|
||||
capture_sysref.v \
|
||||
clock_gates.vhd \
|
||||
gpio_to_axis_mux.vhd \
|
||||
rf_nco_reset.vhd \
|
||||
rf_reset.vhd \
|
||||
rf_reset_controller.vhd \
|
||||
scale_2x.vhd \
|
||||
sync_wrapper.v \
|
||||
))
|
||||
|
||||
RF_X410_SRCS = $(abspath $(addprefix $(BASE_DIR)/../top/x400/rf/x410/, \
|
||||
x410_rf_reset_controller.vhd \
|
||||
x410_clock_gates.vhd \
|
||||
))
|
||||
|
||||
@@ -7,8 +7,15 @@
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
// Capture SYSREF and transfer it to the higher clock domain. Module incurs
|
||||
// in 2 pll_ref_clk cycles + 1 rfdc_clk cycle of delay.
|
||||
// Capture SYSREF and transfer it to the higher clock domain.
|
||||
// For X410, module incurs in 2 pll_ref_clk cycles + 1 rfdc_clk
|
||||
// cycle of delay. For X440, module synchronizes to each
|
||||
// pll_ref_clk and rfdc_clk separately, incurring in 2 cycles
|
||||
// for each clock.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// DEVICE_TYPE : Type of device for which SYSREF is synchronized.
|
||||
//
|
||||
|
||||
module capture_sysref (
|
||||
@@ -25,7 +32,9 @@ module capture_sysref (
|
||||
output wire sysref_out_rclk // RFDC output (Domain: rfdc_clk).
|
||||
);
|
||||
|
||||
reg sysref_pclk_ms = 1'b0, sysref_pclk = 1'b0, sysref_rclk = 1'b0;
|
||||
(* ASYNC_REG = "TRUE" *) reg sysref_pclk_ms = 1'b0;
|
||||
reg sysref_pclk = 1'b0;
|
||||
reg sysref_rclk = 1'b0;
|
||||
|
||||
// Capture SYSREF synchronously with the pll_ref_clk, but double-sync it just
|
||||
// in case static timing isn't met so as not to destroy downstream logic.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--
|
||||
-- Copyright 2021 Ettus Research, a National Instruments Brand
|
||||
-- Copyright 2022 Ettus Research, a National Instruments Brand
|
||||
--
|
||||
-- SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
--
|
||||
@@ -38,8 +38,6 @@ entity gpio_to_axis_mux is
|
||||
|
||||
-- mux_select(n) chooses the data source for AXIS interface n.
|
||||
-- '0' chooses s_axis_tdata_n. '1' chooses gpio as the data source.
|
||||
-- The only used bits are 0, 1, 4, 5. The remaining bits are reserved for
|
||||
-- future expansion.
|
||||
mux_select : in std_logic_vector(7 downto 0);
|
||||
|
||||
s_axis_0_aclk : in std_logic;
|
||||
@@ -72,7 +70,39 @@ entity gpio_to_axis_mux is
|
||||
s_axis_tready_3 : out std_logic;
|
||||
m_axis_3_aclk : in std_logic;
|
||||
m_axis_tvalid_3 : out std_logic;
|
||||
m_axis_tdata_3 : out std_logic_vector(kAxiWidth - 1 downto 0)
|
||||
m_axis_tdata_3 : out std_logic_vector(kAxiWidth - 1 downto 0);
|
||||
|
||||
s_axis_4_aclk : in std_logic;
|
||||
s_axis_tdata_4 : in std_logic_vector(kAxiWidth - 1 downto 0);
|
||||
s_axis_tvalid_4 : in std_logic;
|
||||
s_axis_tready_4 : out std_logic;
|
||||
m_axis_4_aclk : in std_logic;
|
||||
m_axis_tvalid_4 : out std_logic;
|
||||
m_axis_tdata_4 : out std_logic_vector(kAxiWidth - 1 downto 0);
|
||||
|
||||
s_axis_5_aclk : in std_logic;
|
||||
s_axis_tdata_5 : in std_logic_vector(kAxiWidth - 1 downto 0);
|
||||
s_axis_tvalid_5 : in std_logic;
|
||||
s_axis_tready_5 : out std_logic;
|
||||
m_axis_5_aclk : in std_logic;
|
||||
m_axis_tvalid_5 : out std_logic;
|
||||
m_axis_tdata_5 : out std_logic_vector(kAxiWidth - 1 downto 0);
|
||||
|
||||
s_axis_6_aclk : in std_logic;
|
||||
s_axis_tdata_6 : in std_logic_vector(kAxiWidth - 1 downto 0);
|
||||
s_axis_tvalid_6 : in std_logic;
|
||||
s_axis_tready_6 : out std_logic;
|
||||
m_axis_6_aclk : in std_logic;
|
||||
m_axis_tvalid_6 : out std_logic;
|
||||
m_axis_tdata_6 : out std_logic_vector(kAxiWidth - 1 downto 0);
|
||||
|
||||
s_axis_7_aclk : in std_logic;
|
||||
s_axis_tdata_7 : in std_logic_vector(kAxiWidth - 1 downto 0);
|
||||
s_axis_tvalid_7 : in std_logic;
|
||||
s_axis_tready_7 : out std_logic;
|
||||
m_axis_7_aclk : in std_logic;
|
||||
m_axis_tvalid_7 : out std_logic;
|
||||
m_axis_tdata_7 : out std_logic_vector(kAxiWidth - 1 downto 0)
|
||||
);
|
||||
end entity;
|
||||
|
||||
@@ -118,7 +148,7 @@ begin
|
||||
kAxiWidth => kAxiWidth)
|
||||
port map (
|
||||
gpio => gpio,
|
||||
mux_select => mux_select(4),
|
||||
mux_select => mux_select(2),
|
||||
s_axis_aclk => s_axis_2_aclk,
|
||||
s_axis_tdata => s_axis_tdata_2,
|
||||
s_axis_tvalid => s_axis_tvalid_2,
|
||||
@@ -134,7 +164,7 @@ begin
|
||||
kAxiWidth => kAxiWidth)
|
||||
port map (
|
||||
gpio => gpio,
|
||||
mux_select => mux_select(5),
|
||||
mux_select => mux_select(3),
|
||||
s_axis_aclk => s_axis_3_aclk,
|
||||
s_axis_tdata => s_axis_tdata_3,
|
||||
s_axis_tvalid => s_axis_tvalid_3,
|
||||
@@ -144,4 +174,69 @@ begin
|
||||
m_axis_tdata => m_axis_tdata_3
|
||||
);
|
||||
|
||||
axis_mux4: entity work.axis_mux (RTL)
|
||||
generic map (
|
||||
kGpioWidth => kGpioWidth,
|
||||
kAxiWidth => kAxiWidth)
|
||||
port map (
|
||||
gpio => gpio,
|
||||
mux_select => mux_select(4),
|
||||
s_axis_aclk => s_axis_4_aclk,
|
||||
s_axis_tdata => s_axis_tdata_4,
|
||||
s_axis_tvalid => s_axis_tvalid_4,
|
||||
s_axis_tready => s_axis_tready_4,
|
||||
m_axis_aclk => m_axis_4_aclk,
|
||||
m_axis_tvalid => m_axis_tvalid_4,
|
||||
m_axis_tdata => m_axis_tdata_4
|
||||
);
|
||||
|
||||
axis_mux5: entity work.axis_mux (RTL)
|
||||
generic map (
|
||||
kGpioWidth => kGpioWidth,
|
||||
kAxiWidth => kAxiWidth)
|
||||
port map (
|
||||
gpio => gpio,
|
||||
mux_select => mux_select(5),
|
||||
s_axis_aclk => s_axis_5_aclk,
|
||||
s_axis_tdata => s_axis_tdata_5,
|
||||
s_axis_tvalid => s_axis_tvalid_5,
|
||||
s_axis_tready => s_axis_tready_5,
|
||||
m_axis_aclk => m_axis_5_aclk,
|
||||
m_axis_tvalid => m_axis_tvalid_5,
|
||||
m_axis_tdata => m_axis_tdata_5
|
||||
);
|
||||
|
||||
axis_mux6: entity work.axis_mux (RTL)
|
||||
generic map (
|
||||
kGpioWidth => kGpioWidth,
|
||||
kAxiWidth => kAxiWidth)
|
||||
port map (
|
||||
gpio => gpio,
|
||||
mux_select => mux_select(6),
|
||||
s_axis_aclk => s_axis_6_aclk,
|
||||
s_axis_tdata => s_axis_tdata_6,
|
||||
s_axis_tvalid => s_axis_tvalid_6,
|
||||
s_axis_tready => s_axis_tready_6,
|
||||
m_axis_aclk => m_axis_6_aclk,
|
||||
m_axis_tvalid => m_axis_tvalid_6,
|
||||
m_axis_tdata => m_axis_tdata_6
|
||||
);
|
||||
|
||||
axis_mux7: entity work.axis_mux (RTL)
|
||||
generic map (
|
||||
kGpioWidth => kGpioWidth,
|
||||
kAxiWidth => kAxiWidth)
|
||||
port map (
|
||||
gpio => gpio,
|
||||
mux_select => mux_select(7),
|
||||
s_axis_aclk => s_axis_7_aclk,
|
||||
s_axis_tdata => s_axis_tdata_7,
|
||||
s_axis_tvalid => s_axis_tvalid_7,
|
||||
s_axis_tready => s_axis_tready_7,
|
||||
m_axis_aclk => m_axis_7_aclk,
|
||||
m_axis_tvalid => m_axis_tvalid_7,
|
||||
m_axis_tdata => m_axis_tdata_7
|
||||
);
|
||||
|
||||
|
||||
end RTL;
|
||||
|
||||
@@ -59,6 +59,13 @@ entity rf_nco_reset is
|
||||
cAdc0xNcoUpdateBusy : in std_logic;
|
||||
cAdc0xNcoUpdateReq : out std_logic := '0';
|
||||
|
||||
-----------------------------------
|
||||
--ADC Tile 225
|
||||
-----------------------------------
|
||||
-- ADC common NCO update controls and status.
|
||||
cAdc1xNcoUpdateBusy : in std_logic;
|
||||
cAdc1xNcoUpdateReq : out std_logic := '0';
|
||||
|
||||
-----------------------------------
|
||||
--ADC Tile 226
|
||||
-----------------------------------
|
||||
@@ -66,6 +73,13 @@ entity rf_nco_reset is
|
||||
cAdc2xNcoUpdateBusy : in std_logic;
|
||||
cAdc2xNcoUpdateReq : out std_logic := '0';
|
||||
|
||||
-----------------------------------
|
||||
--ADC Tile 227
|
||||
-----------------------------------
|
||||
-- ADC common NCO update controls and status.
|
||||
cAdc3xNcoUpdateBusy : in std_logic;
|
||||
cAdc3xNcoUpdateReq : out std_logic := '0';
|
||||
|
||||
-- NCO reset can be initiated only when cNcoPhaseRst is set to '1' and
|
||||
-- cNcoUpdateEn = 0x20. The FSM in this entity will set these values when
|
||||
-- an NCO reset is initiated during synchronization. These ports are common
|
||||
@@ -146,7 +160,9 @@ begin
|
||||
cDac0xSysrefIntReenable <= '0';
|
||||
cDac1xNcoUpdateReq <= '0';
|
||||
cAdc0xNcoUpdateReq <= '0';
|
||||
cAdc1xNcoUpdateReq <= '0';
|
||||
cAdc2xNcoUpdateReq <= '0';
|
||||
cAdc3xNcoUpdateReq <= '0';
|
||||
case cResetState is
|
||||
-- Stay in this state until NCO reset sequence is initiated. NCO reset
|
||||
-- is initiated only on the rising edge of SYSREF.
|
||||
@@ -177,7 +193,9 @@ begin
|
||||
cResetState <= CheckUpdateDone;
|
||||
cDac1xNcoUpdateReq <= '1';
|
||||
cAdc0xNcoUpdateReq <= '1';
|
||||
cAdc1xNcoUpdateReq <= '1';
|
||||
cAdc2xNcoUpdateReq <= '1';
|
||||
cAdc3xNcoUpdateReq <= '1';
|
||||
end if;
|
||||
|
||||
-- In this state, we check if the RFDC block is ready for NCO reset.
|
||||
@@ -187,7 +205,8 @@ begin
|
||||
cSysrefIntGating <= '1';
|
||||
cResetState <= CheckUpdateDone;
|
||||
if cDac0xNcoUpdateBusy = "10" and cAdc0xNcoUpdateBusy = '0' and
|
||||
cAdc2xNcoUpdateBusy = '0' and cDac1xNcoUpdateBusy = '0' and
|
||||
cAdc1xNcoUpdateBusy = '0' and cAdc2xNcoUpdateBusy = '0' and
|
||||
cAdc3xNcoUpdateBusy = '0' and cDac1xNcoUpdateBusy = '0' and
|
||||
cSysref = '1' and cSysrefDlyd = '0' then
|
||||
cDac0xSysrefIntReenable <= '1';
|
||||
cResetState <= CheckResetDone;
|
||||
|
||||
Reference in New Issue
Block a user