From 2c5a2f597465e99d885b73dde0f2c33f67dc23ca Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 18 Oct 2023 14:25:26 +0200 Subject: [PATCH] x4xx: Add support for auto clock ID - Update X410 and X440 BSP YAML files to properly index clocks - Update image core files to declare clock indices - Update get_clocks() in MPM to return the correct values This does not include changes to the x400_radio_control block registry. This change by itself will thus not change behaviour. Original-commit: f215af2ccde6420b685b4ca493c8bd71d28781cb --- top/x400/x410_200_rfnoc_image_core.v | 4 ++++ top/x400/x410_200_rfnoc_image_core.yml | 6 ++++++ top/x400/x410_400_d_rfnoc_image_core.v | 4 ++++ top/x400/x410_400_d_rfnoc_image_core.yml | 6 ++++++ top/x400/x410_400_rfnoc_image_core.v | 4 ++++ top/x400/x410_400_rfnoc_image_core.yml | 6 ++++++ top/x400/x410_cg_200_rfnoc_image_core.v | 4 ++++ top/x400/x410_cg_200_rfnoc_image_core.yml | 6 ++++++ top/x400/x410_x4c_200_rfnoc_image_core.v | 4 ++++ top/x400/x410_x4c_200_rfnoc_image_core.yml | 6 ++++++ top/x400/x440_1600_d_rfnoc_image_core.v | 4 ++++ top/x400/x440_1600_d_rfnoc_image_core.yml | 6 ++++++ top/x400/x440_1600_rfnoc_image_core.v | 4 ++++ top/x400/x440_1600_rfnoc_image_core.yml | 6 ++++++ top/x400/x440_400_d_rfnoc_image_core.v | 4 ++++ top/x400/x440_400_d_rfnoc_image_core.yml | 6 ++++++ top/x400/x440_400_rfnoc_image_core.v | 4 ++++ top/x400/x440_400_rfnoc_image_core.yml | 6 ++++++ 18 files changed, 90 insertions(+) diff --git a/top/x400/x410_200_rfnoc_image_core.v b/top/x400/x410_200_rfnoc_image_core.v index 2f5c661..9bfb858 100644 --- a/top/x400/x410_200_rfnoc_image_core.v +++ b/top/x400/x410_200_rfnoc_image_core.v @@ -1137,6 +1137,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_2 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -1310,6 +1312,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio1_5 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x410_200_rfnoc_image_core.yml b/top/x400/x410_200_rfnoc_image_core.yml index e0f0bab..4372043 100644 --- a/top/x400/x410_200_rfnoc_image_core.yml +++ b/top/x400/x410_200_rfnoc_image_core.yml @@ -63,6 +63,10 @@ noc_blocks: parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio # The clock that is used for the timebase. duc1: block_desc: 'duc.yml' parameters: @@ -76,6 +80,8 @@ noc_blocks: parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio replay0: block_desc: 'replay.yml' parameters: diff --git a/top/x400/x410_400_d_rfnoc_image_core.v b/top/x400/x410_400_d_rfnoc_image_core.v index 8ef22ce..82bb03d 100644 --- a/top/x400/x410_400_d_rfnoc_image_core.v +++ b/top/x400/x410_400_d_rfnoc_image_core.v @@ -1031,6 +1031,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_0 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -1114,6 +1116,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio1_1 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x410_400_d_rfnoc_image_core.yml b/top/x400/x410_400_d_rfnoc_image_core.yml index f130dcf..135856f 100644 --- a/top/x400/x410_400_d_rfnoc_image_core.yml +++ b/top/x400/x410_400_d_rfnoc_image_core.yml @@ -55,11 +55,17 @@ noc_blocks: parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio # The clock that is used for the timebase. radio1: block_desc: 'radio.yml' parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio replay0: block_desc: 'replay.yml' parameters: diff --git a/top/x400/x410_400_rfnoc_image_core.v b/top/x400/x410_400_rfnoc_image_core.v index ea94bd7..f0a503b 100644 --- a/top/x400/x410_400_rfnoc_image_core.v +++ b/top/x400/x410_400_rfnoc_image_core.v @@ -699,6 +699,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_0 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -782,6 +784,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio1_1 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x410_400_rfnoc_image_core.yml b/top/x400/x410_400_rfnoc_image_core.yml index 26f6520..27264d3 100644 --- a/top/x400/x410_400_rfnoc_image_core.yml +++ b/top/x400/x410_400_rfnoc_image_core.yml @@ -39,11 +39,17 @@ noc_blocks: parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio # The clock that is used for the timebase. radio1: block_desc: 'radio.yml' parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio # A list of all static connections in design # ------------------------------------------ diff --git a/top/x400/x410_cg_200_rfnoc_image_core.v b/top/x400/x410_cg_200_rfnoc_image_core.v index 730a221..eeaa5ee 100644 --- a/top/x400/x410_cg_200_rfnoc_image_core.v +++ b/top/x400/x410_cg_200_rfnoc_image_core.v @@ -1137,6 +1137,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_2 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -1310,6 +1312,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio1_5 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x410_cg_200_rfnoc_image_core.yml b/top/x400/x410_cg_200_rfnoc_image_core.yml index 6f2ec07..ebc02e0 100644 --- a/top/x400/x410_cg_200_rfnoc_image_core.yml +++ b/top/x400/x410_cg_200_rfnoc_image_core.yml @@ -72,6 +72,10 @@ noc_blocks: parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio # The clock that is used for the timebase. duc1: block_desc: 'duc.yml' parameters: @@ -85,6 +89,8 @@ noc_blocks: parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio replay0: block_desc: 'replay.yml' parameters: diff --git a/top/x400/x410_x4c_200_rfnoc_image_core.v b/top/x400/x410_x4c_200_rfnoc_image_core.v index b0aa8ac..052c9af 100644 --- a/top/x400/x410_x4c_200_rfnoc_image_core.v +++ b/top/x400/x410_x4c_200_rfnoc_image_core.v @@ -805,6 +805,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_2 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -978,6 +980,8 @@ module rfnoc_image_core #( .NUM_PORTS (2), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio1_5 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x410_x4c_200_rfnoc_image_core.yml b/top/x400/x410_x4c_200_rfnoc_image_core.yml index af160e8..ade19ed 100644 --- a/top/x400/x410_x4c_200_rfnoc_image_core.yml +++ b/top/x400/x410_x4c_200_rfnoc_image_core.yml @@ -52,6 +52,10 @@ noc_blocks: parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio # The clock that is used for the timebase. duc1: block_desc: 'duc.yml' parameters: @@ -65,6 +69,8 @@ noc_blocks: parameters: NUM_PORTS: 2 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio # A list of all static connections in design # ------------------------------------------ diff --git a/top/x400/x440_1600_d_rfnoc_image_core.v b/top/x400/x440_1600_d_rfnoc_image_core.v index 1417a91..fa1478b 100644 --- a/top/x400/x440_1600_d_rfnoc_image_core.v +++ b/top/x400/x440_1600_d_rfnoc_image_core.v @@ -707,6 +707,8 @@ module rfnoc_image_core #( .NUM_PORTS (1), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_0 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -790,6 +792,8 @@ module rfnoc_image_core #( .NUM_PORTS (1), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (5), .MTU (BLOCK_MTU) ) b_radio1_1 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x440_1600_d_rfnoc_image_core.yml b/top/x400/x440_1600_d_rfnoc_image_core.yml index f15ea3e..0fd014d 100644 --- a/top/x400/x440_1600_d_rfnoc_image_core.yml +++ b/top/x400/x440_1600_d_rfnoc_image_core.yml @@ -57,11 +57,17 @@ noc_blocks: parameters: NUM_PORTS: 1 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio0 # The clock that is used for the timebase. radio1: block_desc: 'radio.yml' parameters: NUM_PORTS: 1 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio1 replay0: block_desc: 'replay.yml' parameters: diff --git a/top/x400/x440_1600_rfnoc_image_core.v b/top/x400/x440_1600_rfnoc_image_core.v index 58f8936..36f9aea 100644 --- a/top/x400/x440_1600_rfnoc_image_core.v +++ b/top/x400/x440_1600_rfnoc_image_core.v @@ -539,6 +539,8 @@ module rfnoc_image_core #( .NUM_PORTS (1), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_0 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -622,6 +624,8 @@ module rfnoc_image_core #( .NUM_PORTS (1), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (5), .MTU (BLOCK_MTU) ) b_radio1_1 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x440_1600_rfnoc_image_core.yml b/top/x400/x440_1600_rfnoc_image_core.yml index f6cb9a9..67a9971 100644 --- a/top/x400/x440_1600_rfnoc_image_core.yml +++ b/top/x400/x440_1600_rfnoc_image_core.yml @@ -47,11 +47,17 @@ noc_blocks: parameters: NUM_PORTS: 1 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio0 # The clock that is used for the timebase. radio1: block_desc: 'radio.yml' parameters: NUM_PORTS: 1 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio1 # A list of all static connections in design # ------------------------------------------ diff --git a/top/x400/x440_400_d_rfnoc_image_core.v b/top/x400/x440_400_d_rfnoc_image_core.v index 13ecab6..c76cc4b 100644 --- a/top/x400/x440_400_d_rfnoc_image_core.v +++ b/top/x400/x440_400_d_rfnoc_image_core.v @@ -1691,6 +1691,8 @@ module rfnoc_image_core #( .NUM_PORTS (4), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_0 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -1774,6 +1776,8 @@ module rfnoc_image_core #( .NUM_PORTS (4), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (5), .MTU (BLOCK_MTU) ) b_radio1_1 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x440_400_d_rfnoc_image_core.yml b/top/x400/x440_400_d_rfnoc_image_core.yml index dc73ff1..3f27cdc 100644 --- a/top/x400/x440_400_d_rfnoc_image_core.yml +++ b/top/x400/x440_400_d_rfnoc_image_core.yml @@ -117,11 +117,17 @@ noc_blocks: parameters: NUM_PORTS: 4 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio0 # The clock that is used for the timebase. radio1: block_desc: 'radio.yml' parameters: NUM_PORTS: 4 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio1 replay0: block_desc: 'replay.yml' parameters: diff --git a/top/x400/x440_400_rfnoc_image_core.v b/top/x400/x440_400_rfnoc_image_core.v index f3fa2ef..925b65e 100644 --- a/top/x400/x440_400_rfnoc_image_core.v +++ b/top/x400/x440_400_rfnoc_image_core.v @@ -1031,6 +1031,8 @@ module rfnoc_image_core #( .NUM_PORTS (4), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (4), .MTU (BLOCK_MTU) ) b_radio0_0 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), @@ -1114,6 +1116,8 @@ module rfnoc_image_core #( .NUM_PORTS (4), .NIPC (RADIO_NIPC), .ITEM_W (32), + .CTRL_CLK_IDX (1), + .TB_CLK_IDX (5), .MTU (BLOCK_MTU) ) b_radio1_1 ( .rfnoc_chdr_clk (rfnoc_chdr_clk), diff --git a/top/x400/x440_400_rfnoc_image_core.yml b/top/x400/x440_400_rfnoc_image_core.yml index a3591ba..ea57b92 100644 --- a/top/x400/x440_400_rfnoc_image_core.yml +++ b/top/x400/x440_400_rfnoc_image_core.yml @@ -78,11 +78,17 @@ noc_blocks: parameters: NUM_PORTS: 4 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl # The clock that is used for the control + # interface. This is the default clock, + # so we could skip it. + timebase_clock: _device_.radio0 # The clock that is used for the timebase. radio1: block_desc: 'radio.yml' parameters: NUM_PORTS: 4 NIPC: RADIO_NIPC + ctrl_clock: _device_.rfnoc_ctrl + timebase_clock: _device_.radio1 # A list of all static connections in design # ------------------------------------------