-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from pulp-platform/ck/xilinx_bd_wip
target/xilinx: Add block design flow
- Loading branch information
Showing
52 changed files
with
4,820 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,22 +5,27 @@ | |
# Author: Cyril Koenig <[email protected]> | ||
|
||
# bender targets | ||
xilinx_targs += -t fpga | ||
xilinx_targs_common += -t fpga | ||
|
||
# bender defines | ||
xilinx_defs += -D PULP_FPGA_EMUL | ||
xilinx_defs_common += -D PULP_FPGA_EMUL | ||
|
||
# Conditionally add GEN_{island} to bender define | ||
define check_enable_island | ||
ifeq ($($(1)),1) | ||
xilinx_defs += -D$(1)=1 | ||
xilinx_defs_common += -D$(1)=1 | ||
endif | ||
endef | ||
|
||
$(eval $(call check_enable_island,GEN_PULP_CLUSTER)) | ||
$(eval $(call check_enable_island,GEN_SAFETY_ISLAND)) | ||
$(eval $(call check_enable_island,GEN_SPATZ_CLUSTER)) | ||
$(eval $(call check_enable_island,GEN_OPEN_TITAN)) | ||
$(eval $(call check_enable_island,NO_HYPERBUS)) | ||
$(eval $(call check_enable_island,GEN_NO_HYPERBUS)) | ||
$(eval $(call check_enable_island,GEN_EXT_JTAG)) | ||
|
||
ifeq ($(GEN_EXT_JTAG),0) | ||
xilinx_targs_common += -t bscane | ||
endif | ||
|
||
# note : bender targets are later modified in xilinx.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,7 @@ endif | |
###################### | ||
|
||
CAR_NONFREE_REMOTE ?= [email protected]:carfield/carfield-nonfree.git | ||
CAR_NONFREE_COMMIT ?= db82219a845b66a645bbdc174ea2651046422c99 | ||
CAR_NONFREE_COMMIT ?= e446a8e30d3e5556d14ff74953c51f1bbf8c670f | ||
|
||
## Clone the non-free verification IP for the Carfield TB | ||
car-nonfree-init: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// Copyright 2022 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]> | ||
|
||
|
||
/include/ "carfield.dtsi" | ||
|
||
&soc { | ||
eth_dma0: eth_dma@141e00000 { | ||
#dma-cells = <1>; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
compatible = "xlnx,axi-dma-1.00.a"; | ||
reg = <0x1 0x41e00000 0x0 0x10000>; | ||
interrupts-extended = <&PLIC0 21 &PLIC0 22>; | ||
xlnx,addrwidth = <0x40>; | ||
xlnx,include-sg; | ||
dma-channel@141e00000 { | ||
compatible = "xlnx,axi-dma-mm2s-channel"; | ||
reg = <0 0>; | ||
dma-channels = <0x1>; | ||
interrupts-extended = <&PLIC0 21>; | ||
xlnx,datawidth = <0x20>; | ||
xlnx,device-id = <0x0>; | ||
xlnx,include-dre ; | ||
}; | ||
dma-channel@141e00030 { | ||
compatible = "xlnx,axi-dma-s2mm-channel"; | ||
reg = <0 0>; | ||
dma-channels = <0x1>; | ||
interrupts-extended = <&PLIC0 22>; | ||
xlnx,datawidth = <0x20>; | ||
xlnx,device-id = <0x0>; | ||
xlnx,include-dre ; | ||
}; | ||
}; | ||
eth0: eth0@140c00000 { | ||
compatible = "xlnx,axi-ethernet-1.00.a"; | ||
reg = <0x1 0x40c00000 0x0 0x40000>; | ||
// attacked to system clock, provide name for matching | ||
clocks = <&sysclk>, <&sysclk>; | ||
clock-names = "s_axi_lite_clk", "axis_clk"; | ||
// interrupt and mac_irq | ||
interrupts-extended = <&PLIC0 19 &PLIC0 24>; | ||
//local-mac-address = [ 00 0A 35 04 E1 60 ]; // hero-vcu128-01 | ||
local-mac-address = [ 00 0A 35 04 E1 52 ]; // hero-vcu128-02 | ||
mac-address = [ 00 0A 35 04 E1 52 ]; | ||
device_type = "network"; | ||
axistream-connected = <ð_dma0>; | ||
axistream-control-connected = <ð_dma0>; | ||
phy-handle = <&dp83867_0>; | ||
// xlnx,phy-type = <0x4>; // XAE_PHY_TYPE_SGMII. linux: deprecated, use phy-mode | ||
phy-mode = "sgmii"; | ||
xlnx,phyaddr = <0x0>; | ||
xlnx,rxcsum = <0x2>; // 0, 1, 2 for no/partial/full offloading | ||
xlnx,rxmem = <0x1000>; | ||
xlnx,txcsum = <0x2>; // 0, 1, 2 for no/partial/full offloading | ||
xlnx,txmem = <0x1000>; | ||
|
||
mdio: mdio { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
// reset-gpios = <&tca6416a 6 GPIO_ACTIVE_LOW>; | ||
// reset-delay-us = <2>; | ||
// PCS/PMA PHY | ||
xilinx_phy: ethernet-phy@0 { | ||
#phy-cells = <1>; | ||
device_type = "ethernet-phy"; | ||
reg = <0>; | ||
}; | ||
// External PHY | ||
dp83867_0: ethernet-phy@3 { | ||
compatible = "ethernet-phy-ieee802.3-c22"; | ||
reg = <3>; | ||
#phy-cells = <1>; | ||
device_type = "ethernet-phy"; | ||
ti,sgmii-ref-clock-output-enable; | ||
ti,dp83867-rxctrl-strap-quirk; | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright 2022 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]> | ||
|
||
|
||
/include/ "carfield.dtsi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
# VCU128 emulation | ||
## Xilinx compile flow | ||
|
||
```bash | ||
# Build the bitstream: | ||
make | ||
# Re-build the bitstream without | ||
# re-building the IPs: | ||
make rebuild-top | ||
# Simulate with the IPs | ||
# Note you need to generate the | ||
# Vivado IP models before | ||
make sim | ||
``` | ||
The Xilinx compile flow is divided in flavors: | ||
- vanilla : A pure-verilog compile flow which does not use block design but pre-generates IPs source code. | ||
- bd : A block design based compile flow which pre-packages a Carfield IP and builds a bitstream out of it. | ||
|
||
User inputs variables are defined in xilinx.mk and written in capital letters (ex: XILINX_BOARD), while derived variables are writted in lower case (ex: xilinx_bit). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.Xil | ||
carfield_* | ||
scripts/add_sources.tcl* | ||
scripts/add_includes.tcl | ||
out/ | ||
probes.ltx |
Oops, something went wrong.