Skip to content

Commit 8f52079

Browse files
committed
feat: Add MISC signals between Top-Level and PCIe core
1 parent 5921d2e commit 8f52079

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

core/comp/pcie/pcie_mod/comp/pcie_core/pcie_core_ent.vhd

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ entity PCIE_CORE is
6161
CARD_ID_WIDTH : natural := 0;
6262
-- Reset width for effective reset duplication
6363
RESET_WIDTH : natural := 8;
64+
-- Width of MISC signal between Top-Level FPGA design and PCIE core logic
65+
MISC_TOP2PCIE_WIDTH : natural := 1;
66+
-- Width of MISC signal between PCIE core logic and Top-Level FPGA design
67+
MISC_PCIE2TOP_WIDTH : natural := 1;
6468
-- FPGA device
6569
DEVICE : string := "STRATIX10"
6670
);
@@ -196,6 +200,14 @@ entity PCIE_CORE is
196200
MI_WR : in std_logic;
197201
MI_DRD : out std_logic_vector(MI_WIDTH-1 downto 0);
198202
MI_ARDY : out std_logic;
199-
MI_DRDY : out std_logic
203+
MI_DRDY : out std_logic;
204+
205+
-- =========================================================================
206+
-- MISC SIGNALS (the clock signal is not defined)
207+
-- =========================================================================
208+
-- Optional signal for MISC connection from Top-Level FPGA design to PCIE core.
209+
MISC_TOP2PCIE : in slv_array_t(PCIE_ENDPOINTS-1 downto 0)(MISC_TOP2PCIE_WIDTH-1 downto 0);
210+
-- Optional signal for MISC connection from PCIE core to Top-Level FPGA design.
211+
MISC_PCIE2TOP : out slv_array_t(PCIE_ENDPOINTS-1 downto 0)(MISC_PCIE2TOP_WIDTH-1 downto 0) := (others => (others => '0'))
200212
);
201213
end entity;

core/comp/pcie/pcie_mod/pcie_top.vhd

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ entity PCIE is
7272
DMA_BAR_ENABLE : boolean := false;
7373
-- Enable of XCV IP, for Xilinx only
7474
XVC_ENABLE : boolean := false;
75+
-- Width of MISC signal between Top-Level FPGA design and PCIE core logic
76+
MISC_TOP2PCIE_WIDTH : natural := 1;
77+
-- Width of MISC signal between PCIE core logic and Top-Level FPGA design
78+
MISC_PCIE2TOP_WIDTH : natural := 1;
7579
-- FPGA device
7680
DEVICE : string := "STRATIX10"
7781
);
@@ -230,7 +234,15 @@ entity PCIE is
230234
MI_DBG_WR : in std_logic;
231235
MI_DBG_DRD : out std_logic_vector(32-1 downto 0);
232236
MI_DBG_ARDY : out std_logic;
233-
MI_DBG_DRDY : out std_logic
237+
MI_DBG_DRDY : out std_logic;
238+
239+
-- =====================================================================
240+
-- MISC SIGNALS (the clock signal is not defined)
241+
-- =====================================================================
242+
-- Optional signal for MISC connection from Top-Level FPGA design to PCIE core.
243+
MISC_TOP2PCIE : in slv_array_t(PCIE_ENDPOINTS-1 downto 0)(MISC_TOP2PCIE_WIDTH-1 downto 0) := (others => (others => '0'));
244+
-- Optional signal for MISC connection from PCIE core to Top-Level FPGA design.
245+
MISC_PCIE2TOP : out slv_array_t(PCIE_ENDPOINTS-1 downto 0)(MISC_PCIE2TOP_WIDTH-1 downto 0)
234246
);
235247
end entity;
236248

