fpga: rfnoc: radio: Add clock index parameters

This allows the BSP files that instantiate radio blocks to pass in clock
indices.


Original-commit: c669d16a0a500de6b10b0817c7ebbd175818f2cb
This commit is contained in:
Martin Braun
2023-10-17 10:24:15 -05:00
committed by Wade Fife
parent e016ef0343
commit 613444b39b
2 changed files with 26 additions and 12 deletions
@@ -12,10 +12,16 @@
//
// Parameters:
//
// THIS_PORTID : Control crossbar port to which this block is connected
// CHDR_W : AXIS-CHDR data bus width
// MTU : Maximum transmission unit (i.e., maximum packet size in
// CHDR words is 2**MTU).
// THIS_PORTID : Control crossbar port to which this block is connected
// CHDR_W : AXIS-CHDR data bus width
// CTRL_CLK_IDX : The index of the control clock for this block. This is used
// to populate the backend interface, from where UHD can query
// the clock index and thus auto-deduct which clock is used.
// TB_CLK_IDX : The index of the timebase clock for this block. This is used
// to populate the backend interface, from where UHD can query
// the clock index and thus auto-deduct which clock is used.
// MTU : Maximum transmission unit (i.e., maximum packet size in
// CHDR words is 2**MTU).
//
`default_nettype none
@@ -24,6 +30,8 @@
module noc_shell_radio #(
parameter [9:0] THIS_PORTID = 10'd0,
parameter CHDR_W = 64,
parameter [5:0] CTRL_CLK_IDX = 6'h3F,
parameter [5:0] TB_CLK_IDX = 6'h3F,
parameter [5:0] MTU = 10,
parameter NUM_PORTS = 2,
parameter NIPC = 1,
@@ -146,6 +154,8 @@ module noc_shell_radio #(
.NUM_DATA_I (0+NUM_PORTS),
.NUM_DATA_O (0+NUM_PORTS),
.CTRL_FIFOSIZE ($clog2(512)),
.CTRL_CLK_IDX (CTRL_CLK_IDX),
.TB_CLK_IDX (TB_CLK_IDX),
.MTU (MTU)
) backend_iface_i (
.rfnoc_chdr_clk (rfnoc_chdr_clk),
@@ -22,14 +22,16 @@
module rfnoc_block_radio #(
parameter THIS_PORTID = 0,
parameter CHDR_W = 64,
parameter NIPC = 1,
parameter ITEM_W = 32,
parameter NUM_PORTS = 2,
parameter MTU = 10,
parameter PERIPH_BASE_ADDR = 20'h80000,
parameter PERIPH_ADDR_W = 19
parameter THIS_PORTID = 0,
parameter CHDR_W = 64,
parameter NIPC = 1,
parameter ITEM_W = 32,
parameter NUM_PORTS = 2,
parameter MTU = 10,
parameter PERIPH_BASE_ADDR = 20'h80000,
parameter PERIPH_ADDR_W = 19,
parameter [5:0] CTRL_CLK_IDX = 6'h3F,
parameter [5:0] TB_CLK_IDX = 6'h3F
) (
//---------------------------------------------------------------------------
// AXIS CHDR Port
@@ -166,6 +168,8 @@ module rfnoc_block_radio #(
noc_shell_radio #(
.THIS_PORTID (THIS_PORTID),
.CHDR_W (CHDR_W),
.CTRL_CLK_IDX (CTRL_CLK_IDX),
.TB_CLK_IDX (TB_CLK_IDX),
.MTU (MTU),
.NUM_PORTS (NUM_PORTS),
.NIPC (NIPC),