Skip to content
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

Adding support for Alveo U200/U250 to OpenPiton #133

Open
wants to merge 61 commits into
base: openpiton-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3b4730c
Add u200 support
acostillado May 13, 2023
0c8eb58
Add necessary files
acostillado May 13, 2023
8b2ff1b
Update the constraints file
acostillado May 14, 2023
b9f441e
Add the block design generation to the protosyn process. Still there …
acostillado May 14, 2023
e0d370e
Revert meep changes
acostillado May 14, 2023
5162fef
Remove the sdcard from devices and fix a minur bug in the tcl script
acostillado May 14, 2023
d53e2d5
Explicity define zicsr for toolchain compatibility
acostillado May 14, 2023
8dde886
Add xci files to the alveo folder
acostillado May 14, 2023
cdb84d3
Add the meep_shell bd and the corresponding adding process
acostillado May 22, 2023
8c998be
Minor updates to the tcl sripting
acostillado May 22, 2023
36bc81c
Introduce most of the RTL changes. Constraints need to be updated acc…
acostillado May 22, 2023
6ba1981
Minor corrections
acostillado May 22, 2023
324082d
Fixes
acostillado May 22, 2023
3f996a5
Don't include the extension when importing bd files
acostillado May 22, 2023
b8a73c7
Fix
acostillado May 22, 2023
eae4e0b
More fixing
acostillado May 22, 2023
aded3ad
More fixes, detected during synthesis
acostillado May 22, 2023
cec972d
More fixes. Synthesis is closer. Constraints need still to be updated
acostillado May 23, 2023
c436c14
Update DDR4 constraints
acostillado May 23, 2023
605159c
Route the DDR reference clock properly
acostillado May 23, 2023
453984b
Refine the building process
acostillado May 23, 2023
027da3e
Minor fixes
acostillado May 23, 2023
af9c028
Refine the building process
acostillado May 23, 2023
6f6eec8
Update hte constraints. Some fixes
acostillado May 24, 2023
fa50958
More fixes
acostillado May 24, 2023
27b53ed
Do not track block design generated files
acostillado May 24, 2023
e0fc813
Minor fix
acostillado May 24, 2023
1a900a8
Revert introduced bug
acostillado May 24, 2023
74b5a5e
Change where the BD temp project is created
acostillado May 24, 2023
1879274
Fix
acostillado May 24, 2023
f013614
Add constraints for the GPIO async reset signals
acostillado May 25, 2023
c85c908
Reduce the PCIe link rate to make timing closure easier
acostillado May 25, 2023
7466824
Fix reset polarity bug
acostillado May 25, 2023
fac4880
Hot fix
acostillado May 25, 2023
951f971
Set the memory size in devices_ariane.xml to the right size
acostillado May 25, 2023
6595003
Fix MMCM clock input value
acostillado Jun 7, 2023
7376bf1
Add register slices to the XBAR
acostillado Jun 9, 2023
a7a5691
Fix reset direction on the mc
acostillado Jun 13, 2023
f992373
Tune timing constraint
acostillado Jun 14, 2023
296fe73
feat: temp commit for a working repo
tianrui-wei Jun 30, 2023
57b8172
feat: add the wiring properly in tcl file
tianrui-wei Jun 30, 2023
a0d04cd
feat: temp u200 wiring
tianrui-wei Jul 1, 2023
fb89e09
feat: update gitmodule
tianrui-wei Jul 1, 2023
b0b031d
feat: revert a wrong change
tianrui-wei Jul 1, 2023
4402eaf
feat: make ariane default
tianrui-wei Jul 2, 2023
e07cbeb
Merge branch 'ft/u200' of github.com:tianrui-wei/openpiton into ft/u200
tianrui-wei Jul 2, 2023
e10ca20
Remove hardcoded part names beyond the board.tcl script
acostillado Jul 3, 2023
725a843
Subsitute hardcoded names for variables to make the script reusable f…
acostillado Jul 5, 2023
3887608
chore: commit u250 changes
tianrui-wei Aug 22, 2023
b63f536
Merge remote-tracking branch 'custom/ft/u250' into ft/u200
tianrui-wei Aug 23, 2023
f538e8b
chore: address comments
tianrui-wei Aug 23, 2023
21d84c1
chore: macros and startup.S
tianrui-wei Aug 23, 2023
f22f7cf
chore: remove last macros
tianrui-wei Aug 23, 2023
a26a44a
chore: add license
tianrui-wei Aug 24, 2023
b09be4d
chore: add license again
tianrui-wei Aug 24, 2023
f2d4d5c
chore: remove ila probes
tianrui-wei Aug 24, 2023
e9507ed
chore: remove top level led for alveo
tianrui-wei Aug 24, 2023
99b5e46
chore: remove alveo led
tianrui-wei Aug 24, 2023
926db5a
chore: change constraint path for sdc
tianrui-wei Aug 28, 2023
06d0e98
Fix macros in chipset.v
Jbalkind Aug 30, 2023
bf0b475
Fixing uart_boot_en for u200 in chipset_impl.v.pyv
Jbalkind Aug 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ piton/design/*/*/*/*/*/*/*/*/*/*/xilinx/*/ip_cores/*/*
!piton/design/*/*/*/*/*/*/*/*/*/*/xilinx/*/ip_cores/*/*.xci
!piton/design/*/*/*/*/*/*/*/*/*/*/xilinx/*/ip_cores/*/*.xco
!piton/design/*/*/*/*/*/*/*/*/*/*/xilinx/*/ip_cores/*/*.coe
*.bd

# Ignore files generated for DMBR unit testing
piton/verif/diag/assembly/princeton/dmbr_stream_hyper_gen.s
Expand Down
19 changes: 19 additions & 0 deletions piton/design/chipset/include/mc_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,25 @@
`define DDR3_CS_WIDTH 2
`define DDR3_BG_WIDTH 2
`define DDR3_ODT_WIDTH 2
`elsif ALVEO_BOARD
Jbalkind marked this conversation as resolved.
Show resolved Hide resolved
`define BOARD_MEM_SIZE_MB 16384
`define WORDS_PER_BURST 8
`define WORD_SIZE 8 // in bytes
`define MIG_APP_ADDR_WIDTH 32
`define MIG_APP_CMD_WIDTH 3
`define MIG_APP_DATA_WIDTH 512
`define MIG_APP_MASK_WIDTH 64

`define DDR3_DQ_WIDTH 72
`define DDR3_DQS_WIDTH 18
`define DDR3_ADDR_WIDTH 17
`define DDR3_BA_WIDTH 2
`define DDR3_DM_WIDTH 0
`define DDR3_CK_WIDTH 1
`define DDR3_CKE_WIDTH 1
`define DDR3_CS_WIDTH 1
`define DDR3_BG_WIDTH 2
`define DDR3_ODT_WIDTH 1
`elsif NEXYS4DDR_BOARD
`define BOARD_MEM_SIZE_MB 256
`define WORDS_PER_BURST 8
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

327 changes: 327 additions & 0 deletions piton/design/chipset/mc/rtl/alveo_shell_top.sv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ localparam SEND_HEADER = 2'd1;
localparam SEND_DATA = 2'd2;

reg [`AXI4_DATA_WIDTH-1:0] data_in_f;
reg [`NOC_DATA_WIDTH-1:0] resp_header;

wire in_go = in_val & in_rdy;
wire flit_out_go = flit_out_val & flit_out_rdy;
Expand Down Expand Up @@ -118,7 +119,6 @@ always @(posedge clk) begin
end
end

reg [`NOC_DATA_WIDTH-1:0] resp_header;
always @(posedge clk) begin
if (~rst_n) begin
resp_header <= `NOC_DATA_WIDTH'b0;
Expand Down
44 changes: 36 additions & 8 deletions piton/design/chipset/rtl/chipset.v
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,16 @@ module chipset(

`ifdef F1_BOARD
input sys_clk,
`else
`elsif ALVEO_BOARD
input pcie_refclk_clk_n ,
input pcie_refclk_clk_p ,
input pcie_perstn ,
input [15:0] pci_express_x16_rxn ,
input [15:0] pci_express_x16_rxp ,
output [15:0] pci_express_x16_txn ,
output [15:0] pci_express_x16_txp ,
input resetn ,
output chip_rstn ,
// Oscillator clock
`ifdef PITON_CHIPSET_CLKS_GEN
`ifdef PITON_CHIPSET_DIFF_CLK
Expand Down Expand Up @@ -244,11 +253,11 @@ module chipset(
output [`DDR3_CS_WIDTH-1:0] ddr_cs_n,
`endif // endif NEXYSVIDEO_BOARD
`ifdef PITONSYS_DDR4
`ifdef XUPP3R_BOARD
`ifdef PITONSYS_DDR4_PARITY
output ddr_parity,
`else
inout [`DDR3_DM_WIDTH-1:0] ddr_dm,
`endif // XUPP3R_BOARD
`endif // PITONSYS_DDR4_PARITY
`else // PITONSYS_DDR4
output [`DDR3_DM_WIDTH-1:0] ddr_dm,
`endif // PITONSYS_DDR4
Expand Down Expand Up @@ -462,13 +471,13 @@ module chipset(
`ifdef VCU118_BOARD
// we only have 4 gpio dip switches on this board
input [3:0] sw,
`elsif XUPP3R_BOARD
`elsif PITONSYS_NO_SWITCH
// no switches :(
`else
input [7:0] sw,
`endif

`ifdef XUPP3R_BOARD
`ifdef PITONSYS_LED_4
output [3:0] leds
`else
output [7:0] leds
Expand Down Expand Up @@ -755,7 +764,7 @@ end
`ifdef VCU118_BOARD
assign uart_boot_en = sw[0];
assign uart_timeout_en = sw[1];
`elsif XUPP3R_BOARD
`elsif PITONSYS_NO_SWITCH
assign uart_boot_en = 1'b1;
assign uart_timeout_en = 1'b0;
`else
Expand Down Expand Up @@ -813,6 +822,11 @@ end
assign leds[1] = init_calib_complete;
assign leds[2] = processor_offchip_noc2_valid;
assign leds[3] = offchip_processor_noc3_valid;
`elsif ALVEO_BOARD
assign leds[0] = 1'b1;
assign leds[1] = init_calib_complete;
assign leds[2] = processor_offchip_noc2_valid;
assign leds[3] = offchip_processor_noc3_valid;
`else // PITON_BOARD
assign leds[0] = clk_locked;
assign leds[1] = ~piton_ready_n;
Expand Down Expand Up @@ -1307,11 +1321,11 @@ chipset_impl_noc_power_test chipset_impl (
.ddr_cs_n(ddr_cs_n),
`endif // endif NEXYSVIDEO_BOARD

