From bb3027995a76f2490c3abe9aea231f75839b83f3 Mon Sep 17 00:00:00 2001 From: Sergiu Arpadi Date: Thu, 23 Jun 2022 10:17:13 +0100 Subject: [PATCH] sysid: Add sysid support for de10nano make adv7513 make 0540 --- projects/adv7513/de10nano/Makefile | 3 +++ projects/adv7513/de10nano/system_qsys.tcl | 9 +++++++++ projects/cn0540/de10nano/Makefile | 3 +++ projects/cn0540/de10nano/system_qsys.tcl | 9 +++++++++ projects/common/de10nano/de10nano_system_qsys.tcl | 15 +++++++++++++++ 5 files changed, 39 insertions(+) diff --git a/projects/adv7513/de10nano/Makefile b/projects/adv7513/de10nano/Makefile index 089b6ad7c..22a3799f0 100644 --- a/projects/adv7513/de10nano/Makefile +++ b/projects/adv7513/de10nano/Makefile @@ -6,10 +6,13 @@ PROJECT_NAME := adv7513_de10nano +M_DEPS += ../../scripts/adi_pd.tcl M_DEPS += ../../common/de10nano/de10nano_system_qsys.tcl M_DEPS += ../../common/de10nano/de10nano_system_assign.tcl LIB_DEPS += axi_dmac LIB_DEPS += axi_hdmi_tx +LIB_DEPS += axi_sysid +LIB_DEPS += sysid_rom include ../../scripts/project-intel.mk diff --git a/projects/adv7513/de10nano/system_qsys.tcl b/projects/adv7513/de10nano/system_qsys.tcl index 10bbc473c..676d242d6 100644 --- a/projects/adv7513/de10nano/system_qsys.tcl +++ b/projects/adv7513/de10nano/system_qsys.tcl @@ -1,3 +1,12 @@ +source $ad_hdl_dir/projects/scripts/adi_pd.tcl source $ad_hdl_dir/projects/common/de10nano/de10nano_system_qsys.tcl +#system ID +set_instance_parameter_value axi_sysid_0 {ROM_ADDR_BITS} {9} +set_instance_parameter_value rom_sys_0 {ROM_ADDR_BITS} {9} + +set_instance_parameter_value rom_sys_0 {PATH_TO_FILE} "[pwd]/mem_init_sys.txt" + +sysid_gen_sys_init_file; + diff --git a/projects/cn0540/de10nano/Makefile b/projects/cn0540/de10nano/Makefile index 98c225520..09c0e05bf 100755 --- a/projects/cn0540/de10nano/Makefile +++ b/projects/cn0540/de10nano/Makefile @@ -7,14 +7,17 @@ PROJECT_NAME := cn0540_de10nano M_DEPS += ../common/cn0540_qsys.tcl +M_DEPS += ../../scripts/adi_pd.tcl M_DEPS += ../../common/de10nano/de10nano_system_qsys.tcl M_DEPS += ../../common/de10nano/de10nano_system_assign.tcl LIB_DEPS += axi_dmac LIB_DEPS += axi_hdmi_tx +LIB_DEPS += axi_sysid LIB_DEPS += spi_engine/axi_spi_engine LIB_DEPS += spi_engine/spi_engine_execution LIB_DEPS += spi_engine/spi_engine_interconnect LIB_DEPS += spi_engine/spi_engine_offload +LIB_DEPS += sysid_rom include ../../scripts/project-intel.mk diff --git a/projects/cn0540/de10nano/system_qsys.tcl b/projects/cn0540/de10nano/system_qsys.tcl index 796372bf5..d96404163 100755 --- a/projects/cn0540/de10nano/system_qsys.tcl +++ b/projects/cn0540/de10nano/system_qsys.tcl @@ -1,6 +1,15 @@ set dac_fifo_address_width 10 +source $ad_hdl_dir/projects/scripts/adi_pd.tcl source $ad_hdl_dir/projects/common/de10nano/de10nano_system_qsys.tcl source ../common/cn0540_qsys.tcl +#system ID +set_instance_parameter_value axi_sysid_0 {ROM_ADDR_BITS} {9} +set_instance_parameter_value rom_sys_0 {ROM_ADDR_BITS} {9} + +set_instance_parameter_value rom_sys_0 {PATH_TO_FILE} "[pwd]/mem_init_sys.txt" + +sysid_gen_sys_init_file; + diff --git a/projects/common/de10nano/de10nano_system_qsys.tcl b/projects/common/de10nano/de10nano_system_qsys.tcl index 579f65229..5ad789d20 100644 --- a/projects/common/de10nano/de10nano_system_qsys.tcl +++ b/projects/common/de10nano/de10nano_system_qsys.tcl @@ -164,6 +164,20 @@ set_instance_parameter_value sys_id {id} {-1395322110} add_connection sys_clk.clk sys_id.clk add_connection sys_clk.clk_reset sys_id.reset +# system id + +add_instance axi_sysid_0 axi_sysid +add_instance rom_sys_0 sysid_rom + +add_connection axi_sysid_0.if_rom_addr rom_sys_0.if_rom_addr +add_connection rom_sys_0.if_rom_data axi_sysid_0.if_sys_rom_data +add_connection sys_clk.clk rom_sys_0.if_clk +add_connection sys_clk.clk axi_sysid_0.s_axi_clock +add_connection sys_clk.clk_reset axi_sysid_0.s_axi_reset + +add_interface pr_rom_data_nc conduit end +set_interface_property pr_rom_data_nc EXPORT_OF axi_sysid_0.if_pr_rom_data + # gpio-bd add_instance sys_gpio_bd altera_avalon_pio @@ -333,4 +347,5 @@ ad_cpu_interconnect 0x00090000 axi_hdmi_tx_0.s_axi ad_cpu_interconnect 0x00100000 pixel_clk_pll_reconfig.mgmt_avalon_slave ad_cpu_interconnect 0x00109000 sys_gpio_out.s1 ad_cpu_interconnect 0x0010A000 ltc2308_spi.spi_control_port +ad_cpu_interconnect 0x00018000 axi_sysid_0.s_axi