Skip to content
Snippets Groups Projects
Commit e4ef1af6 authored by BRONES Romain's avatar BRONES Romain
Browse files

Changing IP generation script

* Changing name of component
* The used transceivers is declared in $Config(GTH_LOC)
* Still some hard coded values for DAMC FMC2ZUP
parent e83a03d5
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,7 @@ begin
axis_clk <= main_clk;
inst_gtwizard:comcellnode_gtwizard
inst_gtwizard:ccn_gtwizard
PORT map(
-- Reset
......@@ -224,7 +224,7 @@ begin
txprgdivresetdone_out => open
);
inst_ethernet:comcellnode_ethernet_core
inst_ethernet:ccn_eth_core
PORT map(
s_axi_aresetn_0 => rst_n,
......
......@@ -6,7 +6,7 @@ package pkg_cc_ethernet is
--------------------------------------------
-- COMPONENT DECLARATION OF GENERATED IPS --
--------------------------------------------
COMPONENT comcellnode_gtwizard
COMPONENT ccn_gtwizard
PORT (
gtwiz_userclk_tx_reset_in : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
gtwiz_userclk_tx_srcclk_out : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
......@@ -55,7 +55,7 @@ package pkg_cc_ethernet is
);
END COMPONENT;
COMPONENT comcellnode_ethernet_core
COMPONENT ccn_eth_core
PORT (
rx_core_clk_0 : IN STD_LOGIC;
rx_serdes_clk_0 : IN STD_LOGIC;
......
set gth_loc "X0Y5"
set ProjectDirPath [file join ${::fwfwk::PrjBuildPath} ${::fwfwk::PrjBuildName}]
set xcipath [create_ip -name xxv_ethernet -vendor xilinx.com -library ip -version 3.3 -module_name comcellnode_ethernet_core]
## ------------------------------------- ##
## ETHERNET CORE
## ------------------------------------- ##
set ipName "ccn_eth_core"
set_property -dict [list \
set xcipath [create_ip \
-name xxv_ethernet \
-vendor xilinx.com \
-library ip -version 3.3 \
-module_name $ipName]
# These parameters are "hard coded" for our application:
# GT_TYPE : GTH (we are on FMC2 slot)
set ipProp [list \
CONFIG.CORE {Ethernet MAC+PCS/PMA 64-bit} \
CONFIG.LINE_RATE {10} \
CONFIG.NUM_OF_CORES 1 \
CONFIG.DATA_PATH_INTERFACE {AXI Stream} \
CONFIG.BASE_R_KR {BASE-R} \
CONFIG.INCLUDE_AXI4_INTERFACE {1} \
......@@ -15,27 +27,40 @@ set_property -dict [list \
CONFIG.GT_LOCATION {0} \
CONFIG.GT_REF_CLK_FREQ {156.25} \
CONFIG.GT_TYPE {GTH} \
CONFIG.LANE1_GT_LOC $gth_loc \
CONFIG.ENABLE_PIPELINE_REG {1} \
CONFIG.ADD_GT_CNTRL_STS_PORTS {1} \
CONFIG.INCLUDE_SHARED_LOGIC {0} \
] [get_ips comcellnode_ethernet_core]
CONFIG.LANE1_GT_LOC $Config(GTH_LOC) \
]
set_property GENERATE_SYNTH_CHECKPOINT 0 [get_files $xcipath]
set_property -dict $ipProp [get_ips $ipName]
generate_target all [get_files ${ProjectDirPath}.srcs/sources_1/ip/$ipName/$ipName.xci]
export_ip_user_files -of_objects [get_files ${ProjectDirPath}.srcs/sources_1/ip/$ipName/$ipName.xci] -no_script -sync -force -quiet
create_ip_run [get_files -of_objects [get_fileset sources_1] ${ProjectDirPath}.srcs/sources_1/ip/$ipName/$ipName.xci]
set xcipath [create_ip -name gtwizard_ultrascale -vendor xilinx.com -library ip -version 1.7 -module_name comcellnode_gtwizard]
## ------------------------------------- ##
## GT WIZARD
## ------------------------------------- ##
set ipName "ccn_gtwizard"
set xcipath [create_ip \
-name gtwizard_ultrascale \
-vendor xilinx.com \
-library ip -version 1.7 \
-module_name $ipName]
# We need to put first the preset, then customize
set_property -dict [list \
CONFIG.preset {GTH-10GBASE-R} \
] [get_ips comcellnode_gtwizard]
] [get_ips $ipName]
set_property -dict [list \
CONFIG.CHANNEL_ENABLE $gth_loc \
CONFIG.TX_MASTER_CHANNEL $gth_loc \
CONFIG.RX_MASTER_CHANNEL $gth_loc \
CONFIG.RX_REFCLK_SOURCE "$gth_loc clk1" \
CONFIG.TX_REFCLK_SOURCE "$gth_loc clk1" \
# These parameters are "hard coded" for our application:
# RX_REFCLK_SOURCE: clk1 (clocks swapped on DAMCFMC2ZUP)
set ipProp [list \
CONFIG.CHANNEL_ENABLE $Config(GTH_LOC) \
CONFIG.TX_MASTER_CHANNEL $Config(GTH_LOC) \
CONFIG.RX_MASTER_CHANNEL $Config(GTH_LOC) \
CONFIG.FREERUN_FREQUENCY {100} \
CONFIG.LOCATE_COMMON {EXAMPLE_DESIGN} \
CONFIG.LOCATE_TX_USER_CLOCKING {CORE} \
......@@ -45,6 +70,14 @@ set_property -dict [list \
CONFIG.RX_USER_DATA_WIDTH 64 \
CONFIG.TX_USER_DATA_WIDTH 64 \
CONFIG.ENABLE_OPTIONAL_PORTS {loopback_in} \
] [get_ips comcellnode_gtwizard]
CONFIG.RX_REFCLK_SOURCE $Config(GTH_LOC)" clk1"
CONFIG.TX_REFCLK_SOURCE $Config(GTH_LOC)" clk1"
]
set_property -dict $ipProp [get_ips $ipName]
generate_target all [get_files ${ProjectDirPath}.srcs/sources_1/ip/$ipName/$ipName.xci]
export_ip_user_files -of_objects [get_files ${ProjectDirPath}.srcs/sources_1/ip/$ipName/$ipName.xci] -no_script -sync -force -quiet
create_ip_run [get_files -of_objects [get_fileset sources_1] ${ProjectDirPath}.srcs/sources_1/ip/$ipName/$ipName.xci]
set_property GENERATE_SYNTH_CHECKPOINT 0 [get_files $xcipath]
......@@ -6,6 +6,7 @@
proc init {} {
# Configuration
variable Config
}
......@@ -37,6 +38,8 @@ proc setAddressSpace {} {
proc doOnCreate {} {
variable Vhdl
variable Verilog
variable Config
addSources Vhdl
addSources Verilog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment