Skip to content

Commit 64452c1

Browse files
committed
feat: Add MISC signals between Top-Level and NET_MOD core
1 parent 8f52079 commit 64452c1

File tree

4 files changed

+46
-4
lines changed

4 files changed

+46
-4
lines changed

core/comp/eth/network_mod/comp/network_mod_core/network_mod_core_ent.vhd

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ generic(
6666
-- Ethernet lanes polarity
6767
LANE_RX_POLARITY : std_logic_vector(LANES-1 downto 0) := (others => '0');
6868
LANE_TX_POLARITY : std_logic_vector(LANES-1 downto 0) := (others => '0');
69+
-- Width of MISC signal between Top-Level FPGA design and NET_MOD core logic
70+
MISC_TOP2NET_WIDTH : natural := 1;
71+
-- Width of MISC signal between NET_MOD core logic and Top-Level FPGA design
72+
MISC_NET2TOP_WIDTH : natural := 1;
6973
-- Select correct FPGA device.
7074
-- "AGILEX", "STRATIX10", "ULTRASCALE", ...
7175
DEVICE : string := "STRATIX10"
@@ -138,6 +142,14 @@ port(
138142
MI_BE_PHY : in std_logic_vector(MI_DATA_WIDTH_PHY/8-1 downto 0);
139143
MI_DRD_PHY : out std_logic_vector(MI_DATA_WIDTH_PHY-1 downto 0);
140144
MI_ARDY_PHY : out std_logic;
141-
MI_DRDY_PHY : out std_logic
145+
MI_DRDY_PHY : out std_logic;
146+
147+
-- =========================================================================
148+
-- MISC SIGNALS (the clock signal is not defined)
149+
-- =========================================================================
150+
-- Optional signal for MISC connection from Top-Level FPGA design to NET_MOD core.
151+
MISC_TOP2NET : in std_logic_vector(MISC_TOP2NET_WIDTH-1 downto 0);
152+
-- Optional signal for MISC connection from NET_MOD core to Top-Level FPGA design.
153+
MISC_NET2TOP : out std_logic_vector(MISC_NET2TOP_WIDTH-1 downto 0) := (others => '0')
142154
);
143155
end entity;

core/comp/eth/network_mod/network_mod.vhd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ begin
445445
TX_DMA_CHANNELS => TX_DMA_CHANNELS ,
446446
LANE_RX_POLARITY => LANE_RX_POLARITY(p*LANES+LANES-1 downto p*LANES),
447447
LANE_TX_POLARITY => LANE_TX_POLARITY(p*LANES+LANES-1 downto p*LANES),
448+
MISC_TOP2NET_WIDTH => MISC_TOP2NET_WIDTH,
449+
MISC_NET2TOP_WIDTH => MISC_NET2TOP_WIDTH,
448450
DEVICE => DEVICE
449451
)
450452
port map (
@@ -499,7 +501,10 @@ begin
499501
MI_WR_PHY => mi_split_wr_phy (p),
500502
MI_DRD_PHY => mi_split_drd_phy (p),
501503
MI_ARDY_PHY => mi_split_ardy_phy(p),
502-
MI_DRDY_PHY => mi_split_drdy_phy(p)
504+
MI_DRDY_PHY => mi_split_drdy_phy(p),
505+
506+
MISC_TOP2NET => MISC_TOP2NET(p),
507+
MISC_NET2TOP => MISC_NET2TOP(p)
503508
);
504509

505510
-- =====================================================================

core/comp/eth/network_mod/network_mod_ent.vhd

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ generic(
8686
LANE_TX_POLARITY : std_logic_vector(ETH_PORTS*LANES-1 downto 0) := (others => '0');
8787
-- Number of user resets.
8888
RESET_WIDTH : natural := 8;
89+
-- Width of MISC signal between Top-Level FPGA design and NET_MOD core logic
90+
MISC_TOP2NET_WIDTH : natural := 1;
91+
-- Width of MISC signal between NET_MOD core logic and Top-Level FPGA design
92+
MISC_NET2TOP_WIDTH : natural := 1;
8993
-- Select correct FPGA device.
9094
DEVICE : string := "STRATIX10"; -- AGILEX, STRATIX10, ULTRASCALE
9195
BOARD : string := "DK-DEV-1SDX-P" -- 400G1, DK-DEV-AGI027RES, DK-DEV-1SDX-P
@@ -220,6 +224,14 @@ port(
220224
TSU_CLK : out std_logic;
221225
TSU_RST : out std_logic;
222226
TSU_TS_NS : in std_logic_vector(64-1 downto 0);
223-
TSU_TS_DV : in std_logic
227+
TSU_TS_DV : in std_logic;
228+
229+
-- =========================================================================
230+
-- MISC SIGNALS (the clock signal is not defined)
231+
-- =========================================================================
232+
-- Optional signal for MISC connection from Top-Level FPGA design to NET_MOD core.
233+
MISC_TOP2NET : in slv_array_t(ETH_PORTS-1 downto 0)(MISC_TOP2NET_WIDTH-1 downto 0) := (others => (others => '0'));
234+
-- Optional signal for MISC connection from NET_MOD core to Top-Level FPGA design.
235+
MISC_NET2TOP : out slv_array_t(ETH_PORTS-1 downto 0)(MISC_NET2TOP_WIDTH-1 downto 0)
224236
);
225237
end entity;

core/top/fpga_common.vhd

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ generic (
118118
MISC_TOP2PCIE_WIDTH : natural := 1;
119119
-- Width of MISC signal between PCIE core logic and Top-Level FPGA design
120120
MISC_PCIE2TOP_WIDTH : natural := 1;
121+
-- Width of MISC signal between Top-Level FPGA design and NET_MOD core logic
122+
MISC_TOP2NET_WIDTH : natural := 1;
123+
-- Width of MISC signal between NET_MOD core logic and Top-Level FPGA design
124+
MISC_NET2TOP_WIDTH : natural := 1;
121125

122126
DEVICE : string := "AGILEX";
123127
BOARD : string := "400G1"
@@ -263,6 +267,10 @@ port (
263267
MISC_TOP2PCIE : in slv_array_t(PCIE_ENDPOINTS-1 downto 0)(MISC_TOP2PCIE_WIDTH-1 downto 0) := (others => (others => '0'));
264268
-- Optional signal for MISC connection from PCIE core to Top-Level FPGA design.
265269
MISC_PCIE2TOP : out slv_array_t(PCIE_ENDPOINTS-1 downto 0)(MISC_PCIE2TOP_WIDTH-1 downto 0);
270+
-- Optional signal for MISC connection from Top-Level FPGA design to NET_MOD core.
271+
MISC_TOP2NET : in slv_array_t(ETH_PORTS-1 downto 0)(MISC_TOP2NET_WIDTH-1 downto 0) := (others => (others => '0'));
272+
-- Optional signal for MISC connection from NET_MOD core to Top-Level FPGA design.
273+
MISC_NET2TOP : out slv_array_t(ETH_PORTS-1 downto 0)(MISC_NET2TOP_WIDTH-1 downto 0);
266274
MISC_IN : in std_logic_vector(MISC_IN_WIDTH-1 downto 0) := (others => '0');
267275
MISC_OUT : out std_logic_vector(MISC_OUT_WIDTH-1 downto 0)
268276
);
@@ -1533,6 +1541,8 @@ begin
15331541
LANE_RX_POLARITY => ETH_LANE_RXPOLARITY,
15341542
LANE_TX_POLARITY => ETH_LANE_TXPOLARITY,
15351543
RESET_WIDTH => 1 ,
1544+
MISC_TOP2NET_WIDTH => MISC_TOP2NET_WIDTH,
1545+
MISC_NET2TOP_WIDTH => MISC_NET2TOP_WIDTH,
15361546
DEVICE => DEVICE ,
15371547
BOARD => BOARD ,
15381548

@@ -1634,7 +1644,10 @@ begin
16341644
TSU_CLK => tsu_clk,
16351645
TSU_RST => tsu_rst,
16361646
TSU_TS_NS => tsu_ns,
1637-
TSU_TS_DV => tsu_dv
1647+
TSU_TS_DV => tsu_dv,
1648+
1649+
MISC_TOP2NET => MISC_TOP2NET,
1650+
MISC_NET2TOP => MISC_NET2TOP
16381651
);
16391652

16401653
eth_led_ctrl_i: entity work.ETH_LED_CTRL_TOP

0 commit comments

Comments
 (0)