`ifdef XUPP3R_BOARD
`ifdef PITONSYS_DDR4_PARITY
.ddr_parity(ddr_parity),
`else
.ddr_dm(ddr_dm),
`endif // XUPP3R_BOARD
`endif // PITONSYS_DDR4_PARITY
.ddr_odt(ddr_odt)
`else // ifndef F1_BOARD
.mc_clk(mc_clk),
Expand Down Expand Up @@ -1420,6 +1434,20 @@ chipset_impl_noc_power_test chipset_impl (

`endif // PITON_FPGA_ETHERNETLITE
`endif // endif PITONSYS_IOCTRL

`ifdef ALVEO_BOARD
, // PCIe
.pci_express_x16_rxn(pci_express_x16_rxn),
.pci_express_x16_rxp(pci_express_x16_rxp),
.pci_express_x16_txn(pci_express_x16_txn),
.pci_express_x16_txp(pci_express_x16_txp),
.pcie_perstn(pcie_perstn),
.pcie_refclk_clk_n(pcie_refclk_clk_n),
.pcie_refclk_clk_p(pcie_refclk_clk_p),
.resetn(resetn),
.chip_rstn (chip_rstn)

`endif

`ifdef PITON_RV64_PLATFORM
`ifdef PITON_RV64_DEBUGUNIT
Expand Down
67 changes: 64 additions & 3 deletions piton/design/chipset/rtl/chipset_impl.v.pyv
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ module chipset_impl(
// invalid access inside packet filter
output invalid_access_o,

`ifdef ALVEO_BOARD
input pcie_refclk_clk_n ,
input pcie_refclk_clk_p ,
input pcie_perstn ,
input [15:0] pci_express_x16_rxn ,
input [15:0] pci_express_x16_rxp ,
output [15:0] pci_express_x16_txn ,
output [15:0] pci_express_x16_txp ,
input resetn ,
output chip_rstn ,
`endif

`ifndef PITONSYS_NO_MC
`ifdef PITON_FPGA_MC_DDR3
`ifndef F1_BOARD
Expand Down Expand Up @@ -152,11 +164,11 @@ module chipset_impl(
output [`DDR3_CS_WIDTH-1:0] ddr_cs_n,
`endif // endif NEXYSVIDEO_BOARD
`ifdef PITONSYS_DDR4
`ifdef XUPP3R_BOARD
`ifdef PITONSYS_DDR4_PARITY
output ddr_parity,
`else
inout [`DDR3_DM_WIDTH-1:0] ddr_dm,
`endif // XUPP3R_BOARD
`endif // PITONSYS_DDR4_PARITY
`else // PITONSYS_DDR4
output [`DDR3_DM_WIDTH-1:0] ddr_dm,
`endif // PITONSYS_DDR4
Expand Down Expand Up @@ -778,6 +790,55 @@ credit_to_valrdy noc3_xbar_to_%s(
.m_axi_bready(m_axi_bready),
.ddr_ready(ddr_ready)
);
`elsif ALVEO_BOARD
alveo_shell_top alveo_shell_i (

// PCIe
.pci_express_x16_rxn(pci_express_x16_rxn),
.pci_express_x16_rxp(pci_express_x16_rxp),
.pci_express_x16_txn(pci_express_x16_txn),
.pci_express_x16_txp(pci_express_x16_txp),
.pcie_perstn(pcie_perstn),
.pcie_refclk_clk_n(pcie_refclk_clk_n),
.pcie_refclk_clk_p(pcie_refclk_clk_p),
.resetn(resetn),

// DDR4 physicall interface
.c0_ddr4_act_n ( ddr_act_n ), // cas_n, ras_n and we_n are multiplexed in ddr4
.c0_ddr4_adr ( ddr_addr ),
.c0_ddr4_ba ( ddr_ba ),
.c0_ddr4_bg ( ddr_bg ), // bank group address
.c0_ddr4_ck_t ( ddr_ck_p ),
.c0_ddr4_ck_c ( ddr_ck_n ),
.c0_ddr4_cke ( ddr_cke ),
.c0_ddr4_cs_n ( ddr_cs_n ),
.c0_ddr4_dq ( ddr_dq ),
.c0_ddr4_dqs_c ( ddr_dqs_n ),
.c0_ddr4_dqs_t ( ddr_dqs_p ),
.c0_ddr4_odt ( ddr_odt ),
.c0_ddr4_par ( ddr_parity ), // output wire c0_ddr4_parity
.c0_ddr4_reset_n ( ddr_reset_n ),

// DDR4 clock & reset
.c0_sysclk_clk_p ( mc_clk_p ),
.c0_sysclk_clk_n ( mc_clk_n ),

.c0_init_calib_complete ( init_calib_complete ),

.chip_rstn (chip_rstn ),
.chipset_clk (chipset_clk ),
.chipset_rstn (chipset_rst_n ),


.mem_flit_in_val(buf_mem_noc2_valid),
.mem_flit_in_data(buf_mem_noc2_data),
.mem_flit_in_rdy(mem_buf_noc2_ready),

.mem_flit_out_val(mem_buf_noc3_valid),
.mem_flit_out_data(mem_buf_noc3_data),
.mem_flit_out_rdy(buf_mem_noc3_ready)

);
`else
mc_top mc_top(
.mc_ui_clk_sync_rst(mc_ui_clk_sync_rst),
Expand Down Expand Up @@ -1121,7 +1182,7 @@ fake_uart fake_uart (
// this is for selecting the right bootrom (1: baremetal, 0: linux)
wire ariane_boot_sel;
`ifdef PITON_FPGA_SYNTH
assign ariane_boot_sel = uart_boot_en;
assign ariane_boot_sel = uart_boot_en;
`else
`ifdef ARIANE_SIM_LINUX_BOOT
assign ariane_boot_sel = 1'b0;
Expand Down
2 changes: 2 additions & 0 deletions piton/design/chipset/xilinx/alveou200/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!ip_cores
meep_shell
Loading