Skip to content

Commit aa0d2d1

Browse files
committed
Merge branch 'cabal_fb2cdg1_prq' into 'devel'
feat(cards): add support for fb2cdg1 card with AGMF039R47A1E2VC See merge request ndk/ndk-fpga!317
2 parents 899dd36 + 9be68fc commit aa0d2d1

File tree

9 files changed

+127
-6
lines changed

9 files changed

+127
-6
lines changed

apps/minimal/build/fb2cdg1/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ COMBO_BASE = ../../../..
99
CARD_BASE = $(COMBO_BASE)/cards/silicom/fb2cdg1
1010
APP_CONF = app_conf.tcl
1111

12+
BOARD_VARIANT ?= 1
13+
export BOARD_VARIANT
14+
1215
PCIE_CONF ?= 1xgen5x8x8
1316
export PCIE_CONF
1417

15-
OUTPUT_NAME = fb2cdg1-minimal-pcie$(PCIE_CONF)
18+
OUTPUT_NAME = fb2cdg1-var$(BOARD_VARIANT)-minimal-pcie$(PCIE_CONF)
1619

1720
.PHONY: all 400g2
1821

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
library 'liberouter'
2+
3+
stagesFirmware(
4+
dir: 'apps/minimal/build/fb2cdg1',
5+
target: '400g2',
6+
tool: 'quartus',
7+
project: 'fb2cdg1-var1-minimal-pcie1xgen5x16-400g2',
8+
params: 'BOARD_VARIANT=1 PCIE_CONF=1xgen5x16',
9+
pollscm: 'H H(0-11) * * 6',
10+
rpms: false,
11+
rename: false,
12+
artifacts: 'fb2cdg1-var1-minimal-pcie1xgen5x16-400g2',
13+
lastBuilds: 2,
14+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
library 'liberouter'
2+
3+
stagesFirmware(
4+
dir: 'apps/minimal/build/fb2cdg1',
5+
target: '400g2',
6+
tool: 'quartus',
7+
project: 'fb2cdg1-var1-minimal-pcie1xgen5x8x8-400g2',
8+
params: 'BOARD_VARIANT=1 PCIE_CONF=1xgen5x8x8',
9+
pollscm: 'H H(0-11) * * 6',
10+
rpms: false,
11+
rename: false,
12+
artifacts: 'fb2cdg1-var1-minimal-pcie1xgen5x8x8-400g2',
13+
lastBuilds: 2,
14+
)

cards/silicom/fb2cdg1/config/card_conf.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,4 @@ set MEM_PORTS 0
8888
# Other parameters:
8989
# ------------------------------------------------------------------------------
9090
set TSU_ENABLE true
91+
set BOARD_VARIANT $env(BOARD_VARIANT)

cards/silicom/fb2cdg1/config/card_const.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# the description of this file, visit the Parametrization section in the
99
# documentation of the NDK-CORE repostiory
1010

11-
set CARD_NAME "FB2CDG1"
11+
set CARD_NAME "FB2CDG1-VAR$BOARD_VARIANT"
1212
# Achitecture of Clock generator
1313
set CLOCK_GEN_ARCH "INTEL"
1414
# Achitecture of PCIe module

cards/silicom/fb2cdg1/constr/device.qsf renamed to cards/silicom/fb2cdg1/constr/device_var0.qsf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# device.qsf
1+
# device_var0.qsf
22
# Copyright (C) 2025 DynaNIC Semiconductors, Ltd.
33
# Author(s): David Beneš <benes@dyna-nic.com>
44
#
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# device_var1.qsf
2+
# Copyright (C) 2025 CESNET
3+
# Author(s): Jakub Cabal <cabal@cesnet.cz>
4+
#
5+
# SPDX-License-Identifier: BSD-3-Clause
6+
7+
# ==============================================================================
8+
# Global assignments
9+
# ==============================================================================
10+
11+
set_global_assignment -name DEVICE AGMF039R47A1E2VC
12+
set_global_assignment -name FAMILY "Agilex 7"

cards/silicom/fb2cdg1/readme.rst

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Silicom fb2CDg1\@AGM39D-2
1010
- PCIe conectors: Edge connector
1111
- `FPGA Card Website <https://www.silicom-usa.com/pr/server-adapters/programmable-fpga-server-adapter/fpga-intel-based-2/fpga-intel-agilex-based/fpga-smartnic-fb2cdg1agm39d-2-intel-based/>`_
1212
- FPGA specification:
13-
- FPGA part number: ``AGMF039R47A2E2VR0``
13+
- FPGA part number: ``AGMF039R47A2E2VR0``, ``AGMF039R47A1E2VC``
1414
- Ethernet Hard IP: F-Tile (up to 400G Ethernet)
1515
- PCIe Hard IP: R-Tile (up to PCIe Gen5 x16)
1616

@@ -30,3 +30,67 @@ NDK firmware support
3030
.. note::
3131

3232
To build the NDK firmware for this card, you must have the Intel Quartus Prime Pro and PACSign tool installed, including a valid license.
33+
34+
Board Variants
35+
^^^^^^^^^^^^^^
36+
37+
This card exists in multiple variants.
38+
The correct variant for the firmware build can be selected using the Makefile parameter BOARD_VARIANT, for example as follows:
39+
40+
.. code::
41+
42+
$ cd <NDK-FPGA_root_directory>/apps/minimal/build/fb2cdg1
43+
$ make BOARD_VARIANT=1
44+
45+
**Allowed values of BOARD_VARIANT parameter**
46+
47+
- ``BOARD_VARIANT=1`` - The board uses FPGA part number ``AGMF039R47A1E2VC`` (Production sample).
48+
- ``BOARD_VARIANT=0`` - The board uses FPGA part number ``AGMF039R47A2E2VR0`` (Engineering sample).
49+
50+
Initial Boot instructions
51+
^^^^^^^^^^^^^^^^^^^^^^^^^
52+
The card itself should be preloaded with firmware designed by Silicom.
53+
This design can be used to load an FPGA image to the BMC flash via PCIe using the Silicom ``rawcardtool`` tool.
54+
55+
**Execute the following steps to perform the manual initialization:**
56+
57+
1. Obtain PCIe address of the card by the command below. In this example, the PCIe address is ``01:00.0`` and will be used in the next steps:
58+
59+
.. code::
60+
61+
$ lspci | grep "Silicom Denmark Device"
62+
01:00.0 Ethernet controller: Silicom Denmark Device 0001
63+
2. Ensure the card respond to memory space accesses by command:
64+
65+
.. code::
66+
67+
$ setpci -s 01:00.0 COMMAND=0x0002
68+
3. Flash the ``fpga_page1_pacsign_user1.bin`` file to the card using RawCardTool provided by Silicom:
69+
70+
.. code::
71+
72+
$ rawcardtool_fjord --device 01:00.0 --flash fpga_page1_pacsign_user1.bin
73+
4. Set your design as default by command:
74+
75+
.. code::
76+
77+
$ rawcardtool_fjord --device 01:00.0 --fpgadefault user1
78+
5. Boot your design executing:
79+
80+
.. code::
81+
82+
$ rawcardtool_fjord --device 01:00.0 --reboot-fpga user1
83+
84+
.. note::
85+
86+
The ``fpga_page1_pacsign_user1.bin`` file will be located in the build folder of your application after building. For NDK-FPGA, the folder is ``ndk-fpga/apps/minimal/build/fb2cdg1``.
87+
88+
.. note::
89+
90+
If some bars are unmapped, power cycle the server.
91+
92+
If the ``rawcardtool`` tool is unavailable, it is possible to use JTAG to load the design (SOF file), and ``nfb-boot`` command to load the BMC flash with the FPGA image:
93+
94+
.. code::
95+
96+
$ nfb-boot -f0 fb2cdg1-minimal-pcie1xgen5x8x8-400g2.nfw

cards/silicom/fb2cdg1/src/Quartus.inc.tcl

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ set CARD_ARCHGRP(ETH_PORT_CHAN,0) $ETH_PORT_CHAN(0)
2424
set CARD_ARCHGRP(EHIP_PORT_TYPE,0) $EHIP_PORT_TYPE(0)
2525

2626
# select fpga name
27-
set CARD_FPGA "AGMF039R47A2E2VR0"
27+
if {$BOARD_VARIANT == 0} {
28+
set CARD_FPGA "AGMF039R47A2E2VR0"
29+
} elseif {$BOARD_VARIANT == 1} {
30+
set CARD_FPGA "AGMF039R47A1E2VC"
31+
} else {
32+
error "Unsupported BOARD_VARIANT=$BOARD_VARIANT! Supported values are:
33+
- 0 for board with AGMF039R47A2E2VR0,
34+
- 1 for board with AGMF039R47A1E2VC."
35+
}
2836
set CARD_ARCHGRP(FPGA) $CARD_FPGA
2937

3038
set CARD_ARCHGRP(BMC_CTRL_ARCH) "EMPTY"
@@ -58,7 +66,12 @@ set SYNTH_FLAGS(IP_FILES_CLEAN_ENABLE) 1
5866
#set SYNTH_FLAGS(CONSTR) ""
5967
set SYNTH_FLAGS(CONSTR) "$SYNTH_FLAGS(CONSTR) $CARD_BASE/constr/timing.sdc"
6068
set SYNTH_FLAGS(CONSTR) "$SYNTH_FLAGS(CONSTR) $CARD_BASE/constr/bmc.qsf"
61-
set SYNTH_FLAGS(CONSTR) "$SYNTH_FLAGS(CONSTR) $CARD_BASE/constr/device.qsf"
69+
if {$BOARD_VARIANT == 0} {
70+
lappend SYNTH_FLAGS(CONSTR) "$CARD_BASE/constr/device_var0.qsf"
71+
}
72+
if {$BOARD_VARIANT == 1} {
73+
lappend SYNTH_FLAGS(CONSTR) "$CARD_BASE/constr/device_var1.qsf"
74+
}
6275
set SYNTH_FLAGS(CONSTR) "$SYNTH_FLAGS(CONSTR) $CARD_BASE/constr/general.qsf"
6376
set SYNTH_FLAGS(CONSTR) "$SYNTH_FLAGS(CONSTR) $CARD_BASE/constr/qsfp_misc.qsf"
6477
set SYNTH_FLAGS(CONSTR) "$SYNTH_FLAGS(CONSTR) $CARD_BASE/constr/pcie.qsf"

0 commit comments

Comments
 (0)