-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for VCU118 block design #287
base: main
Are you sure you want to change the base?
Changes from all commits
e5c4073
86153e6
cdfeabc
22c651f
862913e
c0bc77c
742bc6a
843766a
eaa86e5
1eda45e
daec5c8
7df6ba6
91f1ae5
4fc1c91
1d27e86
db46b35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ include $(CAR_ROOT)/bender-safed.mk | |
###################### | ||
|
||
CAR_NONFREE_REMOTE ?= [email protected]:carfield/carfield-nonfree.git | ||
CAR_NONFREE_COMMIT ?= 59e53134 | ||
CAR_NONFREE_COMMIT ?= e39aebd1 | ||
|
||
## @section Carfield platform nonfree components | ||
## Clone the non-free verification IP for Carfield. Some components such as CI scripts and ASIC | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,10 @@ Additionally, for on-chip debugging you need: | |
|
||
We currently provide working setups for: | ||
|
||
- Xilinx VCU128 with Vivado `>= 2020.2` | ||
- Xilinx VCU128 with Vivado `== 2020.2` | ||
- Xilinx VCU118 with Vivado `== 2020.2` | ||
|
||
**Note: Certain version of Vivado might cause issue, until these issues are resolved it is safer to use 2020.2** | ||
|
||
We are working on support for more boards in the future. | ||
|
||
|
@@ -24,7 +27,17 @@ design flow to link Carfield with external IPs. This flow is less human readable | |
integrating more complex IPs as Xilinx Ethernet. *Note that this may require you to own the | ||
respective licenses.* | ||
|
||
## Building the vanilla bistream | ||
## For impatient readers | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For impatient readers -> Quick Start |
||
|
||
The recommended command to build a bitstream (for VCU128) is | ||
|
||
```bash | ||
make car-xil-all XILINX_FLAVOR=bd VIVADO="vitis-2020.2 vivado" VIVADO_MODE=gui XILINX_BOARD=vcu128 GEN_NO_HYPERBUS=1 GEN_EXT_JTAG=1 CARFIELD_CONFIG=carfield_l2dual_spatz_periph | ||
``` | ||
|
||
Please find below more explanations. | ||
|
||
## Building the vanilla bistream (VCU128 only) | ||
|
||
Due to the structure of the Makefile flow. All the following commands are to be executed at the root | ||
of the Carfield repository. If you want to see the Makefiles that you will be using, you can find | ||
|
@@ -90,7 +103,7 @@ Generate the bitstream in `target/xilinx/out/` by running: | |
|
||
```bash | ||
make car-xil-all XILINX_FLAVOR=bd [VIVADO=version] [VIVADO_MODE={batch,gui}] | ||
[XILINX_BOARD={vcu128}] [GEN_NO_HYPERBUS={0,1}] [GEN_EXT_JTAG={0,1}] | ||
[XILINX_BOARD={vcu128, vcu118}] [GEN_NO_HYPERBUS={0,1}] [GEN_EXT_JTAG={0,1}] | ||
[CARFIELD_CONFIG=carfield_l2dual_{safe,spatz}_periph] | ||
``` | ||
|
||
|
@@ -99,12 +112,12 @@ See the argument list below: | |
| Argument | Relevance | Description | | ||
|---------------- |-----------|---------------------------------------------------------------------------------------------------------------------------------------| | ||
| VIVADO | all | Vivado command to use | | ||
| XILINX_BOARD | all | `vcu128` | | ||
| XILINX_BOARD | all | `vcu128` `vcu118` | | ||
| GEN_NO_HYPERBUS | all | `0` Use the hyperram controller inside `carfield.sv`<br>`1` Use the Xilinx DDR controller | | ||
| GEN_EXT_JTAG | vcu128 | `0` Connect the JTAG debugger to the board's JTAG (see [vcu128](#xilinx-vcu128)) <br>`1` Connect the JTAG debugger to an external JTAG chain | | ||
| GEN_EXT_JTAG | all | `0` Connect the JTAG debugger to the board's JTAG (see [vcu128](#xilinx-vcu128)) <br>`1` Connect the JTAG debugger to an external JTAG chain | | ||
| CARFIELD_CONFIG | all | Select the Carfield configuration to implement. See below for supported configs. | | ||
| VIVADO_MODE | all | `batch` Compile in Vivado shell<br>`gui` Compile in Vivado gui | | ||
| XILINX_BOOT_ETH | all | `0` Boot via SPI flash only (see [booting Linux](#booting_linux)) <br>`1` Boot via SPI flash and Ethernet | | ||
| XILINX_BOOT_ETH | vcu128 | `0` Boot via SPI flash only (see [booting Linux](#booting_linux)) <br>`1` Boot via SPI flash and Ethernet | | ||
|
||
See below some typical building time for reference: | ||
|
||
|
@@ -141,19 +154,34 @@ can be set in the Vivado GUI (see [Using Vivado GUI](#bringup_vivado_gui)). | |
> The VCU128 development board only provides one JTAG chain, used by Vivado to program the | ||
bitstream, and interact with certain Xilinx IPs (ILAs, VIOs, ...). The RV64 requires access to a | ||
JTAG chain to connect GDB to the debug-module in the bitstream. | ||
|
||
> When using `EXT_JTAG=0` it is possible to connect the debug module to the internal FPGA's JTAG by | ||
using the Xilinx BSCANE macro. With this, you will only need the normal Xilinx USB cable to interact | ||
with CVA6. Note that it means that | ||
Vivado and OpenOCD can not use the same cable at the same time. | ||
>**WARNING: this setup (with `EXT_JTAG=0`) will only work for designs containing the host only** as | ||
it is not possible to chain multiple devices on the BSCANE macro. If you need to use `EXT_JTAG=0` | ||
consider modifying the RTL to remove the debug modules of the IPs. | ||
|
||
> When using `EXT_JTAG=1` we add an external JTAG chain for the RV64 host and other island through | ||
the FPGA's GPIOs. Since the VCU128 does not have GPIOs we use we use a Digilent JTAG-HS2 cable | ||
connected to the Xilinx XM105 FMC debug card. See the connections in `vcu128.xdc`. | ||
|
||
### Xilinx VCU118 | ||
> #### Bootmodes and VIOs | ||
> | ||
> We currently do not use the switches on this board, the CVA6 bootmode (see [Cheshire | ||
bootrom](https://pulp-platform.github.io/cheshire/um/sw/#boot-rom)) is selected by Xilinx VIOs that | ||
can be set in the Vivado GUI (see [Using Vivado GUI](#bringup_vivado_gui)). | ||
> | ||
> #### External JTAG chain | ||
> | ||
> Similarly to the VCU128 we use GPIOs to connect an external JTAG-USB dongle (Digilent HS2). Unlike the VCU128, the availability of GPIOs directly on the board allow us to connect the HS2 without an FMC debug board (see constraints for related pins). | ||
>**WARNING: this setup (with `EXT_JTAG=0`) will only work for designs containing the host only** as | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can use a warning block:
|
||
it is not possible to chain multiple devices on the BSCANE macro. If you need to use `EXT_JTAG=0` | ||
consider modifying the RTL to remove the debug modules of the IPs. | ||
> #### Block design and Xilinx Ethernet IP | ||
> | ||
> The Xilinx Ethernet IP integration is still under debug and does not work out of the box in Linux or U-boot at the moment. | ||
|
||
## Bare-metal bringup | ||
|
||
### Programming the FPGA | ||
|
@@ -248,7 +276,7 @@ integrated flash: | |
> This script will erase your bitstream, once the flash has been written (c.a. | ||
10min) you will need to re-program the bitstream on the board. | ||
> You can attach the UART port of the FPGA to minicom and see the boot process! | ||
### Via Ethernet | ||
### Via Ethernet (VCU128 only) | ||
> | ||
> As flashing and reading the kernel from SPI can take a few minutes, a faster way is to | ||
> [ask U-Boot to fetch the image from the network](https://www.emcraft.com/som/using-dhcp). | ||
|
@@ -259,9 +287,6 @@ integrated flash: | |
> ``` | ||
> make chs-xil-flash VIVADO_MODE=batch XILINX_BOARD=vcu128 XILINX_FLAVOR=bd XILINX_BOOT_ETH=1 | ||
> ``` | ||
### Via Ethernet | ||
|
||
Tbd | ||
|
||
## Add your own board | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright 2022 ETH Zurich and University of Bologna. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update to 2025 |
||
// Solderpad Hardware License, Version 0.51, see LICENSE for details. | ||
// SPDX-License-Identifier: SHL-0.51 | ||
// | ||
// Cyril Koenig <[email protected]> | ||
|
||
|
||
/include/ "carfield.dtsi" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// Uncomment below for remote boot | ||
// remote-boot = "0.0.0.0:vcu128-01/carfield/uImage-ci"; | ||
// remote-boot = "0.0.0.0:vcu128-01/carfield/uImage-ci"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
.Xil | ||
carfield_* | ||
scripts/add_sources.tcl* | ||
scripts/add_includes.tcl | ||
out/ | ||
probes.ltx | ||
# Makefile | ||
/out/ | ||
# Bender | ||
/scripts/add_sources.tcl* | ||
/scripts/add_includes.tcl | ||
# Vivado | ||
/.Xil | ||
/carfield_* | ||
/probes.ltx |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2024 ETH Zurich and University of Bologna. | ||
# Solderpad Hardware License, Version 0.51, see LICENSE for details. | ||
# SPDX-License-Identifier: SHL-0.51 | ||
# | ||
# Cyril Koenig <[email protected]> | ||
|
||
# VIOs are asynchronous | ||
set_false_path -through [get_pins -of_objects [get_cells design_1_i/vio_0] -filter {NAME =~ *probe*}] | ||
|
||
# Create system clocks | ||
create_clock -period 4 -name sys_clk [get_pins design_1_i/util_ds_buf_0/IBUF_OUT] | ||
set_property CLOCK_DEDICATED_ROUTE BACKBONE [get_pins design_1_i/util_ds_buf_0/IBUF_OUT] | ||
create_clock -period 10 -name pcie_clk [get_nets design_1_i/util_ds_buf_1/U0/IBUF_OUT[0]] | ||
create_clock -period 10 -name pcie_clk_div [get_nets design_1_i/util_ds_buf_1/U0/IBUF_DS_ODIV2[0]] | ||
set_property CLOCK_DEDICATED_ROUTE BACKBONE [get_nets design_1_i/util_ds_buf_1/U0/IBUF_DS_ODIV2[0]] | ||
set_property CLOCK_DEDICATED_ROUTE BACKBONE [get_nets design_1_i/util_ds_buf_1/U0/IBUF_OUT[0]] | ||
|
||
# PCIe clock LOC | ||
#set_property LOC [get_package_pins -of_objects [get_bels [get_sites -filter {NAME =~ *COMMON*} -of_objects [get_iobanks -of_objects [get_sites GTYE4_CHANNEL_X1Y15]]]/REFCLK0P]] [get_ports pcie_refclk_clk_p[0]] | ||
#set_property LOC [get_package_pins -of_objects [get_bels [get_sites -filter {NAME =~ *COMMON*} -of_objects [get_iobanks -of_objects [get_sites GTYE4_CHANNEL_X1Y15]]]/REFCLK0N]] [get_ports pcie_refclk_clk_n[0]] | ||
|
||
set_property PACKAGE_PIN AW25 [get_ports "uart_rx_i"] ;# Bank 64 VCCO - VCC1V8_FPGA - IO_L9P_T1L_N4_AD12P_64 | ||
set_property IOSTANDARD LVCMOS18 [get_ports "uart_rx_i"] ;# Bank 64 VCCO - VCC1V8_FPGA - IO_L9P_T1L_N4_AD12P_64 | ||
set_property PACKAGE_PIN BB21 [get_ports "uart_tx_o"] ;# Bank 64 VCCO - VCC1V8_FPGA - IO_L8N_T1L_N3_AD5N_64 | ||
set_property IOSTANDARD LVCMOS18 [get_ports "uart_tx_o"] ;# Bank 64 VCCO - VCC1V8_FPGA - IO_L8N_T1L_N3_AD5N_64 | ||
#set_property PACKAGE_PIN BB22 [get_ports "uart_rts_o"] ; | ||
#set_property IOSTANDARD LVCMOS18 [get_ports "uart_rts_o"] ; | ||
#set_property PACKAGE_PIN AY25 [get_ports "uart_cts_i"] ; | ||
#set_property IOSTANDARD LVCMOS18 [get_ports "uart_cts_i"] ; | ||
|
||
set_property PACKAGE_PIN L19 [get_ports cpu_reset] ;# Bank 73 VCCO - VCC1V2_FPGA - IO_T1U_N12_73 | ||
set_property IOSTANDARD LVCMOS12 [get_ports cpu_reset] ;# Bank 73 VCCO - VCC1V2_FPGA - IO_T1U_N12_73 | ||
|
||
set_property BOARD_PART_PIN default_250mhz_clk1_n [get_ports default_250mhz_clk1_clk_n] | ||
set_property BOARD_PART_PIN default_250mhz_clk1_p [get_ports default_250mhz_clk1_clk_p] | ||
|
||
set_property PACKAGE_PIN D12 [get_ports default_250mhz_clk1_clk_n] ; # Bank 71 VCCO - VCC1V2_FPGA - IO_L13N_T2L_N1_GC_QBC_71 | ||
set_property IOSTANDARD DIFF_SSTL12 [get_ports default_250mhz_clk1_clk_n] ; # Bank 71 VCCO - VCC1V2_FPGA - IO_L13N_T2L_N1_GC_QBC_71 | ||
set_property PACKAGE_PIN E12 [get_ports default_250mhz_clk1_clk_p] ; # Bank 71 VCCO - VCC1V2_FPGA - IO_L13P_T2L_N0_GC_QBC_71 | ||
set_property IOSTANDARD DIFF_SSTL12 [get_ports default_250mhz_clk1_clk_p] ; # Bank 71 VCCO - VCC1V2_FPGA - IO_L13P_T2L_N0_GC_QBC_71 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2024 ETH Zurich and University of Bologna. | ||
# Solderpad Hardware License, Version 0.51, see LICENSE for details. | ||
# SPDX-License-Identifier: SHL-0.51 | ||
# | ||
# Cyril Koenig <[email protected]> | ||
# | ||
set_property PACKAGE_PIN N30 [get_ports jtag_tdo_o] | ||
set_property IOSTANDARD LVCMOS12 [get_ports jtag_tdo_o] | ||
|
||
set_property PACKAGE_PIN P30 [get_ports jtag_tck_i] | ||
set_property IOSTANDARD LVCMOS12 [get_ports jtag_tck_i] | ||
|
||
set_property PACKAGE_PIN N28 [get_ports jtag_tms_i] | ||
set_property IOSTANDARD LVCMOS12 [get_ports jtag_tms_i] | ||
|
||
set_property PACKAGE_PIN M30 [get_ports jtag_tdi_i] | ||
set_property IOSTANDARD LVCMOS12 [get_ports jtag_tdi_i] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# Copyright 2024 ETH Zurich and University of Bologna. | ||
# Solderpad Hardware License, Version 0.51, see LICENSE for details. | ||
# SPDX-License-Identifier: SHL-0.51 | ||
# | ||
# Cyril Koenig <[email protected]> | ||
|
||
# VIOs are asynchronous | ||
set_false_path -through [get_pins -of_objects [get_cells design_1_i/vio_0] -filter {NAME =~ *probe*}] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# Copyright 2024 ETH Zurich and University of Bologna. | ||
# Solderpad Hardware License, Version 0.51, see LICENSE for details. | ||
# SPDX-License-Identifier: SHL-0.51 | ||
# | ||
# Cyril Koenig <[email protected]> | ||
|
||
set_property PACKAGE_PIN A23 [get_ports jtag_gnd_o] ;# A23 - C15 (FMCP_HSPC_LA10_N) - J1.04 - GND | ||
set_property IOSTANDARD LVCMOS18 [get_ports jtag_gnd_o] ; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure to open a PR on the
nonfree
repo