@@ -378,6 +390,8 @@ begin
378390
XVC_ENABLE => XVC_ENABLE,
379391
CARD_ID_WIDTH => CARD_ID_WIDTH,
380392
RESET_WIDTH => RESET_WIDTH,
393+
MISC_TOP2PCIE_WIDTH => MISC_TOP2PCIE_WIDTH,
394+
MISC_PCIE2TOP_WIDTH => MISC_PCIE2TOP_WIDTH,
381395
DEVICE => DEVICE
382396
)
383397
port map (
@@ -451,7 +465,10 @@ begin
451465
MI_WR => mi_dbg_split_wr (0),
452466
MI_DRD => mi_dbg_split_drd (0),
453467
MI_ARDY => mi_dbg_split_ardy(0),
454-
MI_DRDY => mi_dbg_split_drdy(0)
468+
MI_DRDY => mi_dbg_split_drdy(0),
469+
470+
MISC_TOP2PCIE => MISC_TOP2PCIE,
471+
MISC_PCIE2TOP => MISC_PCIE2TOP
455472
);
456473

457474
PCIE_USER_CLK <= pcie_clk;

core/top/fpga_common.vhd

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ generic (
114114
MISC_TOP2APP_WIDTH : natural := 1;
115115
-- Width of MISC signal between APP core logic and Top-Level FPGA design
116116
MISC_APP2TOP_WIDTH : natural := 1;
117+
-- Width of MISC signal between Top-Level FPGA design and PCIE core logic
118+
MISC_TOP2PCIE_WIDTH : natural := 1;
119+
-- Width of MISC signal between PCIE core logic and Top-Level FPGA design
120+
MISC_PCIE2TOP_WIDTH : natural := 1;
117121

118122
DEVICE : string := "AGILEX";
119123
BOARD : string := "400G1"
@@ -255,6 +259,10 @@ port (
255259
MISC_TOP2APP : in std_logic_vector(MISC_TOP2APP_WIDTH-1 downto 0) := (others => '0');
256260
-- Optional signal for MISC connection from APP core to Top-Level FPGA design.
257261
MISC_APP2TOP : out std_logic_vector(MISC_APP2TOP_WIDTH-1 downto 0);
262+
-- Optional signal for MISC connection from Top-Level FPGA design to PCIE core.
263+
MISC_TOP2PCIE : in slv_array_t(PCIE_ENDPOINTS-1 downto 0)(MISC_TOP2PCIE_WIDTH-1 downto 0) := (others => (others => '0'));
264+
-- Optional signal for MISC connection from PCIE core to Top-Level FPGA design.
265+
MISC_PCIE2TOP : out slv_array_t(PCIE_ENDPOINTS-1 downto 0)(MISC_PCIE2TOP_WIDTH-1 downto 0);
258266
MISC_IN : in std_logic_vector(MISC_IN_WIDTH-1 downto 0) := (others => '0');
259267
MISC_OUT : out std_logic_vector(MISC_OUT_WIDTH-1 downto 0)
260268
);
@@ -806,6 +814,8 @@ begin
806814
DMA_BAR_ENABLE => (DMA_TYPE = 4),
807815
XVC_ENABLE => VIRTUAL_DEBUG_ENABLE,
808816
CARD_ID_WIDTH => FPGA_ID_WIDTH,
817+
MISC_TOP2PCIE_WIDTH => MISC_TOP2PCIE_WIDTH,
818+
MISC_PCIE2TOP_WIDTH => MISC_PCIE2TOP_WIDTH,
809819
DEVICE => DEVICE
810820
)
811821
port map (
@@ -891,7 +901,10 @@ begin
891901
MI_DBG_WR => mi_adc_wr (MI_ADC_PORT_PCI_DBG),
892902
MI_DBG_DRD => mi_adc_drd (MI_ADC_PORT_PCI_DBG),
893903
MI_DBG_ARDY => mi_adc_ardy(MI_ADC_PORT_PCI_DBG),
894-
MI_DBG_DRDY => mi_adc_drdy(MI_ADC_PORT_PCI_DBG)
904+
MI_DBG_DRDY => mi_adc_drdy(MI_ADC_PORT_PCI_DBG),
905+
906+
MISC_TOP2PCIE => MISC_TOP2PCIE,
907+
MISC_PCIE2TOP => MISC_PCIE2TOP
895908
);
896909

897910
cdc_pcie_up_g: for i in 0 to PCIE_ENDPOINTS-1 generate

0 commit comments

Comments
 (0)