Skip to content

Commit f79f3d6

Browse files
projects/common: Add Kria 26 SOM base design (#1849)
Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
1 parent c2291ed commit f79f3d6

File tree

6 files changed

+259
-0
lines changed

6 files changed

+259
-0
lines changed

projects/common/k26/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
####################################################################################
2+
## Copyright (C) 2025 Analog Devices, Inc.
3+
### SPDX short identifier: BSD-1-Clause
4+
## Auto-generated, do not modify!
5+
####################################################################################
6+
7+
PROJECT_NAME := template_k26
8+
9+
M_DEPS += ../../scripts/adi_pd.tcl
10+
M_DEPS += ../../common/k26/k26_system_constr.xdc
11+
M_DEPS += ../../common/k26/k26_system_bd.tcl
12+
13+
LIB_DEPS += axi_sysid
14+
LIB_DEPS += sysid_rom
15+
16+
include ../../scripts/project-xilinx.mk
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
###############################################################################
2+
## Copyright (C) 2025 Analog Devices, Inc. All rights reserved.
3+
### SPDX short identifier: ADIBSD
4+
###############################################################################
5+
6+
set CACHE_COHERENCY true
7+
8+
# default ports
9+
10+
create_bd_port -dir O -from 2 -to 0 spi0_csn
11+
create_bd_port -dir O spi0_sclk
12+
create_bd_port -dir O spi0_mosi
13+
create_bd_port -dir I spi0_miso
14+
15+
create_bd_port -dir I -from 94 -to 0 gpio_i
16+
create_bd_port -dir O -from 94 -to 0 gpio_o
17+
create_bd_port -dir O -from 94 -to 0 gpio_t
18+
19+
# instance: sys_ps8
20+
21+
ad_ip_instance zynq_ultra_ps_e sys_ps8
22+
apply_bd_automation -rule xilinx.com:bd_rule:zynq_ultra_ps_e \
23+
-config {apply_board_preset 1} [get_bd_cells sys_ps8]
24+
25+
set_property -dict "CONFIG.PSU__PSS_REF_CLK__FREQMHZ 33.333333333 CONFIG.PSU__DDRC__CWL 16" [get_bd_cells sys_ps8]
26+
ad_ip_parameter sys_ps8 CONFIG.PSU__USE__M_AXI_GP0 0
27+
ad_ip_parameter sys_ps8 CONFIG.PSU__USE__M_AXI_GP1 0
28+
ad_ip_parameter sys_ps8 CONFIG.PSU__USE__M_AXI_GP2 1
29+
ad_ip_parameter sys_ps8 CONFIG.PSU__MAXIGP2__DATA_WIDTH 32
30+
ad_ip_parameter sys_ps8 CONFIG.PSU__FPGA_PL0_ENABLE 1
31+
ad_ip_parameter sys_ps8 CONFIG.PSU__CRL_APB__PL0_REF_CTRL__SRCSEL {IOPLL}
32+
ad_ip_parameter sys_ps8 CONFIG.PSU__CRL_APB__PL0_REF_CTRL__FREQMHZ 100
33+
ad_ip_parameter sys_ps8 CONFIG.PSU__FPGA_PL1_ENABLE 1
34+
ad_ip_parameter sys_ps8 CONFIG.PSU__FPGA_PL2_ENABLE 1
35+
ad_ip_parameter sys_ps8 CONFIG.PSU__CRL_APB__PL1_REF_CTRL__SRCSEL {IOPLL}
36+
ad_ip_parameter sys_ps8 CONFIG.PSU__CRL_APB__PL1_REF_CTRL__FREQMHZ 250
37+
ad_ip_parameter sys_ps8 CONFIG.PSU__CRL_APB__PL2_REF_CTRL__SRCSEL {IOPLL}
38+
ad_ip_parameter sys_ps8 CONFIG.PSU__CRL_APB__PL2_REF_CTRL__FREQMHZ 500
39+
ad_ip_parameter sys_ps8 CONFIG.PSU__USE__IRQ0 1
40+
ad_ip_parameter sys_ps8 CONFIG.PSU__USE__IRQ1 1
41+
ad_ip_parameter sys_ps8 CONFIG.PSU__GPIO_EMIO__PERIPHERAL__ENABLE 1
42+
43+
set_property -dict [list \
44+
CONFIG.PSU__SPI0__PERIPHERAL__ENABLE 1 \
45+
CONFIG.PSU__SPI0__PERIPHERAL__IO {EMIO} \
46+
CONFIG.PSU__SPI0__GRP_SS1__ENABLE 1 \
47+
CONFIG.PSU__SPI0__GRP_SS2__ENABLE 1 \
48+
CONFIG.PSU__CRL_APB__SPI0_REF_CTRL__FREQMHZ 100 \
49+
] [get_bd_cells sys_ps8]
50+
51+
# processor system reset instances for all the three system clocks
52+
53+
ad_ip_instance proc_sys_reset sys_rstgen
54+
ad_ip_parameter sys_rstgen CONFIG.C_EXT_RST_WIDTH 1
55+
ad_ip_instance proc_sys_reset sys_250m_rstgen
56+
ad_ip_parameter sys_250m_rstgen CONFIG.C_EXT_RST_WIDTH 1
57+
ad_ip_instance proc_sys_reset sys_500m_rstgen
58+
ad_ip_parameter sys_500m_rstgen CONFIG.C_EXT_RST_WIDTH 1
59+
60+
# system reset/clock definitions
61+
62+
ad_connect sys_cpu_clk sys_ps8/pl_clk0
63+
ad_connect sys_250m_clk sys_ps8/pl_clk1
64+
ad_connect sys_500m_clk sys_ps8/pl_clk2
65+
66+
ad_connect sys_ps8/pl_resetn0 sys_rstgen/ext_reset_in
67+
ad_connect sys_cpu_clk sys_rstgen/slowest_sync_clk
68+
ad_connect sys_ps8/pl_resetn0 sys_250m_rstgen/ext_reset_in
69+
ad_connect sys_250m_clk sys_250m_rstgen/slowest_sync_clk
70+
ad_connect sys_ps8/pl_resetn0 sys_500m_rstgen/ext_reset_in
71+
ad_connect sys_500m_clk sys_500m_rstgen/slowest_sync_clk
72+
73+
ad_connect sys_cpu_reset sys_rstgen/peripheral_reset
74+
ad_connect sys_cpu_resetn sys_rstgen/peripheral_aresetn
75+
ad_connect sys_250m_reset sys_250m_rstgen/peripheral_reset
76+
ad_connect sys_250m_resetn sys_250m_rstgen/peripheral_aresetn
77+
ad_connect sys_500m_reset sys_500m_rstgen/peripheral_reset
78+
ad_connect sys_500m_resetn sys_500m_rstgen/peripheral_aresetn
79+
80+
# generic system clocks&resets pointers
81+
82+
set sys_cpu_clk [get_bd_nets sys_cpu_clk]
83+
set sys_dma_clk [get_bd_nets sys_250m_clk]
84+
set sys_iodelay_clk [get_bd_nets sys_500m_clk]
85+
86+
set sys_cpu_reset [get_bd_nets sys_cpu_reset]
87+
set sys_cpu_resetn [get_bd_nets sys_cpu_resetn]
88+
set sys_dma_reset [get_bd_nets sys_250m_reset]
89+
set sys_dma_resetn [get_bd_nets sys_250m_resetn]
90+
set sys_iodelay_reset [get_bd_nets sys_500m_reset]
91+
set sys_iodelay_resetn [get_bd_nets sys_500m_resetn]
92+
93+
# gpio
94+
95+
ad_connect gpio_i sys_ps8/emio_gpio_i
96+
ad_connect gpio_o sys_ps8/emio_gpio_o
97+
ad_connect gpio_t sys_ps8/emio_gpio_t
98+
99+
# spi
100+
101+
ad_ip_instance xlconcat spi0_csn_concat
102+
ad_ip_parameter spi0_csn_concat CONFIG.NUM_PORTS 3
103+
ad_connect sys_ps8/emio_spi0_ss_o_n spi0_csn_concat/In0
104+
ad_connect sys_ps8/emio_spi0_ss1_o_n spi0_csn_concat/In1
105+
ad_connect sys_ps8/emio_spi0_ss2_o_n spi0_csn_concat/In2
106+
ad_connect spi0_csn_concat/dout spi0_csn
107+
ad_connect sys_ps8/emio_spi0_sclk_o spi0_sclk
108+
ad_connect sys_ps8/emio_spi0_m_o spi0_mosi
109+
ad_connect sys_ps8/emio_spi0_m_i spi0_miso
110+
ad_connect sys_ps8/emio_spi0_ss_i_n VCC
111+
ad_connect sys_ps8/emio_spi0_sclk_i GND
112+
ad_connect sys_ps8/emio_spi0_s_i GND
113+
114+
ad_ip_instance xlconcat sys_concat_intc_0
115+
ad_ip_parameter sys_concat_intc_0 CONFIG.NUM_PORTS 8
116+
117+
ad_ip_instance xlconcat sys_concat_intc_1
118+
ad_ip_parameter sys_concat_intc_1 CONFIG.NUM_PORTS 8
119+
120+
ad_connect sys_concat_intc_0/dout sys_ps8/pl_ps_irq0
121+
ad_connect sys_concat_intc_1/dout sys_ps8/pl_ps_irq1
122+
123+
ad_connect sys_concat_intc_1/In7 GND
124+
ad_connect sys_concat_intc_1/In6 GND
125+
ad_connect sys_concat_intc_1/In5 GND
126+
ad_connect sys_concat_intc_1/In4 GND
127+
ad_connect sys_concat_intc_1/In3 GND
128+
ad_connect sys_concat_intc_1/In2 GND
129+
ad_connect sys_concat_intc_1/In1 GND
130+
ad_connect sys_concat_intc_1/In0 GND
131+
132+
ad_connect sys_concat_intc_0/In7 GND
133+
ad_connect sys_concat_intc_0/In6 GND
134+
ad_connect sys_concat_intc_0/In5 GND
135+
ad_connect sys_concat_intc_0/In4 GND
136+
ad_connect sys_concat_intc_0/In3 GND
137+
ad_connect sys_concat_intc_0/In2 GND
138+
ad_connect sys_concat_intc_0/In1 GND
139+
ad_connect sys_concat_intc_0/In0 GND
140+
141+
# system id
142+
143+
ad_ip_instance axi_sysid axi_sysid_0
144+
ad_ip_instance sysid_rom rom_sys_0
145+
146+
ad_connect axi_sysid_0/rom_addr rom_sys_0/rom_addr
147+
ad_connect axi_sysid_0/sys_rom_data rom_sys_0/rom_data
148+
ad_connect sys_cpu_clk rom_sys_0/clk
149+
150+
ad_cpu_interconnect 0x45000000 axi_sysid_0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
###############################################################################
2+
## Copyright (C) 2025 Analog Devices, Inc. All rights reserved.
3+
### SPDX short identifier: ADIBSD
4+
###############################################################################
5+
6+
# constraints
7+
set_property BITSTREAM.CONFIG.OVERTEMPSHUTDOWN ENABLE [current_design]

projects/common/k26/system_bd.tcl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
###############################################################################
2+
## Copyright (C) 2025 Analog Devices, Inc. All rights reserved.
3+
### SPDX short identifier: ADIBSD
4+
###############################################################################
5+
6+
source $ad_hdl_dir/projects/scripts/adi_pd.tcl
7+
source $ad_hdl_dir/projects/common/k26/k26_system_bd.tcl
8+
9+
#system ID
10+
ad_ip_parameter axi_sysid_0 CONFIG.ROM_ADDR_BITS 9
11+
ad_ip_parameter rom_sys_0 CONFIG.PATH_TO_FILE "$mem_init_sys_file_path/mem_init_sys.txt"
12+
ad_ip_parameter rom_sys_0 CONFIG.ROM_ADDR_BITS 9
13+
14+
sysid_gen_sys_init_file
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
###############################################################################
2+
## Copyright (C) 2025 Analog Devices, Inc. All rights reserved.
3+
### SPDX short identifier: ADIBSD
4+
###############################################################################
5+
6+
source ../../../scripts/adi_env.tcl
7+
source $ad_hdl_dir/projects/scripts/adi_project_xilinx.tcl
8+
source $ad_hdl_dir/projects/scripts/adi_board.tcl
9+
10+
adi_project template_k26
11+
adi_project_files template_k26 [list \
12+
"system_top.v" \
13+
"$ad_hdl_dir/projects/common/k26/k26_system_constr.xdc" \
14+
]
15+
16+
adi_project_run template_k26

projects/common/k26/system_top.v

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// ***************************************************************************
2+
// ***************************************************************************
3+
// Copyright (C) 2025 Analog Devices, Inc. All rights reserved.
4+
//
5+
// In this HDL repository, there are many different and unique modules, consisting
6+
// of various HDL (Verilog or VHDL) components. The individual modules are
7+
// developed independently, and may be accompanied by separate and unique license
8+
// terms.
9+
//
10+
// The user should read each of these license terms, and understand the
11+
// freedoms and responsibilities that he or she has by using this source/core.
12+
//
13+
// This core is distributed in the hope that it will be useful, but WITHOUT ANY
14+
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15+
// A PARTICULAR PURPOSE.
16+
//
17+
// Redistribution and use of source or resulting binaries, with or without modification
18+
// of this file, are permitted under one of the following two license terms:
19+
//
20+
// 1. The GNU General Public License version 2 as published by the
21+
// Free Software Foundation, which can be found in the top level directory
22+
// of this repository (LICENSE_GPL2), and also online at:
23+
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
24+
//
25+
// OR
26+
//
27+
// 2. An ADI specific BSD license, which can be found in the top level directory
28+
// of this repository (LICENSE_ADIBSD), and also on-line at:
29+
// https://github.com/analogdevicesinc/hdl/blob/main/LICENSE_ADIBSD
30+
// This will allow to generate bit files and not release the source code,
31+
// as long as it attaches to an ADI device.
32+
//
33+
// ***************************************************************************
34+
// ***************************************************************************
35+
36+
`timescale 1ns/100ps
37+
38+
module system_top ();
39+
40+
wire [94:0] gpio_i;
41+
wire [94:0] gpio_o;
42+
43+
assign gpio_i = gpio_o;
44+
45+
// instantiations
46+
system_wrapper i_system_wrapper (
47+
.gpio_i (gpio_i),
48+
.gpio_o (gpio_o),
49+
.gpio_t (),
50+
51+
.spi0_csn (),
52+
.spi0_miso (1'b0),
53+
.spi0_mosi (),
54+
.spi0_sclk ());
55+
56+
endmodule

0 commit comments

Comments
 (0)