From ab5a0032ea7bb6ee10057dc09c3454c03690433e Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Thu, 15 Feb 2024 14:25:06 +0100 Subject: [PATCH] update basic template design for Trb5sc --- template/config.vhd | 3 +-- template/config_compile_frankfurt.pl | 1 + template/nodelist_frankfurt.txt | 2 +- template/par.p2t | 4 +++- template/trb5sc_template.prj | 6 +++--- template/trb5sc_template.vhd | 7 ++++--- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/template/config.vhd b/template/config.vhd index 08a45eb..c942c1f 100644 --- a/template/config.vhd +++ b/template/config.vhd @@ -50,7 +50,7 @@ package config is constant INCLUDE_UART : integer := c_NO; constant INCLUDE_SPI : integer := c_YES; constant INCLUDE_ADC : integer := c_NO; - constant USE_I2C : integer := c_NO; + constant INCLUDE_I2C : integer := c_NO; constant INCLUDE_DEBUG_INTERFACE: integer := c_NO; --input monitor and trigger generation logic @@ -111,7 +111,6 @@ function generateIncludedFeatures return std_logic_vector is t(15) := '1'; --TDC t(17 downto 16) := std_logic_vector(to_unsigned(NUM_TDC_MODULES-1,2)); t(28 downto 28) := std_logic_vector(to_unsigned(1-SERDES_NUM,1)); - t(40 downto 40) := std_logic_vector(to_unsigned(INCLUDE_LCD,1)); t(42 downto 42) := std_logic_vector(to_unsigned(INCLUDE_SPI,1)); t(43 downto 43) := std_logic_vector(to_unsigned(INCLUDE_UART,1)); t(44 downto 44) := std_logic_vector(to_unsigned(INCLUDE_STATISTICS,1)); diff --git a/template/config_compile_frankfurt.pl b/template/config_compile_frankfurt.pl index c682b4a..6c1aa49 100644 --- a/template/config_compile_frankfurt.pl +++ b/template/config_compile_frankfurt.pl @@ -13,6 +13,7 @@ synplify_path => '/d/jspc29/lattice/synplify/S-2021.09-SP2/', nodelist_file => '../nodelist_frankfurt.txt', pinout_file => 'trb5sc_tdc', par_options => '../par.p2t', +mapper_options => ' ', #Include only necessary lpf files diff --git a/template/nodelist_frankfurt.txt b/template/nodelist_frankfurt.txt index 2e858da..a4dff17 100644 --- a/template/nodelist_frankfurt.txt +++ b/template/nodelist_frankfurt.txt @@ -1,6 +1,6 @@ // nodes file for parallel place&route -[jspc37] +[jspc85] SYSTEM = linux CORENUM = 7 ENV = /d/jspc29/lattice/310_settings.sh diff --git a/template/par.p2t b/template/par.p2t index e168739..96da5b1 100644 --- a/template/par.p2t +++ b/template/par.p2t @@ -4,7 +4,7 @@ #-m nodelist.txt # Controlled by the compile.pl script. #-n 1 # Controlled by the compile.pl script. -s 10 --t 11 +-t 8 -c 2 -e 2 -i 10 @@ -67,3 +67,5 @@ # parPlcInLimit Cannot find in the online help # parPlcInNeighborSize Cannot find in the online help -exp parHold=ON:parHoldLimit=10000:parCDP=1:parCDR=1:parPathBased=OFF:paruseNBR=1 + +#-exp parCDP=1:parCDR=1:parPlcInLimit=0:parPlcInNeighborSize=1:parPathBased=ON:parHold=ON:parHoldLimit=10000:paruseNBR=1 diff --git a/template/trb5sc_template.prj b/template/trb5sc_template.prj index 5fa2ccd..ad43138 100644 --- a/template/trb5sc_template.prj +++ b/template/trb5sc_template.prj @@ -44,7 +44,7 @@ project -result_format "edif" project -result_file "workdir/trb5sc_template.edf" set_option log_file "workdir/trb5sc_project.srf" #implementation attributes - +set_option -vhdl2008 1 set_option -vlog_std v2001 set_option -project_relative_includes 1 impl -active "workdir" @@ -147,10 +147,10 @@ add_file -vhdl -lib work "../../trbnet/media_interfaces/med_ecp5_sfp_sync.vhd" ######################################### #channel 0, backplane -add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp5/chan0_0/serdes_sync_0.vhd" +#add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp5/chan0_0/serdes_sync_0.vhd" #channel 1, SFP -#add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp5/chan0_1/serdes_sync_0.vhd" +add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp5/chan0_1/serdes_sync_0.vhd" ########################################## add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp5/pcs.vhd" diff --git a/template/trb5sc_template.vhd b/template/trb5sc_template.vhd index 62a70d7..9256c3f 100644 --- a/template/trb5sc_template.vhd +++ b/template/trb5sc_template.vhd @@ -175,6 +175,7 @@ THE_CAL_PLL : entity work.pll_in125_out50 THE_MEDIA_INTERFACE : entity work.med_ecp5_sfp_sync generic map( SERDES_NUM => 0, + USE_NEW_ECP5_RESET => 0, IS_SYNC_SLAVE => c_YES ) port map( @@ -436,9 +437,9 @@ THE_CAL_PLL : entity work.pll_in125_out50 ------------------------------------------------------------------------------- -- No trigger/data endpoint included ------------------------------------------------------------------------------- --- readout_tx(0).data_finished <= '1'; --- readout_tx(0).data_write <= '0'; --- readout_tx(0).busy_release <= '1'; +readout_tx(0).data_finished <= '1'; +readout_tx(0).data_write <= '0'; +readout_tx(0).busy_release <= '1'; end architecture; -- 2.43.0