Skip to content

Commit 20a5b92

Browse files
committed
Merge branch 'benesd_feat_thunderfjord' into 'devel'
Add support for fb2cdg1 (ThunderFjord) card See merge request ndk/ndk-fpga!235
2 parents 198bb2b + 217d9c1 commit 20a5b92

File tree

23 files changed

+1375
-0
lines changed

23 files changed

+1375
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Makefile: Makefile for Silicom ThunderFjord fb2cdg1 card
2+
# Copyright (C) 2025 DynaNIC Semiconductors Ltd.
3+
# Author(s): David Beneš <benes@dyna-nic.com>
4+
#
5+
# SPDX-License-Identifier: BSD-3-Clause
6+
7+
# Set path to top-level of NDK-FPGA repository
8+
COMBO_BASE = ../../../..
9+
CARD_BASE = $(COMBO_BASE)/cards/silicom/fb2cdg1
10+
APP_CONF = app_conf.tcl
11+
12+
PCIE_CONF ?= 1xgen5x8x8
13+
export PCIE_CONF
14+
15+
OUTPUT_NAME = fb2cdg1-minimal-pcie$(PCIE_CONF)
16+
17+
.PHONY: all 400g2
18+
19+
all: 400g2
20+
21+
400g2: ETH_PORTS=2
22+
400g2: ETH_PORT_SPEED=400
23+
400g2: ETH_PORT_CHAN=1
24+
400g2: EHIP_PORT_TYPE=0
25+
400g2: OUTPUT_NAME:=$(OUTPUT_NAME)-400g2
26+
400g2: build
27+
28+
include $(CARD_BASE)/src/card.mk
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Quartus.tcl: Quartus tcl script to compile whole FPGA design
2+
# Copyright (C) 2022 CESNET z. s. p. o.
3+
# Author(s): Jakub Cabal <cabal@cesnet.cz>
4+
# Vladislav Valek <valekv@cesnet.cz>
5+
#
6+
# SPDX-License-Identifier: BSD-3-Clause
7+
8+
# NOTE: The purpose of this file is described in the Parameterization section of
9+
# the NDK-CORE documentation.
10+
11+
# ----- Setting basic synthesis options ---------------------------------------
12+
# NDK & user constants
13+
source $env(CARD_BASE)/src/Quartus.inc.tcl
14+
15+
# Create only a Quartus project for further design flow driven from Quartus GUI
16+
# "0" ... full design flow in command line
17+
# "1" ... project composition only for further dedesign flow in GUI
18+
set SYNTH_FLAGS(PROJ_ONLY) "0"
19+
20+
# Associative array which is propagated to APPLICATION_CORE, add other
21+
# parameters if necessary.
22+
set APP_ARCHGRP(APP_CORE_ENABLE) $APP_CORE_ENABLE
23+
24+
# Convert associative array to list
25+
set APP_ARCHGRP_L [array get APP_ARCHGRP]
26+
27+
# ----- Add application core to main component list ---------------------------
28+
lappend HIERARCHY(COMPONENTS) \
29+
[list "APPLICATION_CORE" "$OFM_PATH/apps/minimal/top" $APP_ARCHGRP_L]
30+
31+
# Call main function which handle targets
32+
nb_main
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# app_conf.tcl: User parameters for Silicom ThunderFjord fb2cdg1 card
2+
# Copyright (C) 2025 DynaNIC Semiconductors Ltd.
3+
# Author(s): David Beneš <benes@dyna-nic.com>
4+
#
5+
# SPDX-License-Identifier: BSD-3-Clause
6+
7+
# NOTE: Use the PCIE_CONF make parameter to select the PCIe configuration.
8+
9+
# ------------------------------------------------------------------------------
10+
# DMA parameters:
11+
# ------------------------------------------------------------------------------
12+
13+
if {$env(DMA_TYPE) == 4} {
14+
# DMA Calypte not meet timing on R-Tile FPGAs with more than 16 channels.
15+
set DMA_RX_CHANNELS 16
16+
set DMA_TX_CHANNELS 16
17+
} else {
18+
# 400G DMA Medusa requires at least 32 channels.
19+
set DMA_RX_CHANNELS 32
20+
set DMA_TX_CHANNELS 32
21+
}
22+
23+
# In blocking mode, packets are dropped only when the RX DMA channel is off.
24+
# In non-blocking mode, packets are dropped whenever they cannot be sent.
25+
set DMA_RX_BLOCKING_MODE true
26+
27+
# ------------------------------------------------------------------------------
28+
# Other parameters:
29+
# ------------------------------------------------------------------------------
30+
set PROJECT_NAME "NDK_MINIMAL"
31+
set PROJECT_VARIANT "$ETH_PORT_SPEED(0)G$ETH_PORTS"
32+
set PROJECT_VERSION [exec cat ../../../../VERSION]
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# card_conf.tcl: Default parameters for Silicom ThunderFjord fb2cdg1
2+
# Copyright (C) 2025 DynaNIC Semiconductors, Ltd.
3+
# Author(s): David Beneš <benes@dyna-nic.com>
4+
#
5+
# SPDX-License-Identifier: BSD-3-Clause
6+
7+
# NOTE: For the detailed description of this file, visit the Parametrization section
8+
# in the documentation of the NDK-CORE repository.
9+
#
10+
# Mandatory project parameters
11+
set PROJECT_NAME ""
12+
13+
# ------------------------------------------------------------------------------
14+
# ETH parameters:
15+
# ------------------------------------------------------------------------------
16+
# Number of Ethernet ports, must match number of items in list ETH_PORTS_SPEED !
17+
set ETH_PORTS 2
18+
# Speed for each one of the ETH_PORTS (allowed values: 400, 200, 100, 50, 40, 25, 10)
19+
# ETH_PORT_SPEED is an array where each index represents given ETH_PORT and
20+
# each index has associated a required port speed.
21+
# NOTE: at this moment, all ports must have same speed !
22+
set ETH_PORT_SPEED(0) $env(ETH_PORT_SPEED)
23+
set ETH_PORT_SPEED(1) $env(ETH_PORT_SPEED)
24+
# Number of channels for each one of the ETH_PORTS (allowed values: 1, 2, 4, 8)
25+
# ETH_PORT_CHAN is an array where each index represents given ETH_PORT and
26+
# each index has associated a required number of channels this port has.
27+
# NOTE: at this moment, all ports must have same number of channels !
28+
set ETH_PORT_CHAN(0) $env(ETH_PORT_CHAN)
29+
set ETH_PORT_CHAN(1) $env(ETH_PORT_CHAN)
30+
# Number of lanes for each one of the ETH_PORTS
31+
# Typical values: 4 (QSFP), 8 (QSFP-DD)
32+
set ETH_PORT_LANES(0) 8
33+
set ETH_PORT_LANES(1) 8
34+
# EHIP_PORT_TYPE is an array where each index represents given ETH_PORT and
35+
# each index has associated a required type of IP core, which this port has.
36+
# NOTE: at this moment, all ports must have same type of IP core !
37+
set EHIP_PORT_TYPE(0) $env(EHIP_PORT_TYPE)
38+
set EHIP_PORT_TYPE(1) $env(EHIP_PORT_TYPE)
39+
40+
# ------------------------------------------------------------------------------
41+
# PCIe parameters (not all combinations work):
42+
# ------------------------------------------------------------------------------
43+
# Supported combinations for this card:
44+
# 1x PCIe Gen4 x16 -- PCIE_GEN=4, PCIE_ENDPOINTS=1, PCIE_ENDPOINT_MODE=0 (Note: for DMA Calypte)
45+
# 1x PCIe Gen5 x8x8 -- PCIE_GEN=5, PCIE_ENDPOINTS=2, PCIE_ENDPOINT_MODE=1 (Note: for DMA Medusa only)
46+
# 1x PCIe Gen5 x16 -- PCIE_GEN=5, PCIE_ENDPOINTS=1, PCIE_ENDPOINT_MODE=0 (Note: for DMA Medusa only)
47+
# ------------------------------------------------------------------------------
48+
49+
# Set default PCIe configuration
50+
set PCIE_CONF "1xGen5x8x8"
51+
if { [info exist env(PCIE_CONF)] } {
52+
set PCIE_CONF $env(PCIE_CONF)
53+
}
54+
55+
# Parsing PCIE_CONF string to list of parameters
56+
set pcie_conf_list [ParsePcieConf $PCIE_CONF]
57+
58+
# PCIe Generation (possible values: 4, 5):
59+
# 4 = PCIe Gen4 (Stratix 10 with P-Tile or Agilex)
60+
# 5 = PCIe Gen5 (Agilex with R-Tile)
61+
set PCIE_GEN [lindex $pcie_conf_list 1]
62+
# PCIe endpoints (possible values: 2, 4):
63+
# 2 = 2x PCIe x16 in two slot OR 2x PCIe x8 in one slot (bifurcation x8+x8)
64+
# 4 = 4x PCIe x8 in two slots (bifurcation x8+x8)
65+
set PCIE_ENDPOINTS [lindex $pcie_conf_list 0]
66+
# PCIe endpoint mode (possible values: 1):
67+
# 1 = 2x8 lanes (bifurcation x8+x8)
68+
set PCIE_ENDPOINT_MODE [lindex $pcie_conf_list 2]
69+
70+
# ------------------------------------------------------------------------------
71+
# DMA parameters:
72+
# ------------------------------------------------------------------------------
73+
# This variable can be set in COREs *.mk file or as a parameter when launching the make
74+
set DMA_TYPE $env(DMA_TYPE)
75+
# The minimum number of RX/TX DMA channels for this card is 32.
76+
set DMA_RX_CHANNELS 32
77+
set DMA_TX_CHANNELS 32
78+
# In blocking mode, packets are dropped only when the RX DMA channel is off.
79+
# In non-blocking mode, packets are dropped whenever they cannot be sent.
80+
set DMA_RX_BLOCKING_MODE true
81+
82+
# ------------------------------------------------------------------------------
83+
# DDR4 parameters:
84+
# ------------------------------------------------------------------------------
85+
set MEM_PORTS 0
86+
87+
# ------------------------------------------------------------------------------
88+
# Other parameters:
89+
# ------------------------------------------------------------------------------
90+
set TSU_ENABLE true
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# card_const.tcl: Card specific parameters for Silicom ThunderFjord fb2cdg1 (developer only)
2+
# Copyright (C) 2025 DynaNIC Semiconductors, Ltd.
3+
# Author(s): David Beneš <benes@dyna-nic.com>
4+
#
5+
# SPDX-License-Identifier: BSD-3-Clause
6+
7+
# WARNING: The user should not deliberately change parameters in this file. For
8+
# the description of this file, visit the Parametrization section in the
9+
# documentation of the NDK-CORE repostiory
10+
11+
set CARD_NAME "FB2CDG1"
12+
# Achitecture of Clock generator
13+
set CLOCK_GEN_ARCH "INTEL"
14+
# Achitecture of PCIe module
15+
set PCIE_MOD_ARCH "R_TILE"
16+
# Achitecture of Network module (F_TILE)
17+
set NET_MOD_ARCH "F_TILE"
18+
# Achitecture of SDM/SYSMON module
19+
set SDM_SYSMON_ARCH "INTEL_SDM"
20+
# Boot controller type (5=OFS_PMCI)
21+
set BOOT_TYPE 0
22+
23+
# Total number of QSFP cages
24+
set QSFP_CAGES 2
25+
# I2C address of each QSFP cage
26+
set QSFP_I2C_ADDR(0) "0xA0"
27+
set QSFP_I2C_ADDR(1) "0xA0"
28+
29+
# ------------------------------------------------------------------------------
30+
# Checking of parameter compatibility
31+
# ------------------------------------------------------------------------------
32+
33+
if {!(($PCIE_ENDPOINTS == 1 && $PCIE_GEN == 4 && $PCIE_ENDPOINT_MODE == 0) ||
34+
($PCIE_ENDPOINTS == 2 && $PCIE_GEN == 5 && $PCIE_ENDPOINT_MODE == 1) )} {
35+
error "Incompatible PCIe configuration: PCIE_ENDPOINTS = $PCIE_ENDPOINTS, PCIE_GEN = $PCIE_GEN, PCIE_ENDPOINT_MODE = $PCIE_ENDPOINT_MODE!
36+
Allowed PCIe configurations:
37+
- 1xGen4x16 -- PCIE_GEN=4, PCIE_ENDPOINTS=1, PCIE_ENDPOINT_MODE=0 (for DMA Calypte only)
38+
- 1xGen5x8x8 -- PCIE_GEN=5, PCIE_ENDPOINTS=2, PCIE_ENDPOINT_MODE=1 (for DMA Medusa only)"
39+
}
40+
41+
# Enable/add PCIe Gen5 x16 for experiments only!
42+
#($PCIE_ENDPOINTS == 1 && $PCIE_GEN == 5 && $PCIE_ENDPOINT_MODE == 0) ||
43+
#- 1xGen5x16 -- PCIE_GEN=5, PCIE_ENDPOINTS=1, PCIE_ENDPOINT_MODE=0"
44+
45+
# ------------------------------------------------------------------------------
46+
# Other parameters:
47+
# ------------------------------------------------------------------------------
48+
49+
# Current setup is same for all IP cores, due to use of one pll with frequency (830,156Mhz), for all IP's:
50+
# This setup value is defined as half of pll frequency
51+
set TSU_FREQUENCY 415039062
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# bmc.qsf
2+
# Copyright (C) 2025 DynaNIC Semiconductors, Ltd.
3+
# Author(s): David Beneš <benes@dyna-nic.com>
4+
#
5+
# SPDX-License-Identifier: BSD-3-Clause
6+
7+
# QSPI interface to Flash through BMC:
8+
set_location_assignment PIN_D29 -to QSPI_CSN_1V2
9+
set_location_assignment PIN_B31 -to QSPI_CLK
10+
set_location_assignment PIN_D33 -to QSPI_D0
11+
set_location_assignment PIN_E32 -to QSPI_D1
12+
set_location_assignment PIN_B33 -to QSPI_D2
13+
set_location_assignment PIN_A32 -to QSPI_D3
14+
15+
# SPI bus from FPGA to BMC (Ingress):
16+
set_location_assignment PIN_E26 -to SPI_INGRESS_SCLK
17+
set_location_assignment PIN_E30 -to SPI_INGRESS_MISO
18+
set_location_assignment PIN_A30 -to SPI_INGRESS_MOSI
19+
set_location_assignment PIN_B27 -to SPI_INGRESS_CSN
20+
21+
# SPI bus from BMC to FPGA (Egress):
22+
set_location_assignment PIN_A24 -to SPI_EGRESS_CSN
23+
set_location_assignment PIN_B25 -to SPI_EGRESS_MISO
24+
set_location_assignment PIN_D25 -to SPI_EGRESS_SCLK
25+
set_location_assignment PIN_E24 -to SPI_EGRESS_MOSI
26+
27+
# Misc signals between FPGA and BMC:
28+
set_location_assignment PIN_A26 -to MAX_FPGA_HB_1V2
29+
set_location_assignment PIN_D27 -to FPGA_MAX_HB
30+
set_location_assignment PIN_G30 -to FPGA_MAX_THRM_SHTD_N_1V2
31+
set_location_assignment PIN_H31 -to FPGA_MAX_FPGA_SEU_1V2
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# device.qsf
2+
# Copyright (C) 2025 DynaNIC Semiconductors, Ltd.
3+
# Author(s): David Beneš <benes@dyna-nic.com>
4+
#
5+
# SPDX-License-Identifier: BSD-3-Clause
6+
7+
# ==============================================================================
8+
# Global assignments
9+
# ==============================================================================
10+
11+
set_global_assignment -name DEVICE AGMF039R47A2E2VR0
12+
set_global_assignment -name FAMILY "Agilex 7"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# general.qsf
2+
# Copyright (C) 2025 DynaNIC Semiconductors, Ltd.
3+
# Author(s): David Beneš <benes@dyna-nic.com>
4+
#
5+
# SPDX-License-Identifier: BSD-3-Clause
6+
7+
#AssemblerAssignments
8+
#=====================
9+
set_global_assignment -name STRATIXV_CONFIGURATION_SCHEME "AVST X8"
10+
set_global_assignment -name PWRMGT_DEVICE_ADDRESS_IN_PMBUS_SLAVE_MODE 3C
11+
set_global_assignment -name PWRMGT_VOLTAGE_OUTPUT_FORMAT "LINEAR FORMAT"
12+
set_global_assignment -name PWRMGT_LINEAR_FORMAT_N "-12"
13+
14+
#SetupVIDoperation:
15+
set_global_assignment -name VID_OPERATION_MODE "PMBUS SLAVE"
16+
set_global_assignment -name USE_PWRMGT_SCL SDM_IO0
17+
set_global_assignment -name USE_PWRMGT_SDA SDM_IO16
18+
set_global_assignment -name USE_PWRMGT_ALERT SDM_IO9
19+
set_global_assignment -name USE_INIT_DONE SDM_IO5
20+
set_global_assignment -name USE_CONF_DONE SDM_IO12
21+
set_global_assignment -name USE_HPS_COLD_RESET SDM_IO7
22+
set_global_assignment -name DEVICE_INITIALIZATION_CLOCK OSC_CLK_1_125MHZ
23+
24+
set_global_assignment -name GENERATE_COMPRESSED_SOF ON
25+
26+
# Retimer Fast Forward Assignments
27+
# ================================
28+
#set_global_assignment -name FLOW_ENABLE_HYPER_RETIMER_FAST_FORWARD ON
29+
set_global_assignment -name OPTIMIZATION_MODE "HIGH PERFORMANCE EFFORT"
30+
# set_global_assignment -name OPTIMIZATION_MODE "SUPERIOR PERFORMANCE WITH MAXIMUM PLACEMENT EFFORT"
31+
32+
# Preserve XCVR channels
33+
set_global_assignment -name PRESERVE_UNUSED_XCVR_CHANNEL ON
34+
35+
# ==============================================================================
36+
# Pinout and IO Standards
37+
# ==============================================================================
38+
39+
#100MHz clk
40+
set_location_assignment PIN_AB57 -to SYSCLK_100_P
41+
#set_location_assignment PIN_AC56 -to SYSCLK_100_N
42+
set_instance_assignment -name IO_STANDARD "1.2V TRUE DIFFERENTIAL SIGNALING" -to SYSCLK_100_P
43+
set_instance_assignment -name INPUT_TERMINATION DIFFERENTIAL -to SYSCLK_100_P
44+
45+
# ==============================================================================
46+
# PWR MGMT - Use this if the boot fails
47+
# ==============================================================================
48+
# set_global_assignment -name PWRMGT_SLAVE_DEVICE_TYPE LTC3888
49+
# set_global_assignment -name PWRMGT_SLAVE_DEVICE0_ADDRESS 55
50+
# set_global_assignment -name PWRMGT_TRANSLATED_VOLTAGE_VALUE_UNIT VOLTS
51+
# set_global_assignment -name PWRMGT_VOLTAGE_OUTPUT_FORMAT "LINEAR FORMAT"
52+
# set_global_assignment -name PWRMGT_LINEAR_FORMAT_N "-12"
53+
# set_global_assignment -name PWRMGT_PAGE_COMMAND_ENABLE OFF
54+
# set_global_assignment -name PWRMGT_PAGE_COMMAND_PAYLOAD 0

0 commit comments

Comments
 (0)